[ 74%] Building C object epan/CMakeFiles/epan.dir/dtd_grammar.c.o
[ 74%] Linking C shared library ../run/libwireshark.so
/usr/local/lib/liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x290): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/liblua.a(lauxlib.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
epan/CMakeFiles/epan.dir/build.make:5416: recipe for target 'run/libwireshark.so.0.0.0' failed
make[2]: *** [run/libwireshark.so.0.0.0] Error 1
CMakeFiles/Makefile2:2040: recipe for target 'epan/CMakeFiles/epan.dir/all' failed
make[1]: *** [epan/CMakeFiles/epan.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
There's something off with your build environment. Seems related to your LUA library. Without knowing how your build environment is setup it's hard to tell.
hi Jaap i tried with lua 2.0 and new error popped up i.e.
Building C object epan/CMakeFiles/epan.dir/uat_load.c.o
[ 75%] Building C object epan/CMakeFiles/epan.dir/dtd_grammar.c.o
[ 76%] Linking C shared library ../run/libwireshark.so
/usr/bin/ld: /usr/local/lib/liblua.a(lstate.o): relocation R_X86_64_PC32 against symbol `lua_newstate' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
epan/CMakeFiles/epan.dir/build.make:5419: recipe for target 'run/libwireshark.so.0.0.0' failed
make[2]: *** [run/libwireshark.so.0.0.0] Error 1
CMakeFiles/Makefile2:2543: recipe for target 'epan/CMakeFiles/epan.dir/all' failed
make[1]: *** [epan/CMakeFiles/epan.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Again, I'm not sure where your Lua library in /usr/local/lib comes from, it's not from the normal Ubuntu repository. You'll have to adjust CMake to find liblua in /usr/lib/.
[ 75%] Building C object epan/CMakeFiles/epan.dir/dtdgrammar.c.o
[ 76%] Linking C shared library ../run/libwireshark.so
/usr/bin/ld: /usr/lib/gcc/x8664-linux-gnu/7/../../../../lib/liblua.a(lstate.o): relocation RX8664PC32 against symbol `luanewstate' can not be used when making a shared object; recompile with -fPIC
Nope, that ../../../../lib/liblua.a brought you right back where you were before. The file you're looking for should be right there at /usr/lib/gcc/x86_64-linux-gnu/liblua5.2.so. You may have to remove the CMake cache (CMakeCache.txt) while you're at it.
i have done compilation but while doing ./run/wireshark showing some error
arun09@alin:~/wsgit/buildd$ ./run/wireshark
The capture session could not be initiated on interface 'wlp6s0' (You don't have permission to capture on that device).
Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified.
arun09@alin:~/wsgit/buildd$ ./run/tshark
Capturing on 'wlp6s0'
tshark: The capture session could not be initiated on interface 'wlp6s0' (You don't have permission to capture on that device).
Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified.
0 packets captured
arun09@alin:~/wsgit/buildd$ cd ../build
Installing the desired/required development packages from the distribution and clearing the CMake cache results in a build configuration that matches the platform and the Wireshark build.
There's something off with your build environment. Seems related to your LUA library. Without knowing how your build environment is setup it's hard to tell.
Hi Jaap, I have installed lua5.1.5, i am using ubuntu 18.04 and i did simple cmake and make.
See if you can install the Lua 5.2 development library package, run cmake again, then make.
hi Jaap i tried with lua 2.0 and new error popped up i.e.
Again, I'm not sure where your Lua library in /usr/local/lib comes from, it's not from the normal Ubuntu repository. You'll have to adjust CMake to find liblua in /usr/lib/.
did with recommend changes again same error
[ 75%] Building C object epan/CMakeFiles/epan.dir/dtdgrammar.c.o [ 76%] Linking C shared library ../run/libwireshark.so /usr/bin/ld: /usr/lib/gcc/x8664-linux-gnu/7/../../../../lib/liblua.a(lstate.o): relocation RX8664PC32 against symbol `luanewstate' can not be used when making a shared object; recompile with -fPIC
Nope, that ../../../../lib/liblua.a brought you right back where you were before. The file you're looking for should be right there at /usr/lib/gcc/x86_64-linux-gnu/liblua5.2.so. You may have to remove the CMake cache (CMakeCache.txt) while you're at it.
Thanks!! Jaap, the changes worked for Lua lib but the same relocation occurred for Snappy Lib. So, do i have to move with the same strategy?
I would guess so.
Hi Jaap
i have done compilation but while doing ./run/wireshark showing some error
arun09@alin:~/wsgit/buildd$ ./run/wireshark
The capture session could not be initiated on interface 'wlp6s0' (You don't have permission to capture on that device). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified.
arun09@alin:~/wsgit/buildd$ ./run/tshark Capturing on 'wlp6s0' tshark: The capture session could not be initiated on interface 'wlp6s0' (You don't have permission to capture on that device). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. 0 packets captured arun09@alin:~/wsgit/buildd$ cd ../build