docker compile error
better1017 opened this issue · 2 comments
I use docker to build the platform, but the error "Error: can't find library python2.7 required by python"
root@db2d3e806f12:/workspace/gem5-aladdin# scons build/RISCV/gem5.opt -j4
scons: Reading SConscript files ...
You're missing the gem5 style or commit message hook. These hooks help
to ensure that your code follows gem5's style rules on git commit.
This script will now install the hook in your .git/hooks/ directory.
Press enter to continue, or ctrl-c to abort:
Mkdir("/workspace/gem5-aladdin/build/sconsign")
Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking.
Checking for C header file Python.h... yes
Checking for C library python2.7... no
Error: can't find library python2.7 required by python
I should preface this answer by saying that we have never tried to build a RISC-V flavor of gem5, and even if it built, I don't expect everything to work, and we can't offer much support for it.
This is a common but very misleading error from Scons's conftests. It usually means that somehow you're missing one of the boost libraries. Scons checks for the existence of a library or header by simply compiling a small test program with the appropriate header include or linker flag (like -lpython2.7
), but because we do add additional libraries to the linker args (like -lboost_graph
), that build command can fail for other reasons. Except scons doesn't know about that, so it just thinks you're missing python (when in reality, you're probably missing some other library).
If you rerun the build command with VERBOSE=1 scons build/RISCV/gem5.opt -j4
, you should be able to see the build command that's failing and the actual error message. My best guess is that the RISC-V flavor of gem5 adds additional libraries that aren't included in the Docker image (because we don't support RISC-V).
Closing due to lack of activity. Feel free to reopen if the issue persists.