daily CVS update output
Updating src tree: P src/bin/dd/args.c P src/distrib/sets/lists/comp/mi P src/distrib/sets/lists/xcomp/mi P src/distrib/sets/lists/xdebug/md.alpha P src/distrib/sets/lists/xdebug/md.amd64 P src/distrib/sets/lists/xdebug/md.amiga P src/distrib/sets/lists/xdebug/md.bebox P src/distrib/sets/lists/xdebug/md.cats P src/distrib/sets/lists/xdebug/md.dreamcast P src/distrib/sets/lists/xdebug/md.evbarm P src/distrib/sets/lists/xdebug/md.evbarm.armeb P src/distrib/sets/lists/xdebug/md.evbmips P src/distrib/sets/lists/xdebug/md.evbppc P src/distrib/sets/lists/xdebug/md.ews4800mips P src/distrib/sets/lists/xdebug/md.hp300 P src/distrib/sets/lists/xdebug/md.hpcarm P src/distrib/sets/lists/xdebug/md.hpcmips P src/distrib/sets/lists/xdebug/md.hpcsh P src/distrib/sets/lists/xdebug/md.hppa P src/distrib/sets/lists/xdebug/md.i386 P src/distrib/sets/lists/xdebug/md.ibmnws P src/distrib/sets/lists/xdebug/md.iyonix P src/distrib/sets/lists/xdebug/md.luna68k P src/distrib/sets/lists/xdebug/md.mac68k P src/distrib/sets/lists/xdebug/md.macppc P src/distrib/sets/lists/xdebug/md.netwinder P src/distrib/sets/lists/xdebug/md.newsmips P src/distrib/sets/lists/xdebug/md.ofppc P src/distrib/sets/lists/xdebug/md.pmax P src/distrib/sets/lists/xdebug/md.prep P src/distrib/sets/lists/xdebug/md.sgimips P src/distrib/sets/lists/xdebug/md.shark P src/distrib/sets/lists/xdebug/md.sparc P src/distrib/sets/lists/xdebug/md.sparc64 P src/distrib/sets/lists/xdebug/md.vax P src/distrib/sets/lists/xdebug/md.zaurus P src/distrib/sets/lists/xserver/md.alpha P src/distrib/sets/lists/xserver/md.amd64 P src/distrib/sets/lists/xserver/md.amiga P src/distrib/sets/lists/xserver/md.bebox P src/distrib/sets/lists/xserver/md.cats P src/distrib/sets/lists/xserver/md.dreamcast P src/distrib/sets/lists/xserver/md.evbarm P src/distrib/sets/lists/xserver/md.evbmips P src/distrib/sets/lists/xserver/md.evbppc P src/distrib/sets/lists/xserver/md.ews4800mips P src/distrib/sets/lists/xserver/md.hp300 P src/distrib/sets/lists/xserver/md.hpcarm P src/distrib/sets/lists/xserver/md.hpcmips P src/distrib/sets/lists/xserver/md.hpcsh P src/distrib/sets/lists/xserver/md.hppa P src/distrib/sets/lists/xserver/md.i386 P src/distrib/sets/lists/xserver/md.ibmnws P src/distrib/sets/lists/xserver/md.iyonix P src/distrib/sets/lists/xserver/md.luna68k P src/distrib/sets/lists/xserver/md.mac68k P src/distrib/sets/lists/xserver/md.macppc P src/distrib/sets/lists/xserver/md.netwinder P src/distrib/sets/lists/xserver/md.newsmips P src/distrib/sets/lists/xserver/md.ofppc P src/distrib/sets/lists/xserver/md.pmax P src/distrib/sets/lists/xserver/md.prep P src/distrib/sets/lists/xserver/md.sgimips P src/distrib/sets/lists/xserver/md.shark P src/distrib/sets/lists/xserver/md.sparc P src/distrib/sets/lists/xserver/md.sparc64 P src/distrib/sets/lists/xserver/md.vax P src/distrib/sets/lists/xserver/md.zaurus P src/doc/CHANGES P src/etc/etc.evbppc/ttys P src/external/mit/xorg/server/xorg-server.old/Makefile.servermod P src/external/mit/xorg/server/xorg-server.old/hw/xfree86/dixmods/fb/Makefile P src/lib/libc/hash/md2/md2.c P src/lib/libm/Makefile P src/lib/libm/man/cosh.3 P src/lib/libm/man/exp.3 P src/lib/libm/man/lgamma.3 P src/lib/libm/man/log.3 P src/lib/libm/man/lrint.3 P src/lib/libm/man/pow.3 P src/lib/libm/man/remainder.3 P src/lib/libm/man/sin.3 P src/lib/libm/man/sinh.3 P src/lib/libm/man/tan.3 P src/lib/libm/man/tanh.3 P src/lib/libm/src/s_sinl.c P src/libexec/httpd/CHANGES P src/libexec/httpd/bozohttpd.8 P src/libexec/httpd/bozohttpd.c P src/sys/dev/pci/if_wm.c Updating xsrc tree: P xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Killing core files: Updating tar files: src/top-level: collecting... replacing... done src/bin: collecting... replacing... done src/common: collecting... replacing... done src/compat: collecting... replacing... done src/crypto: collecting... replacing... done src/dist: collecting... replacing... done src/distrib: collecting... replacing... done src/doc: collecting... replacing... done src/etc: collecting... replacing... done src/external: collecting... replacing... done src/games: collecting... replacing... done src/include: collecting... replacing... done src/lib: collecting... replacing... done src/libexec: collecting... replacing... done src/regress: collecting... replacing... done src/rescue: collecting... replacing... done src/sbin: collecting... replacing... done src/share: collecting... replacing... done src/sys: collecting... replacing... done src/tests: collecting... replacing... done src/tools: collecting... replacing... done src/usr.bin: collecting... replacing... done src/usr.sbin: collecting... replacing... done src/config: collecting... replacing... done src: collecting... replacing... done xsrc/top-level: collecting... replacing... done xsrc/external: collecting... replacing... done xsrc/local: collecting... replacing... done xsrc: collecting... replacing... done Updating release-8 src tree (netbsd-8): Updating release-8 xsrc
Re: Can't build evbarm
> The right way is to put an appropriate -D in the right place in > a CPPFLAGS definition in some Makefile or other - I tried to do > it that way, but obviously not correctly, as the build didn't > add the -D to the compile line - when I start looking at modern > Makefiles my eyes just glaze over at the absurdity of the whole > system as it is now (makefiles used to be a nice simple declarative > specification of what depended on what, and how to build things, > they have turned into a truly baroque and horrid programming language > instead ... but that rant is off topic here.) > > So, what it needs is for someone to work out how to pass -D_LIBC_INTERNAL > to the tools libcompat build, and fix things properly. Why not just change the order? This: void MD2Update() { MD2Transform(); } void MD2Transform() { } doesn't compile. This: void MD2Transform() { } void MD2Update() { MD2Transform(); } compiles fine. Simple and elegant. No hacks involved. Kind regards, Adam
Re: Can't build evbarm
On Sat, Jan 27, 2024 at 02:49:09AM +0700, Robert Elz wrote: > | It doesn't accept implicit function declarations. > > Yes, that's fine - you do not need to explain the issue, we all > understand that --- but there's supposed to be a prototype for > the function, it isn't intended to be implicit. Robert is right, the missing prototype is a bug in the makefiles. Adam: that your clang host compiler requires a newer C standard than C99 for building tools is another bug, you can probably add something like -std=c99 to HOST_CFLAGS / HOST_CXXFLAGS to fix that. Martin
Re: Can't build evbarm
Date:Fri, 26 Jan 2024 16:54:13 +0100 From:Adam Message-ID: | The above is a hack. IMHO my fix is a cleaner one. The question is really why we're building libc functions (for the tools libcompat) without _LIBC_INTERNAL defined. I think it should be. | Anyway, the problem seems to be related to Clang, Not really, the issue is more what flags are passed to the compiler, what is a warning, and what is treated as an error. It looks as if the tool build is just treating this as a warning (using gcc - or whataver the native host compiler is) and your clang is not. That's all understandable, we have little control of host compilers, they can do whatever they normally do, and we just need to live with it (the tools build cannot really start giving compiler specific options to turn on, or off, warnings or errors). | It doesn't accept implicit function declarations. Yes, that's fine - you do not need to explain the issue, we all understand that --- but there's supposed to be a prototype for the function, it isn't intended to be implicit. That's what we really need to fix. My "hack" was doing that in a relevant include file, but you're right, that is a hack, and wouldn't fix any similar issues that might arise in some other function some other time (protototypes for public functions (which this one shouldn't be, apparently, but is) are gradually moving out of .c files and into .h files instead). The right way is to put an appropriate -D in the right place in a CPPFLAGS definition in some Makefile or other - I tried to do it that way, but obviously not correctly, as the build didn't add the -D to the compile line - when I start looking at modern Makefiles my eyes just glaze over at the absurdity of the whole system as it is now (makefiles used to be a nice simple declarative specification of what depended on what, and how to build things, they have turned into a truly baroque and horrid programming language instead ... but that rant is off topic here.) So, what it needs is for someone to work out how to pass -D_LIBC_INTERNAL to the tools libcompat build, and fix things properly. kre
Re: Can't build evbarm
On Fri, Jan 26, 2024 at 04:42:43PM +0100, Adam wrote: > % cat /tmp/pkgsrc/obj.aarch64/tools/compat/md2.d [..] > md2.o: > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h > md2.o: /dist/src/tools/compat/md2.h > md2.o: /dist/src/tools/compat/../../include/md2.h OK, so that wasn't it. Martin
Re: Can't build evbarm
> | Correct, _LIBC_INTERNAL is not defined for tools/compat. > > I wonder what the difference is between your environment, and > a standard build on a NetBSD host. > > | MD2Transform() must be defined for MD2Update() in lib/libc/hash/md2/md2.c. > > Yes, that I understand. > > Try the following patch to src/tools/compat/md2.h and see if that helps > (though I think there should be a better way). > > kre > > Index: md2.h > === > RCS file: /cvsroot/src/tools/compat/md2.h,v > retrieving revision 1.2 > diff -u -r1.2 md2.h > --- md2.h 27 Oct 2003 00:12:43 - 1.2 > +++ md2.h 25 Jan 2024 19:59:10 - > @@ -1,5 +1,8 @@ > /* $NetBSD: md2.h,v 1.2 2003/10/27 00:12:43 lukem Exp $ */ > > /* We unconditionally use the NetBSD MD2 in libnbcompat. */ > +#ifndef _LIBC_INTERNAL > +#define _LIBC_INTERNAL > +#endif > #include "nbtool_config.h" > #include "../../include/md2.h" The above is a hack. IMHO my fix is a cleaner one. Anyway, the problem seems to be related to Clang, which in my case is the native compiler. It doesn't accept implicit function declarations. Consider the following example: - // file zz.c void MD2Update() { MD2Transform(); } void MD2Transform() { } - % clang -std=c89 -c zz.c zz.c:5:6: error: conflicting types for 'MD2Transform' 5 | void MD2Transform() { | ^ zz.c:2:3: note: previous implicit declaration is here 2 | MD2Transform(); | ^ 1 error generated. % clang -std=gnu99 -c zz.c zz.c:2:3: error: call to undeclared function 'MD2Transform'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2 | MD2Transform(); | ^ zz.c:5:6: error: conflicting types for 'MD2Transform' 5 | void MD2Transform() { | ^ zz.c:2:3: note: previous implicit declaration is here 2 | MD2Transform(); | ^ 2 errors generated. % gcc -c zz.c zz.c:5:6: warning: conflicting types for 'MD2Transform'; have 'void()' 5 | void MD2Transform() { | ^~~~ zz.c:2:3: note: previous implicit declaration of 'MD2Transform' with type 'void()' 2 | MD2Transform(); | ^~~~ Of course it will fail with -Werror. And my guess it the release engineering builds are using NOGCCERROR=yes, as the warning shows up in the logs, like here http://releng.netbsd.org/builds/HEAD/202401252350Z/evbarm-aarch64.build (or any other architecture): /home/source/ab/HEAD/src/tools/compat/../../lib/libc/hash/md2/md2.c: In function 'MD2Update': /home/source/ab/HEAD/src/tools/compat/../../lib/libc/hash/md2/md2.c:130:4: warning: implicit declaration of function 'MD2Transform' [-Wimplicit-function-declaration] MD2Transform(context); /* resets i */ ^~~~ /home/source/ab/HEAD/src/tools/compat/../../lib/libc/hash/md2/md2.c: At top level: /home/source/ab/HEAD/src/tools/compat/../../lib/libc/hash/md2/md2.c:163:1: warning: conflicting types for 'MD2Transform' MD2Transform(MD2_CTX *context) ^~~~ /home/source/ab/HEAD/src/tools/compat/../../lib/libc/hash/md2/md2.c:130:4: note: previous implicit declaration of 'MD2Transform' was here MD2Transform(context); /* resets i */ ^~~~
Re: Can't build evbarm
> My guess is a system header (md2.h?) being found unintendly (either only > on macOS or in case of NetBSD having the "right" bits in the system header). > > Adam, can you check the *.d file in your objdir correspoding to the failing > compiler invocation and show us what system headers are mentioned there? > > Martin % cat /tmp/pkgsrc/obj.aarch64/tools/compat/md2.d md2.o: /dist/src/tools/compat/../../lib/libc/hash/md2/md2.c md2.o: md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h md2.o: /dist/src/tools/compat/namespace.h md2.o: nbtool_config.h md2.o: /dist/src/tools/compat/compat_defs.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/arm/types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/arm/_types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/endian.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/arm/endian.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_endian.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/OSByteOrder.h md2.o: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h md2.o: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h md2.o:
Re: Can't build evbarm
On Fri, Jan 26, 2024 at 03:03:24AM +0700, Robert Elz wrote: > Date:Thu, 25 Jan 2024 20:12:36 +0100 > From:Adam > Message-ID: > > | Correct, _LIBC_INTERNAL is not defined for tools/compat. > > I wonder what the difference is between your environment, and > a standard build on a NetBSD host. My guess is a system header (md2.h?) being found unintendly (either only on macOS or in case of NetBSD having the "right" bits in the system header). Adam, can you check the *.d file in your objdir correspoding to the failing compiler invocation and show us what system headers are mentioned there? Martin