box86
box86 copied to clipboard
Building on 64-bit - not able to build simple test program
Commands used to build:
sudo dpkg --add-architecture armhf
sudo apt install cmake make gcc-arm-linux-gnueabihf python3 gcc libc6-dev g++ build-essential
rm -rf ~/box86
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j2
sudo make install
Output: (It failed on the cmake command)
-- Found Python3: /usr/bin/python3.7 (found version "3.7.3") found components: Interpreter
-- The C compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/arm-linux-gnueabihf-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/pi/box86/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_6f5ef/fast && /usr/bin/make -f CMakeFiles/cmTC_6f5ef.dir/build.make CMakeFiles/cmTC_6f5ef.dir/build
make[1]: Entering directory '/home/pi/box86/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6f5ef.dir/testCCompiler.c.o
/usr/bin/arm-linux-gnueabihf-gcc -o CMakeFiles/cmTC_6f5ef.dir/testCCompiler.c.o -c /home/pi/box86/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_6f5ef
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6f5ef.dir/link.txt --verbose=1
/usr/bin/arm-linux-gnueabihf-gcc -rdynamic CMakeFiles/cmTC_6f5ef.dir/testCCompiler.c.o -o cmTC_6f5ef
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_6f5ef.dir/build.make:87: cmTC_6f5ef] Error 1
make[1]: Leaving directory '/home/pi/box86/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_6f5ef/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:56 (project)
-- Configuring incomplete, errors occurred!
See also "/home/pi/box86/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/box86/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found. Stop.
Maybe this helps? https://stackoverflow.com/questions/6329887/compiling-problems-cannot-find-crt1-o
Please try this: sudo apt-get install libc6-dev:armhf
Compiling on 64bits is clearly documented now. Closing this ticket. Re-open it if there are still isues.