| Bug ID |
11587
|
| Summary |
CMake: Build fails under Linux due to lack of the fPiC flag
|
| Product |
Wireshark
|
| Version |
Git
|
| Hardware |
x86
|
| OS |
Gentoo
|
| Status |
UNCONFIRMED
|
| Severity |
Major
|
| Priority |
Low
|
| Component |
Build process
|
| Assignee |
[email protected]
|
| Reporter |
[email protected]
|
Build Information:
None. Wireshark does not build.
--
After changes in CMakeList.txt to remove the use of the fPIC flag, wireshark
does not build anymore. The following error message appears after running cmake
and then make.
[ 2%] Building C object wsutil/CMakeFiles/wsutil.dir/ws_mempbrk_sse42.c.o
[ 3%] Building C object wsutil/CMakeFiles/wsutil.dir/popcount.c.o
Linking C shared library ../run/libwsutil.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/wsutil.dir/filesystem.c.o: warning: relocation against
`test_for_directory' in readonly section `.text'.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/wsutil.dir/privileges.c.o: relocation R_X86_64_PC32 against symbol
`started_with_special_privs' can not be used when making a shared object;
recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [run/libwsutil.so.6.0.0] Error 1
make[1]: *** [wsutil/CMakeFiles/wsutil.dir/all] Error 2
make: *** [all] Error 2
Changing lines 349 and 571 in CMakeLists.txt to use fPIC instead of fPIE solves
the issue.
I am simply compiling the GTK version of wireshark and do not have Qt5
installed on this machine.
You are receiving this mail because:
- You are watching all bug changes.