-
-
Notifications
You must be signed in to change notification settings - Fork 109
Description
I'm attempting to build DOSBox from source using the native 8.3.0 build on a Pi3.
I've extracted the native gcc 8.3.0 build to /opt, and set the following environment variables:
OVERRIDE="/opt/native-pi-gcc-8.3.0-1/bin"
export AR="$OVERRIDE/gcc-ar-8.3.0"
export CC="$OVERRIDE/gcc-8.3.0"
export CXX="$OVERRIDE/g++-8.3.0"
export CPP="$OVERRIDE/cpp-8.3.0"
export FC="$OVERRIDE/gfortran-8.3.0"
export RANLIB="$OVERRIDE/gcc-ranlib-8.3.0"
export LD="$CXX"For LTO builds, I additionally have:
CCPATH="/opt/native-pi-gcc-8.3.0-1/libexec/gcc/arm-linux-gnueabihf/8.3.0/"
export ARFLAGS="--plugin $GCCPATH/liblto_plugin.so"
export RANLIBFLAGS="--plugin $GCCPATH/liblto_plugin.so"Attempting to ./configure with the above reports:
configure:3582: /opt/native-pi-gcc-8.3.0-1/bin/gcc-8.3.0 conftest.c >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
I think the compiler should come with these files, but I didn't find them.
But I found copies in /usr/lib/arm-linux-gnueabihf, so I forced the linker to see them using:
export LIBRARY_PATH=/usr/lib/arm-linux-gnueabihfThis progresses us to the next issue ./configure hits:
configure:3708: /opt/native-pi-gcc-8.3.0-1/bin/gcc-8.3.0 -o conftest conftest.c >&5
In file included from /usr/include/stdio.h:27,
from conftest.c:11:
/usr/include/features.h:364:12: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
^~~~~~~~~~~~~
compilation terminated.
The native build doesn't contain these headers, but I found them locally in /usr/include/arm-linux-gnueabihf:
CFLAGS="-I/usr/include/arm-linux-gnueabihf"
CXXFLAGS="-I/usr/include/arm-linux-gnueabihf"This gets us passed that, but now we see these warnings:
configure: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: png.h: proceeding with the compiler's result
...
configure: WARNING: SDL_net.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: SDL_net.h: proceeding with the compiler's result
...
configure: WARNING: X11/XKBlib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: X11/XKBlib.h: proceeding with the compiler's result
...
and so on.At this point, it feels too off the rails.
I'm hoping I've doing wrong - maybe there's a more seamless approach? - symlinks? PATH override? copying some portion overtop /usr/...? Happy to try any suggestions.
Much thanks for the nice organized builds!
I want to report the cross-compiler is working perfectly, and I'm running an 8.3 cross-compiled build of the latest 4.19 kernel.