Opened 16 years ago

Closed 14 years ago

#14366 closed defect (fixed)

libpcap won't compile with MacPorts' flex

Reported by: tsunanet@… Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: opendarwin.org@…, ryandesign (Ryan Carsten Schmidt)
Port: libpcap flex

Description

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).

Change History (5)

comment:1 Changed 16 years ago by jmroot (Joshua Root)

Cc: opendarwin.org@… added
Milestone: Port Bugs

Cc maintainer.

comment:2 Changed 16 years ago by ghosthound

Owner: changed from macports-tickets@… to ricci@…
Status: newassigned

comment:3 Changed 15 years ago by nox@…

Keywords: libpcap flex nmap removed
Port: libpcap flex added

comment:4 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: assignedclosed

This does not appear to be a problem with flex @2.5.35_0 and libpcap @1.0.0_1 anymore.

Note: See TracTickets for help on using tickets.