Ask Your Question
0

while doing make for wireshark following error was thrown

asked 2018-12-01 06:30:07 +0000

arun gravatar image

updated 2018-12-01 09:27:47 +0000

Jaap gravatar image
[ 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
edit retag flag offensive close merge delete

Comments

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.

Jaap gravatar imageJaap ( 2018-12-01 09:30:19 +0000 )edit

Hi Jaap, I have installed lua5.1.5, i am using ubuntu 18.04 and i did simple cmake and make.

arun gravatar imagearun ( 2018-12-01 14:17:15 +0000 )edit

See if you can install the Lua 5.2 development library package, run cmake again, then make.

Jaap gravatar imageJaap ( 2018-12-01 14:24:59 +0000 )edit

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
arun gravatar imagearun ( 2018-12-01 19:02:06 +0000 )edit

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

Jaap gravatar imageJaap ( 2018-12-01 20:26:38 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-12-04 10:42:57 +0000

Jaap gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-01 06:30:07 +0000

Seen: 632 times

Last updated: Dec 04 '18