ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] New mac cmake setup

From: Evan Huus <eapache@xxxxxxxxx>
Date: Mon, 2 Jun 2014 12:52:10 -0400
I'm trying to get an out-of-tree cmake build set up on a brand new mac. Cmake and the compiler seem to be working fine, but I'm having issues at link time. Specifically, I keep getting:

ld: library not found for -lgmodule-2.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)

with verbose mode, I get the following line being run:

Linking C shared library ../run/libwsutil.dylib
cd /Users/eapache/src/wireshark.org/build/wsutil && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link_script CMakeFiles/wsutil.dir/link.txt --verbose=1
/usr/bin/cc   -Wall -W -Wextra -Wendif-labels -Wpointer-arith -Warray-bounds -Wformat-security -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wno-overlength-strings -Wwrite-strings -Wno-long-long -Wheader-guard -Qunused-arguments -Wc++-compat -Wdeclaration-after-statement -Wshadow -Wno-pointer-sign -Wold-style-definition -Wstrict-prototypes -Wshorten-64-to-32 -fvisibility=hidden -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -dynamiclib -Wl,-headerpad_max_install_names   -o ../run/libwsutil.0.0.0.dylib -install_name /Users/eapache/src/wireshark.org/build/run/libwsutil.0.dylib CMakeFiles/wsutil.dir/adler32.c.o CMakeFiles/wsutil.dir/aes.c.o CMakeFiles/wsutil.dir/airpdcap_wep.c.o CMakeFiles/wsutil.dir/base64.c.o CMakeFiles/wsutil.dir/bitswap.c.o CMakeFiles/wsutil.dir/crash_info.c.o CMakeFiles/wsutil.dir/crc10.c.o CMakeFiles/wsutil.dir/crc16.c.o CMakeFiles/wsutil.dir/crc16-plain.c.o CMakeFiles/wsutil.dir/crc32.c.o CMakeFiles/wsutil.dir/crc6.c.o CMakeFiles/wsutil.dir/crc7.c.o CMakeFiles/wsutil.dir/crc8.c.o CMakeFiles/wsutil.dir/crc11.c.o CMakeFiles/wsutil.dir/crcdrm.c.o CMakeFiles/wsutil.dir/des.c.o CMakeFiles/wsutil.dir/eax.c.o CMakeFiles/wsutil.dir/filesystem.c.o CMakeFiles/wsutil.dir/g711.c.o CMakeFiles/wsutil.dir/md4.c.o CMakeFiles/wsutil.dir/md5.c.o CMakeFiles/wsutil.dir/mpeg-audio.c.o CMakeFiles/wsutil.dir/nstime.c.o CMakeFiles/wsutil.dir/plugins.c.o CMakeFiles/wsutil.dir/privileges.c.o CMakeFiles/wsutil.dir/sha1.c.o CMakeFiles/wsutil.dir/strnatcmp.c.o CMakeFiles/wsutil.dir/str_util.c.o CMakeFiles/wsutil.dir/rc4.c.o CMakeFiles/wsutil.dir/report_err.c.o CMakeFiles/wsutil.dir/tempfile.c.o CMakeFiles/wsutil.dir/time_util.c.o CMakeFiles/wsutil.dir/type_util.c.o CMakeFiles/wsutil.dir/u3.c.o CMakeFiles/wsutil.dir/unicode-utils.c.o CMakeFiles/wsutil.dir/nghttp2/nghttp2_buf.c.o CMakeFiles/wsutil.dir/nghttp2/nghttp2_hd.c.o CMakeFiles/wsutil.dir/nghttp2/nghttp2_hd_huffman.c.o CMakeFiles/wsutil.dir/nghttp2/nghttp2_hd_huffman_data.c.o CMakeFiles/wsutil.dir/nghttp2/nghttp2_helper.c.o  -L/usr/local/opt/gettext/lib -lgmodule-2.0 -lglib-2.0 -lintl /usr/local/lib/libglib-2.0.dylib /usr/local/lib/libgcrypt.dylib /usr/local/lib/libgpg-error.dylib -Wl,-rpath,/usr/local/opt/gettext/lib

Has anybody seen this before? A quick google turned up nothing. Does anyone with cmake experience know which knobs I might need to tweak? I do have glib installed...

Thanks,
Evan