Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
- Reply: Dimitry Andric : "Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C"
- In reply to: Dimitry Andric : "Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Mar 2023 05:41:37 UTC
Am Mon, 27 Feb 2023 23:46:21 +0100
Dimitry Andric <dim@FreeBSD.org> schrieb:
> On 27 Feb 2023, at 22:23, Paul Mather <paul@gromit.dlib.vt.edu> wrote:
> >
> > On Feb 27, 2023, at 2:57 PM, Dimitry Andric <dim@FreeBSD.org> wrote:
> >
> >> On 27 Feb 2023, at 19:19, FreeBSD User <freebsd@walstatt-de.de> wrote:
> >>>
> >>> Running recent CURRENT as host (FreeBSD 14.0-CURRENT #23 main-n261147-b8bb73ab724b: Sun
> >>> Feb 26 17:39:38 CET 2023 amd64), and nanoBSD (recent 13-STABLE, git stable/13).
> >>>
> >>> Building an appliance based on 13-STABLE sources, a customized kernel via nanoBSD, since
> >>> a couple of weeks for now building the sources fails in kernel sources:
> >>>
> >>> [...]
> >>> --- modules-all ---
> >>> --- all_subdir_an ---
> >>> /pool/home/ohartmann/Projects/router/router/apu2c4/src/sys/dev/an/if_an_pci.c:143:1:
> >>> error: a function definition without a prototype is deprecated in all versions of C and
> >>> is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
> >>> [..]
> >>>
> >>> Disabling all wireless options in the kernel config starts dropping errors of a similar
> >>> kind on other kernel places.
> >>>
> >>> Compiling on FBSD 13-STABLE seems to be all right.
> >>>
> >>> Can this be fixed. please? What causes the error and how can this be resolved if the
> >>> subtree of FreeBSD's sources is a submodule?
> >>
> >> Not sure what you mean with "subtree is a submodule", but this is likely
> >> caused by skipping the cross-tools stage somehow. Do you have any
> >> specific make.conf or src.conf settings for that?
> >
> >
> > I got bitten by this recently. In my case, it was Poudriere (running on 14-CURRENT)
> > trying to build a 13-STABLE jail. The Poudriere jail's "src.conf" was taken from the
> > actual system for which Poudriere builds packages. It had (amongst others) these two
> > options:
> >
> > WITH_SYSTEM_COMPILER=yes
> > WITHOUT_CROSS_COMPILER=yes
> >
> >
> > When I commented these out in the jail-src.conf Poudriere file the jail built correctly.
> >
> > I figure the system built fine because its system compiler is LLVM 14.x. The Poudriere
> > system compiler is LLVM 15.x, which has the breaking change wrt. old-style prototypes.
Hello,
I tried to find some documentation on my CURRENT host regarding "WITH_SYSTEM_COMPILER". None
found via man src.conf, nor via make make.conf. Please delegate me to some place where I can
find such infos.
>
> Yes, that is what I suspected in Oliver's case: if you skip the
> cross-tools stage in a buildworld of stable/13 on a 14-CURRENT host, by
> setting WITH_SYSTEM_COMPILER, you are bound to run into compilation
> errors that have been fixed in 14-CURRENT, but not yet MFC'd.
From nanoBSD's perspective, all relevant build config files are merged into a huge file
containing three elementary sections,
CONF_BUILD
CONF_INSTALL
CONF_WORLD
in neither of them I had defined "WITH_SYSTEM_COMPILER=YES" in any way, but I had configured
in both CONF_INSTALL and CONF_WORLD "WITHOUT_CROSS_COMPILER=YES". I deleted that knob for now
from "CONF_WORLD" and left it in CONF_INSTALL ("... Options to put in make.conf during
installworld only ...").
>
> The safest solution is to let cross-tools do its thing, which will check
> the host compiler, and automatically build an appropriate version of the
> compiler and linker for the stable branch, if required.
I had a misunderstanding in the terminus "cross compiling", I check now the build with this
option set to be enabled.
>
> That said, I will be merging clang 15.0.7 and a bunch of other things
> that should solve all these errors to stable/13 at some point, but not
> before the 13.2-RELEASE is out. This is to avoid making life more
> difficult for our release engineering team.
>
> -Dimitry
>
Thank you for the efforts,
Oliver
--
O. Hartmann