cc: error: unknown argument: '-fformat-extensions' while buildkernel

Hello, I have this error and the process stopped while build a custom kernel, does anyone knows what is going wrong?
I am using FreeBSD 13.0
 

Attachments

  • text.txt
    1.6 KB · Views: 110
  • error_while_building_kernel.png
    error_while_building_kernel.png
    25.2 KB · Views: 125
Besides following build errors
Code:
unknown option "PROCDESC"
unknown option ACPI_DMAR
unknown device random
unknown device tun
unknown device faith
and after excluding affected options and devices, no problem here:
Code:
--------------------------------------------------------------
>>> Kernel build for CONF_anis completed on Wed May  4 01:50:34 +02 2022
--------------------------------------------------------------
System and source is 13.0-RELEASE-p11 amd64.

Have you set something in /etc/make.conf or /etc/src.conf ?

Which source version are you trying to build on 13.0 host? Is the source tree a fresh one or updated? If updated, try a fresh one.
 
Thank you for replying!! I downloaded freebsd 13.0-RELEASE amd64 and I am running it through virtualbox. I have not make any changes to these two files but I noticed that I wrote 2 extra lines in /etc/rc.conf, so I deleted them. I have still the same problem :( , do you run it and worked?
 
Don't attach files in this forum but just paste them eg between CODE /CODE [blocks].

Running freebsd under virtualbox or bare-metal makes no difference.
rc.conf has no influence on compilation,it is for starting services.
Use "su -" to go to root in order to have no cluttered environment variables.
Can you paste your "make.conf" ?
 
Yes, the CONF_anis kernel configuration builds just fine, without those options and devices unknown.

How did you fetched the source tree?
By writting this: sudo svn co https://svn0.us-east.FreeBSD.org/base/stable/10 /usr/src

I have done by steps:
1) sudo pkg install subversion
2)rehash
3)sudo svn co https://svn0.us-east.FreeBSD.org/base/stable/10 /usr/src
4)cd /usr/src/sys/amd64/conf
5)sudo nano CONF_anis
--And fill the nano text with options/devices
6)cd /usr/src
7)sudo make buildkernel KERNCONF=CONF_anis
-- Which has the problem

Oh, wait you mean I have to delete those options from the nano?
 
Thanks, so which one should me use, or which one do you use that builds the kernel properly
I used my systems 13.0-RELEASE source code.

To get the source for your system check its version first: uname -r

If the host system is 13.0-RELEASE then get its source as described below. If it's some other version please ask before proceeding.

The procedure to populate /usr/src:

Delete old /usr/src: rm -r /usr/src

Install devel/git if not installed, e.g. lite version:

Package:
pkg install git-lite

Port:
cd /usr/ports/devel/git
make FLAVOR=lite install clean

Clone the source from the FreeBSD remote repository:
git clone --branch releng/13.0 https://git.FreeBSD.org/src.git /usr/src

Edit CONF_anis, clean those unknown options and devices, build kernel.

To reduce the build time of future builds from source enable META_MODE before the first build. To make the "filemon" kernel module load automatically on reboot add kld_list="filemon" to /etc/rc.conf. In case there is a kld_list line already, add "filemon" whitespace-separated besides present entries.
 
Back
Top