Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On Mon, Feb 27, 2023 at 3:46 PM Dimitry Andric wrote: > On 27 Feb 2023, at 22:23, Paul Mather wrote: > > > > On Feb 27, 2023, at 2:57 PM, Dimitry Andric wrote: > > > >> On 27 Feb 2023, at 19:19, FreeBSD User 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. > > 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. > > 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. > > 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. > In the meantime, I think you can disable -Werror with MK_WERROR=no in one of the nanobsd config file. The warnings are significantly less relevant for stable/xx because they are not likely to inspire people to fix them like they would on main. And to fix these, you'd need to merge the fixes from head, or at least the neutering of large classes of errors like we had (still have?) in main Warner > -Dimitry > >
Re: Arm64 Tier 1 FreeBSD 13 Phones
On Sat, Apr 10, 2021 at 10:07 AM grarpamp wrote: > FreeBSD Phones... Not really a "FreeBSD phones" just "phones" or "mobile multimedia capable embedded devices" as anything can run on them :-) For instance NuttX RTOS on PinePhone takes kilobytes in total: https://www.youtube.com/watch?v=kGI_0yK1vws There will be many different operating systems soon available on this kind of inexpensive powerful multimedia embedded systems. The problem is standard and compatibility. Unless vendor does not provide complete set of open source drivers and firmwares there will be no move forward. Unless application written for one won't run on another there will be no move forward. Unless there is no overcomplicated SDK and toolchain with libraries that have lifespan shorter than a bread there will be no move forward. Because who needs bare OS/RTOS with no useful familiar applications. :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On 27 Feb 2023, at 22:23, Paul Mather wrote: > > On Feb 27, 2023, at 2:57 PM, Dimitry Andric wrote: > >> On 27 Feb 2023, at 19:19, FreeBSD User 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. 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. 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. 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 signature.asc Description: Message signed with OpenPGP
Re: Arm64 Tier 1 FreeBSD 13 Phones
I'm very interested in this project. I have a good PC and a decent graphic card. If I can be useful,tell me how and I will consider if I can help. Il giorno lun 27 feb 2023 alle ore 22:54 Mario Marietto < marietto2...@gmail.com> ha scritto: > Hello. > > I'm very interested in this project. I have a good PC and a decent graphic > card. If I can be useful,tell me how and I will consider if I can help. > > Il giorno lun 27 feb 2023 alle ore 22:25 Ihor Antonov > ha scritto: > >> On 2/27/23 00:01, grarpamp wrote: >> > [cc'd for fyi, trim replies to where applicable] >> > >> > >> > Devices like PinePhone and Purism Librem Phone, and evolving >> > market of somewhat inexpensive ARM64's, could be synergy >> > with developing world + cryptocurrency + freespeech + etcetera, >> > ie: better than featurephones, less than PC/laptop, yet still mobile. >> > Many others around world would seek to use and or [crowd] fund real >> > unix on phones. Linux runs there, so It is now only about putting groups >> > together to do it :) >> > >> > >> https://www.reddit.com/r/linuxsucks/comments/pokckt/ama_linuxfreebsd_user_and_potabi_os_dev/ >> > https://www.reddit.com/user/Nettly_/submitted/ >> > >> >> I happen to have a PinePhone Pro lying around. I will be happy to help >> with testing or >> I can ship it to whoever is going to to the work on bringing FreeBSD up >> on it. >> >> >> -- >> Ihor Antonov >> >> >> > > -- > Mario. > -- Mario.
Re: Arm64 Tier 1 FreeBSD 13 Phones
On 2/27/23 00:01, grarpamp wrote: [cc'd for fyi, trim replies to where applicable] Devices like PinePhone and Purism Librem Phone, and evolving market of somewhat inexpensive ARM64's, could be synergy with developing world + cryptocurrency + freespeech + etcetera, ie: better than featurephones, less than PC/laptop, yet still mobile. Many others around world would seek to use and or [crowd] fund real unix on phones. Linux runs there, so It is now only about putting groups together to do it :) https://www.reddit.com/r/linuxsucks/comments/pokckt/ama_linuxfreebsd_user_and_potabi_os_dev/ https://www.reddit.com/user/Nettly_/submitted/ I happen to have a PinePhone Pro lying around. I will be happy to help with testing or I can ship it to whoever is going to to the work on bringing FreeBSD up on it. -- Ihor Antonov
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On Feb 27, 2023, at 2:57 PM, Dimitry Andric wrote: > On 27 Feb 2023, at 19:19, FreeBSD User 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. Cheers, Paul.
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On Mon, Feb 27, 2023 at 03:40:41PM -0500, Shawn Webb wrote: > On Mon, Feb 27, 2023 at 08:57:19PM +0100, Dimitry Andric wrote: > > On 27 Feb 2023, at 19:19, FreeBSD User 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? > > FWIW, HardenedBSD is also impacted by this. We set > WITH_SYSTEM_COMPILER and WITH_SYSTEM_LINKER by default, which I think > might be a contributing factor. The reason for not hitting the error in that particular file in 14-CURRENT is because the an(4) driver was removed by FreeBSD in commit 663b174b5b5387948bfa94131a08f6259d2926cc from 07 June 2021. Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc signature.asc Description: PGP signature
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
Am Mon, 27 Feb 2023 20:57:19 +0100 Dimitry Andric schrieb: > On 27 Feb 2023, at 19:19, FreeBSD User 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? > > -Dimitry > Using a subtree "./src" withing the tree of our own repository for FreeBSD's sources, it is a git submodule. According to your question about specific src.conf and make.conf - Sometimes I really do not know what NanoBSD or any cross compiling tool is picking up which one: the host's one or the one supposed to control NanoBSD's build. So, the host itself does have a specific /etc/src.conf, make.conf is only about some ports options to apply for the host. For the NanoBSD sources, it is considered one file, a merger of make.conf, src.conf, and yes, those ones or in that case this one is highly customized due to spefici requirements for space reduction. Since that has been in the past a source of evil, I tried also with a "vanilla" setup of this sepcific NanoBSD driven config (the host's src.conf/make.conf has been left untouched) - in other words, deleting it, making a full fledged kernel/base system with all the compiler settings at FreeBSD's default - with the same result as shown above. Can you hint me towards what to look after in specific? Kind regards, Oliver -- O. Hartmann pgpEGWMl2A7GD.pgp Description: OpenPGP digital signature
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On Mon, Feb 27, 2023 at 08:57:19PM +0100, Dimitry Andric wrote: > On 27 Feb 2023, at 19:19, FreeBSD User 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? FWIW, HardenedBSD is also impacted by this. We set WITH_SYSTEM_COMPILER and WITH_SYSTEM_LINKER by default, which I think might be a contributing factor. Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc signature.asc Description: PGP signature
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On 27-02-23 19:19, FreeBSD User 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] [..] You need to either fix the C code or find someone else that can fix it.* This is code that ensures that function calls correctly match function definitions using the high tech method of "cross your fingers and hope that it works". This was "fixed" by ANSI C going on for 35 years ago. Ancient code like this is probably safe enough - the finger crossing seems to have worked for a long time. It's no wonder people are clamouring to only use safe languages like Rust for new projects. A+ Paul * well maybe there is a compiler switch like -Wno-sane-person-would-do-this
Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
On 27 Feb 2023, at 19:19, FreeBSD User 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? -Dimitry signature.asc Description: Message signed with OpenPGP