tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Failure to cross-build libstdc++-v3 for earmv6hf from macOS



Hey folks —

I’m attempting to do a “make build” on a macOS 10.13.4 (hosting file system is case-insensitive HFS+) host for earmv6hf (for Raspberry Pi) and it’s bombing out building libstdc++-v3:

dependall ===> lib/../external/gpl3/gcc/lib/libstdc++-v3/include/tr2
cat /Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/external/gpl3/gcc/dist/libstdc++-v3/config/abi/pre/gnu.ver  |  grep -E -v '^[     ]*#(#| |)' |  /nbsd/tools/bin/armv6--netbsdelf-eabihf-c++ -I/nbsd/destdir/rpi/usr/include/g++ -E -P -include /Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/c++config.h - >  libstdc++-symbols.ver.tmp && mv libstdc++-symbols.ver.tmp libstdc++-symbols.ver && rm -f libstdc++-symbols.ver.tmp
grep: empty (sub)expression
#     build  libstdc++-v3/libstdc++.so.8.1
rm -f libstdc++.so.8.1
/nbsd/tools/bin/armv6--netbsdelf-eabihf-gcc  -shared -Wl,-soname,libstdc++.so.8 -Wl,--warn-shared-textrel -Wl,-Map=libstdc++.so.8.map   --sysroot=/nbsd/destdir/rpi -Wl,-O1  -Wl,--gc-sections  -Wl,--version-script=libstdc++-symbols.ver -Wl,--warn-shared-textrel  -o libstdc++.so.8.1.tmp  -Wl,-rpath-link,/nbsd/destdir/rpi/lib  -L=/lib -Wl,-x  -Wl,--whole-archive libstdc++_pic.a  -Wl,--no-whole-archive -L/nbsd/objdir/rpi/lib/libm -lm 
/Volumes/Data0/Users/thorpej/hack/NetBSD/current/tools/bin/../lib/gcc/armv6--netbsdelf-eabihf/6.4.0/../../../../armv6--netbsdelf-eabihf/bin/ld:libstdc++-symbols.ver:1: syntax error in VERSION script
collect2: error: ld returned 1 exit status

*** Failed target:  libstdc++.so.8.1
*** Failed command: /nbsd/tools/bin/armv6--netbsdelf-eabihf-gcc -shared -Wl,-soname,libstdc++.so.8 -Wl,--warn-shared-textrel -Wl,-Map=libstdc++.so.8.map --sysroot=/nbsd/destdir/rpi -Wl,-O1 -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver -Wl,--warn-shared-textrel -o libstdc++.so.8.1.tmp -Wl,-rpath-link,/nbsd/destdir/rpi/lib -L=/lib -Wl,-x -Wl,--whole-archive libstdc++_pic.a -Wl,--no-whole-archive -L/nbsd/objdir/rpi/lib/libm -lm 
*** Error code 1

Stop.
nbmake[5]: stopped in /Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/external/gpl3/gcc/lib/libstdc++-v3

*** Failed target:  dependall
*** Failed command: cd "/Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/external/gpl3/gcc/lib/libstdc++-v3"; /nbsd/tools/bin/nbmake realall
*** Error code 1

Stop.
nbmake[4]: stopped in /Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/external/gpl3/gcc/lib/libstdc++-v3


At first glance, what’s happening is that libstdc++-symbols.ver ends up as an empty file, because c++config.h fails to preprocess due to missing <bits/os_defines.h>.  In fact, it seems like all of the <bits/…> headers are missing, though I might just be confused about where to look (this GNU toolchain stuff seems even more spaghetti-like these days than it used to be).

Here’s the context of my make wrapper (nbmake-rpi):

#! /bin/sh
# Set proper variables to allow easy "make" building of a NetBSD subtree.
# Generated from:  $NetBSD: build.sh,v 1.324 2018/01/24 09:04:40 skrll Exp $
# with these arguments: -a earmv6hf -D /nbsd/destdir/rpi -m evbarm -O /nbsd/objdir/rpi -R /nbsd/releasedir/rpi -T /nbsd/tools -U -w /nbsd/tools/bin/nbmake-rpi tools
#

BSHELL=/bin/sh; export BSHELL
BUILDSEED=NetBSD-9; export BUILDSEED
CONFIG_SHELL=/bin/sh; export CONFIG_SHELL
DESTDIR=/nbsd/destdir/rpi; export DESTDIR
HOST_SH=/bin/sh; export HOST_SH
unset INFODIR
LC_ALL=C; export LC_ALL
unset LESSCHARSET
MACHINE=evbarm; export MACHINE
MACHINE_ARCH=earmv6hf; export MACHINE_ARCH
MAKEFLAGS='-de -m /Volumes/Data0/Users/thorpej/hack/NetBSD/current/src/share/mk -X  MKOBJDIRS=yes'; export MAKEFLAGS
MAKEOBJDIR='${.CURDIR:C,^/Volumes/Data0/Users/thorpej/hack/NetBSD/current/src,/nbsd/objdir/rpi,}'; export MAKEOBJDIR
unset MAKEOBJDIRPREFIX
MAKEWRAPPERMACHINE=evbarm; export MAKEWRAPPERMACHINE
MKARZERO=yes; export MKARZERO
MKUNPRIVED=yes; export MKUNPRIVED
NETBSDSRCDIR=/Volumes/Data0/Users/thorpej/hack/NetBSD/current/src; export NETBSDSRCDIR
RELEASEDIR=/nbsd/releasedir/rpi; export RELEASEDIR
unset TERMINFO
TOOLDIR=/nbsd/tools; export TOOLDIR
USETOOLS=yes; export USETOOLS

exec "${TOOLDIR}/bin/nbmake" ${1+"$@“}

Anyone have any ideas of what might be going sideways?

Thx.

—thorpej




Home | Main Index | Thread Index | Old Index