[Bug] `recompile with -fPIC` error
envgap__WerWolv__ImHex-340
01 / FAILURE SIGNATURE
As reported upstream
collect2: error: ld returned 1 exit status
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
aa527ba29b97b9beca9be29898bca97f0653d004- Manifest
external/yara/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
WerWolv/ImHex #340 · read the original issue
(since github doesn't like me using issue templates) OS: Linux # Issue When I try to compile ImHex, it complains with: `/usr/bin/ld: external/yara/libyara.a(pe_utils.c.o): relocation R_X86_64_32S against <backtick>.rodata' can not be used when making a shared object; recompile with -fPIC` # Steps to reproduce 1. Compile ImHex 2. Wait until `[ 84%] Linking CXX shared library libimhex.so` 3. See Error # Logs ``` ... [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/helpers/file.cpp.o [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/pattern_language.cpp.o [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/preprocessor.cpp.o [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/lexer.cpp.o [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/parser.cpp.o [ 80%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/validator.cpp.o [ 84%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/evaluator.cpp.o [ 84%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/pattern_language/log_console.cpp.o [ 84%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/providers/provider.cpp.o [ 84%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/views/view.cpp.o [ 84%] Building CXX object plugins/libimhex/CMakeFiles/libimhex.dir/source/resources.cpp.o [ 84%] Linking CXX shared library libimhex.so /usr/bin/ld: external/yara/libyara.a(pe_utils.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC collect2: error: ld returned 1 exit status make[2]: *** [plugins/libimhex/CMakeFiles/libimhex.dir/build.make:514: plugins/libimhex/libimhex.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:675: plugins/libimhex/CMakeFiles/libimhex.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 ``` ## `uname -a` `Linux fedora 5.14.16-302.fsync.fc35.x86_64 #1 SMP Sat Nov 6 19:37:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux` # Version cb583b5d6c136477ee9267df5cccbe4770260d4f - [x] Built from source # Thoughts This might be actually a `yara` or `fmt` issue? I don't really know.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]