[I'm avoiding continuing this issue in the bugzilla report 214864 as it is not relevant to the 214864's intent. I'm CC'ing John Marino (the maintainer of lang/gcc6-aux ) in case the details presented prove of interest to him.]
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214864 > > ... > > --- Comment #16 from Pedro F. Giffuni <p...@freebsd.org> --- > (In reply to Mark Millard from comment #15) > GCC has the nasty habit of "fixing" the system headers according to outdated > expectations. > There is a way to regenerate the headers but I forgot the details. Please > update your GCC to a newly generated snapshot (or move to clang). > >From comment #17 of 214864: > (In reply to Pedro F. Giffuni from comment #16) > > I only made the comment about lang/gcc6-aux because > it is listed in > comment 10 > as blocking other ports > but that happens to not be for lld related reasons. > > > Side note: > > I got to lang/gcc6-aux indirectly via trying to build > ports-mgmt/synth. I have no direct use for gcc6-aux. > I'll simply wait for the lang/gcc6-aux maintainer > and a committer to update the bootstrap materials of > building lang/gcc6-aux to no longer require the > __nonnull (or related materials). > > [I also checked and at the time pkg provided an older > synth that did not yet support arm64: source was > the only thing recent enough. But I can wait.] > --- Comment #18 from Pedro F. Giffuni <p...@freebsd.org> --- > (In reply to Mark Millard from comment #17) > > Yes, it's unrelated to lld: > > The thing is GCC's build system grabs the system headers and "fixes" them. I > removed the __nonnull attribute from the headers about a month ago but the old > GCC oyu are using was built when they were still there. > The issue is usually resolved by rebuilding GCC, there shouldn't be any need > to > patch things. Perhaps the gcc-aux port needs a version bump. The below details the full evidence that the problem file and its contents (including __nonnull use) are from ada-bootstrap.aarch64.freebsd.120.tar.bz2 content that is one of the distfiles for lang/gcc6-aux . The problem is not from other things in my environment. In: In file included from conftest.c:71:0: /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h: In function 'posix_memalign': /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:46: error: expected declaration specifiers before '__nonnull' int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ ^~~~~~~~~ it is a question where: . . ./work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h and its content came from. Here are hints, including what context I was using at the time: # uname -apKU FreeBSD pine64 12.0-CURRENT FreeBSD 12.0-CURRENT r315914M arm64 aarch64 1200027 1200027 # svnlite info /usr/ports/ | grep "Re[plv]" Relative URL: ^/head Repository Root: svn://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 438141 Last Changed Rev: 438141 # df -m Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/ufs/PINE642Grootfs 195378 32761 146986 18% / devfs 0 0 0 100% /dev /dev/label/PINE642GAboot 63 0 63 0% /boot/efi (So searching / searches most everything, including everything relevant here.) # find / -name .svn -prune -o -name stdlib.h -exec grep "__nonnull\>" {} \; -print | more int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h So no place else does __nonnull occur in my root file system for any stdlib.h: just in the /usr/obj/ area for lang/gcc6-aux . ===> Fetching all distfiles required by gcc6-aux-20170202_1 for building ===> Extracting for gcc6-aux-20170202_1 => SHA256 Checksum OK for gcc-6-20170202.tar.bz2. => SHA256 Checksum OK for ada-bootstrap.aarch64.freebsd.120.tar.bz2. So, looking. . . # ls -lt /usr/ports/distfiles/ada-bootstrap.aarch64.freebsd.120.tar.bz2 -rw-r--r-- 1 root wheel 53840614 Feb 4 14:49 /usr/ports/distfiles/ada-bootstrap.aarch64.freebsd.120.tar.bz2 # tar -tvf /usr/ports/distfiles/ada-bootstrap.aarch64.freebsd.120.tar.bz2 | grep stdlib.h | more -rw-r--r-- 0 marino devel 2248 Feb 4 10:40 bootstrap/include/c++/6.3.1/stdlib.h -rw-r--r-- 0 marino devel 1487 Feb 4 10:40 bootstrap/include/c++/6.3.1/tr1/stdlib.h -rw-r--r-- 0 marino devel 11017 Feb 4 09:49 bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h The file with the __nonnull use is from the distfiles for lang/gcc6-aux itself (specifically from ada-bootstrap.aarch64.freebsd.120.tar.bz2 ), not from other things already existing in my environment. # ls -lT bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/ total 92 -rw-r--r-- 1 root wheel 750 Feb 4 10:30:20 2017 README -rw-r--r-- 1 root wheel 5382 Feb 4 10:30:20 2017 limits.h drwxr-xr-x 2 root wheel 512 Feb 4 09:49:09 2017 netinet -rw-r--r-- 1 root wheel 2731 Feb 4 09:49:07 2017 stddef.h -rw-r--r-- 1 root wheel 17007 Feb 4 09:49:07 2017 stdio.h -rw-r--r-- 1 root wheel 11017 Feb 4 09:49:07 2017 stdlib.h drwxr-xr-x 2 root wheel 512 Feb 4 09:49:06 2017 sys -rw-r--r-- 1 root wheel 330 Feb 4 09:49:10 2017 syslimits.h -rw-r--r-- 1 root wheel 19423 Feb 4 09:49:08 2017 unistd.h -rw-r--r-- 1 root wheel 9274 Feb 4 09:49:07 2017 wchar.h These files were built long ago and are simply copied into my environment during the build of lang/gcc6-aux. lang/gcc6-aux does not update them during its bootstrap build after extracting these files. (I used portmaster -DK in the build so the files were left behind to look at.) It takes an update to lang/gcc6-aux itself to fix the use of __nonnull in its: bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h if head is to be supported for versions after head's changes for such things. And, as I said in comment #17, I'll wait for the maintainer of lang.gcc6-aux (and a committer) to update the lang/gcc6-aux ada-bootstrap.aarch64.freebsd.120.tar.bz2 to deal with __nonnull in stdlib.h. My experimenting with ports-mgmt/synth is not time-critical, including on aarch64. === Mark Millard markmi at dsl-only.net _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"