On Aug 23, 2010, at 8:30 PM, Aaron Turner wrote:

> So building the latest tcpdump from git and it won't link against the
> latest libpcap from git:
> 
> ld: warning: in /usr/local/lib/libpcap.dylib, file was built for
> unsupported file format which is not the architecture being linked
> (i386)
> 
> running file against the actual file (libpcap.dylib is a symlink) returns:
> 
> /usr/local/lib/libpcap.1.2-PRE-GIT.dylib: Mach-O 64-bit dynamically
> linked shared library x86_64
> 
> Just ran ./configure && make && make install for both and verified
> that tcpdump is linking against the git version of libpcap.  I don't
> see any special CFLAGS or configure args for the current
> libpcap/tcpdump MacPorts builds (1.1.1/4.1.1) so maybe something
> changed?
> 
> libpcap is building with: -arch x86_64 -arch i386

I tried it and it built libpcap 3-way fat (x86_64, i386, ppc), which is the 
default when building on Snow Leopard.  The default when building on Leopard is 
to build it 4-way fat; in both cases, it matches the way it's built in OS X.

What version of OS X are you building it on?  Did you set any environment 
variables when running the configure script for libpcap, in an attempt to 
override the default fat build?  Did you use "--disable-universal" to make it 
not build fat at all?

> I tried:
> 
> CFLAGS="-arch x86_64 -arch i386" ./configure
> 
> for tcpdump, but still no worky.

If you used --disable-universal for libpcap, you have to use 
--disable-universal for tcpdump, otherwise it'll try to build a fat tcpdump, 
which will fail if the libpcap against which it's being linked isn't fat enough 
to support all the architectures for which tcpdump was built.

> ideas?

Unless you have a strong reason *NOT* to build fat, just go with the flow and 
let the configure scripts figure out how to build stuff.

If you *DO* have a strong reason not to build fat, don't build libpcap *OR* 
tcpdump fat.

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to