Re: Failed building vax on MaxOSX
smurfd <[email protected]> Tue, 9 Jun 2026 17:51:33 +0200
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
On 6/9/26 3:28 PM, Anders Magnusson wrote:
> Hi,
>
> This is:
> Darwin Mac 25.4.0 Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:25
> PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T6041 arm64
>
> I just checked out the source tree, and did a
> % ./build.sh -U -u -m vax build
>
> But; it fails later in build-rtl;
>
> # compile backend/build-rtl.lo
> c++ -O -std=gnu++11
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/usr.bin/backend/obj
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/usr.bin/backend/..
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/usr.bin/host-libiberty/obj/libiberty
> -I.
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/usr.bin/backend/../gcc/arch/vax
> -DIN_GCC -DHAVE_CONFIG_H
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/.
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../include
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../libcpp/include
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../libcody
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../libdecnumber
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../libdecnumber/dpd
> -I/Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/../libbacktrace
> -DGENERATOR_FILE -c -o build-rtl.lo.o build-rtl.c
> clang++: warning: treating 'c' input as 'c++' when in C++ mode, this
> behavior is deprecated [-Wdeprecated]
> In file included from build-rtl.c:29:
> In file included from
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/coretypes.h:472:
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/wide-int.h:1198:11:
> warning: first argument in call to 'memcpy'
> is a pointer to non-trivially copyable type 'wide_int_storage'
> [-Wnontrivial-memcall]
> 1198 | memcpy (this, &x, sizeof (wide_int_storage));
> | ^
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/wide-int.h:1198:11:
> note: explicitly cast the pointer to
> silence this warning
> 1198 | memcpy (this, &x, sizeof (wide_int_storage));
> | ^
> | (void*)
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/wide-int.h:1221:11:
> warning: first argument in call to 'memcpy'
> is a pointer to non-trivially copyable type 'wide_int_storage'
> [-Wnontrivial-memcall]
> 1221 | memcpy (this, &x, sizeof (wide_int_storage));
> | ^
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/wide-int.h:1221:11:
> note: explicitly cast the pointer to
> silence this warning
> 1221 | memcpy (this, &x, sizeof (wide_int_storage));
> | ^
> | (void*)
> In file included from build-rtl.c:31:
> In file included from
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/rtl.h:31:
> In file included from
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/hash-table.h:636:
> /Users/ragge/old/nbsdvax/external/gpl3/gcc/dist/gcc/mem-stats.h:99:5:
> warning: 'sprintf' is deprecated: This
> function is provided for compatibility reasons only. Due to
> security concerns inherent in the design of sprintf(3), it is highly
> recommended that you use snprintf(3) instead.
> [-Wdeprecated-declarations]
> 99 | sprintf (s, "%s:%i (%s)", get_trimmed_filename (),
> | ^
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1:
> note:
> 'sprintf' has been explicitly marked deprecated here
> 278 | __deprecated_msg("This function is provided for compatibility
> reasons only. Due to security concerns inherent in the design of ...
> | ^
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:227:48:
> note:
> expanded from macro '__deprecated_msg'
> 227 | #define __deprecated_msg(_msg)
> __attribute__((__deprecated__(_msg)))
> | ^
> build-rtl.c:298:10: error: use of undeclared identifier 'CC0'
> 298 | case CC0:
> | ^~~
> build-rtl.c:391:10: error: use of undeclared identifier 'CC0'
> 391 | case CC0:
> | ^~~
>
>
>
> .... and a bunch of other errors thereafter.
>
> So, as not knowing anything about how gcc works, can anyone give a
> hint about how to find what may be erroneous? :-)
>
> -- Ragge
>
Hey, have you tried to build the tools first?
this is how i build successfully on mac, not for vax though. But you
should be able to exchange evbarm and aarch64 with wax, and i guess
GENERIC for kernel
The outcome will end up in the /tmp/net folder...
./build.sh -U -O /tmp/net -j10 -m evbarm -a aarch64 tools
./build.sh -U -u -O /tmp/net -j10 -m evbarm -a aarch64 tools
./build.sh -U -u -O /tmp/net -j10 -m evbarm -a aarch64 kernel=GENERIC64
./build.sh -U -u -O /tmp/net -j10 -m evbarm -a aarch64 build
br