[ 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/.
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/.