Skip to content

qemu-arm: Could not open '/lib/ld-linux.so.3': No such file or directory #1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
locnnil opened this issue Oct 10, 2022 · 2 comments
Closed

Comments

@locnnil
Copy link

locnnil commented Oct 10, 2022

I'm trying to cross-compile for the armv7l architecture using the compiler arm-linux-gnueabi-g++.
Founding the issue #243 can be used as reference to try an approach, so i ran:
Using this file as toolchain file.

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=none -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -DCMAKE_TOOLCHAIN_FILE=~/toolchain-arm-linux-gnueabi.cmake -G "Unix Makefiles" ..
make

And the output for the make command was:

...
Scanning dependencies of target jsoncpp_test
[ 76%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/jsontest.cpp.o
[ 84%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/fuzz.cpp.o
[ 92%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/main.cpp.o
[100%] Linking CXX executable ../../bin/jsoncpp_test
qemu-arm: Could not open '/lib/ld-linux.so.3': No such file or directory
make[2]: *** [src/test_lib_json/CMakeFiles/jsoncpp_test.dir/build.make:116: bin/jsoncpp_test] Error 255
make[2]: *** Deleting file 'bin/jsoncpp_test'
make[1]: *** [CMakeFiles/Makefile2:1099: src/test_lib_json/CMakeFiles/jsoncpp_test.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

My System infos:

  • Linux 5.10.102.1-microsoft-standard-WSL2 # 1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64
  • cmake version 3.16.3
  • jsoncpp version 1.9.5
@locnnil
Copy link
Author

locnnil commented Oct 11, 2022

I figure out that my compilation process is failing in the tests and unity tests stage. When it finish the library compilation properly it calls qemu-arm to starts the tests. But looks like my qemu-arm is missing some dependencies. So compiled the library sucessfuly disabling the tests:

cmake -DCMAKE_BUILD_TYPE=none -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -DCMAKE_TOOLCHAIN_FILE=~/toolchain-arm-linux-gnueabi.cmake -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF -G "Unix Makefiles" ..

@locnnil
Copy link
Author

locnnil commented Dec 27, 2022

Clossing this issue. Disabling the tests and unity tests stage solves the problem with cross-compilation of this library.

@locnnil locnnil closed this as completed Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant