[MacPorts] #14366: libpcap won't compile with MacPorts' flex
MacPorts
trac at macosforge.org
Sun Feb 17 14:17:27 PST 2008
#14366: libpcap won't compile with MacPorts' flex
---------------------------------+------------------------------------------
Reporter: tsunanet at gmail.com | Owner: macports-tickets at lists.macosforge.org
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.6.0
Keywords: libpcap, flex, nmap |
---------------------------------+------------------------------------------
Hi there,
if you install flex from MacPorts and then try to install libpcap, the
compilation will fail due to flex version mismatch:
{{{
/usr/bin/gcc-4.0 -dynamiclib -o libpcap.`cat VERSION`.dylib \
-install_name /opt/local/lib/libpcap.0.dylib \
-compatibility_version 1.0.0 -current_version `cat VERSION` \
pcap-bpf.o fad-getad.o pcap.o inet.o gencode.o optimize.o
nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o
scanner.o grammar.o version.o
ld: Undefined symbols:
_lex_cleanup
_lex_init
_pcap_lex
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit
command failed
make: *** [libpcap.dylib] Error 1
Error: Target org.macports.build returned: shell command " cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_libpcap/work/libpcap-0.9.8"
&& make all " returned error 2
Command output: scanner.l:88: bad character: 7
scanner.l:88: bad character: 6
scanner.l:88: bad character: 0
scanner.l:88: bad character: 0
scanner.l:89: bad character: %
scanner.l:89: unknown error processing section 1
scanner.l:89: bad character: 2
scanner.l:89: bad character: 0
scanner.l:89: bad character: 0
scanner.l:89: bad character: 0
[...]
/usr/bin/gcc-4.0 -dynamiclib -o libpcap.`cat VERSION`.dylib \
-install_name /opt/local/lib/libpcap.0.dylib \
-compatibility_version 1.0.0 -current_version `cat VERSION` \
pcap-bpf.o fad-getad.o pcap.o inet.o gencode.o optimize.o
nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o
scanner.o grammar.o version.o
ld: Undefined symbols:
_lex_cleanup
_lex_init
_pcap_lex
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit
command failed
make: *** [libpcap.dylib] Error 1
}}}
The workaround is to ensure that {{{/usr/bin/flex}}} is invoked (probably
by passing {{{LEX=/usr/bin/flex}}} to {{{configure}}} or something).
--
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14366>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list