Wireshark mailing list archives

Re: New mac cmake setup


From: gmail <hsivank () gmail com>
Date: Tue, 3 Jun 2014 01:14:25 +0200

I try against Macports.
From my CMakeCache.txt

GMODULE2_LDFLAGS:INTERNAL=-L/opt/local/lib;-lgmodule-2.0;-lglib-2.0;-lintl
GMODULE2_LIBDIR:INTERNAL=/opt/local/lib
GMODULE2_LIBRARIES:INTERNAL=gmodule-2.0;glib-2.0;intl

=> GMODULE2_LIBRARIES does not contain required link path on osx.

Look likes a macro is missing …

something like :
        link_directories(${GMODULE2_LIBDIR})  
or
        maybe set GMODULE2_LDFLAGS in wsutil_LIBS should be ok.

H.sivank

Le 3 juin 2014 à 00:21, Evan Huus <eapache () gmail com> a écrit :

On Mon, Jun 2, 2014 at 1:24 PM, hsivank <hsivank () gmail com> wrote:
If libmodule-2.0.dylib is installed inside /usr/local/lib on your machine, a library path is missing in your command 
(something like : -L/usr/local/lib)
Quickly, You can overwrite some cache value inside "CMakeCache.txt" and add this missing path.
Or you can take a look inside wsutil/CMakeLists.txt : i think GMODULE2_LIBRARIES should be set with wsutil_LIBS

Hmm, thanks for the tips but something doesn't line up. GMODULE2_LIBRARIES is set in wsutil_LIBS, and contains the 
correct paths in CMakeCache.txt, but for some reason those paths aren't making it into the final command being run...
 
H.sivank

Le 2 juin 2014 à 18:52, Evan Huus a écrit :

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


___________________________________________________________________________
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

___________________________________________________________________________
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

___________________________________________________________________________
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: