Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 28653: /trunk/ /trunk/: acinclude.m4

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 8 Jun 2009 09:36:46 -0700

On Jun 8, 2009, at 7:48 AM, Stig Bjørlykke wrote:

Do you get this working on OSX?  It does not work for me with
"./configure --prefix=/opt/local", and I get this errors in
config.log:

configure:17601: checking whether pcap_version is defined by libpcap
configure:17630: gcc -o conftest -no-cpp-precomp
-D_U_="__attribute__((unused))" -g -O2 -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith
-Wno-pointer-sign -Wcast-align -Wformat-security -I/opt/local/include
-I/usr/local/include -D_REENTRANT -I/opt/local/include/gtk-2.0
-I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0
-I/opt/local/include/cairo -I/opt/local/include/pango-1.0
-I/opt/local/include -I/opt/local/include/glib-2.0
-I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1
-I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I
/opt/local/include  -I/opt/local/include -I/usr/local/include -I
/opt/local/include -Wl,-search_paths_first  -L/opt/local/lib
-L/usr/local/lib conftest.c -L /opt/local/lib -lpcap     >&5
ld: in /opt/local/lib, can't map file, errno=22

Same bug as the one on Ubuntu (libpcap 1.0's pcap-config put a space between "-I"/"-L" and the path; it appears to have problems with -L, at least, on several platforms).

(I've filed bugs with Apple about

	1) -L not supporting a space between it and its argument

and

2) the somewhat craptastic way it has of reporting that - apparently it thinks "/opt/local/lib" is not an argument to -L, but is something with which to link, and probably opens and tries to mmap() it, and gets EINVAL.