Wireshark mailing list archives
Lua linkage with CMake
From: Evan Huus <eapache () gmail com>
Date: Fri, 24 Aug 2012 18:17:54 -0400
Hi all, I recently attempted to switch from autotools to cmake for building wireshark, but for some reason cmake won't link liblua properly: lib/libwireshark.so: undefined reference to `lua_tonumber' lib/libwireshark.so: undefined reference to `lua_call' lib/libwireshark.so: undefined reference to `lua_pcall' lib/libwireshark.so: undefined reference to `luaL_loadfile' lib/libwireshark.so: undefined reference to `luaL_register' If I compile with VERBOSE=1, the failing gcc command is: /usr/bin/gcc -O2 -g -Wall -W -Wextra -Wendif-labels -Wpointer-arith -Warray-bounds -Wcast-align -Wformat-security -fexcess-precision=fast -Wdeclaration-after-statement -Wno-pointer-sign -Wold-style-definition -Wl,--as-needed CMakeFiles/dftest.dir/dftest.c.o CMakeFiles/dftest.dir/ui/util.c.o -o dftest -rdynamic -L/home/eapache/Desktop/wireshark/ui/gtk -L/home/eapache/Desktop/wireshark/ui/qt -L/home/eapache/Desktop/wireshark/codecs -L/home/eapache/Desktop/wireshark/epan -L/home/eapache/Desktop/wireshark/wiretap -L/home/eapache/Desktop/wireshark/wsutil lib/libwireshark.so -lpcap -lcares -lkrb5 -llua5.2 -lGeoIP -lgcrypt -lgpg-error -lgnutls -lsmi -lz -lm lib/libwiretap.so -lgmodule-2.0 -lrt -lz lib/libwsutil.so -lglib-2.0 -Wl,-rpath,/home/eapache/Desktop/wireshark/ui/gtk:/home/eapache/Desktop/wireshark/ui/qt:/home/eapache/Desktop/wireshark/codecs:/home/eapache/Desktop/wireshark/epan:/home/eapache/Desktop/wireshark/wiretap:/home/eapache/Desktop/wireshark/wsutil:/home/eapache/Desktop/wireshark/lib: The switch "-llua5.2" does exist in the above line, and is the correct switch, so I guess it's just not late enough in the list of libraries. Knowing nothing about cmake, I thought I'd ask here - where should I be looking to figure out what's gone wrong? Autotools builds (and links with liblua) correctly. Thanks, Evan ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Lua linkage with CMake Evan Huus (Aug 24)
- Re: Lua linkage with CMake Tony Trinh (Aug 24)
- Re: Lua linkage with CMake Evan Huus (Aug 24)
- Re: Lua linkage with CMake Evan Huus (Aug 25)
- Re: Lua linkage with CMake Joerg Mayer (Aug 25)
- Re: Lua linkage with CMake Evan Huus (Aug 24)
- Re: Lua linkage with CMake Tony Trinh (Aug 24)
- Re: Lua linkage with CMake Joerg Mayer (Aug 25)