pkgsrc-Users archive

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

pkgsrc-2019Q3 64-bit bootstrap is broken on Solaris 11



Trying out latest stable pkgsrc on Solaris and it seems bootstrap is broken.
It fails with the following error:

===> Patching for cwrappers-20180325
===> Creating toolchain wrappers for cwrappers-20180325
===> Configuring for cwrappers-20180325
=> Configuring and building libnbcompat
checking build system type... sparc-sun-solaris2.11
checking host system type... sparc-sun-solaris2.11
checking for sparc-sun-solaris2.11-gcc... gcc
checking whether the C compiler works... no
configure: error: in `/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/libnbcompat':
configure: error: C compiler cannot create executables
See `config.log' for more details
*** Error code 77

Stop.
bmake[1]: stopped in /opt/pkgbuild/pkgsrc/pkgtools/cwrappers
*** Error code 1

Stop.
bmake: stopped in /opt/pkgbuild/pkgsrc/pkgtools/cwrappers
===> exited with status 1
aborted.



I bootstrap with the following command, notice that I use ABI=64:

MAKECONF="" DISTDIR=${PKGBUILD_PATH:?}/distfiles USE_NATIVE_GCC=yes PKGSRC_COMPILER=gcc \
CC=${PKGBUILD_PATH:?}/scripts/gcc CXX=${PKGBUILD_PATH:?}/scripts/g++ ABI=64 \
./bootstrap --make-jobs ${MAKE_JOBS:?} --workdir ${PKGBUILD_PATH:?}/objects/bootstrap \
--prefix ${PKG_PATH:?} --pkgdbdir ${PKG_PATH:?}/db/pkg

The following point to my gcc wrapper scripts, which all use -m64:

CC=${PKGBUILD_PATH:?}/scripts/gcc
CXX=${PKGBUILD_PATH:?}/scripts/g++

# cat `which gcc`
#!/bin/ksh
eval 'echo /opt/gcc-9.2.0-sparc64/bin/gcc "$@" -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis' >> /tmp/gcc.log
exec /opt/gcc-9.2.0-sparc64/bin/gcc "$@" -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis


Bootstrap fails because come configure scripts seem to add -m32 flag,
which really should not be there with ABI=64. Below is the log of those
gcc commands:

/opt/gcc-9.2.0-sparc64/bin/gcc -E - -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
/opt/gcc-9.2.0-sparc64/bin/gcc --version -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
/opt/gcc-9.2.0-sparc64/bin/gcc -v -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
/opt/gcc-9.2.0-sparc64/bin/gcc -V -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
/opt/gcc-9.2.0-sparc64/bin/gcc -qversion -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
/opt/gcc-9.2.0-sparc64/bin/gcc -O2 -D_FORTIFY_SOURCE=2 -DHAVE_NBCOMPAT_H=1 -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/libnbcompat -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/libnbcompat -Wl,-R/opt/pkg/lib conftest.c -m32 -fstack-protector -I/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/include -L/opt/pkgbuild/objects/bootstrap/wrk/pkgtools/cwrappers/work/.buildlink/lib -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis

Doe anyone have any idea why there are a load of -m32 flags with 64-bit
pkgsrc bootstrap?

Thanks.


Home | Main Index | Thread Index | Old Index