Opened 16 years ago

Last modified 15 years ago

#13802 closed defect

libpcap 0.9.5 fails to compile — at Version 8

Reported by: albatros@… Owned by: ricci@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: opendarwin.org@…, stefmit@…
Port:

Description (last modified by jmpp@…)

colin@tigger:/opt/macports-1.6.0/var/macports> sudo port install libpcap
--->  Fetching libpcap
--->  Verifying checksum(s) for libpcap
--->  Extracting libpcap
--->  Applying patches to libpcap
--->  Configuring libpcap
--->  Building libpcap with target all
Error: Target org.macports.build returned: shell command " cd "/opt/macports-1.6.0/var/macports/build/_opt_macports-1.6.0_var_macports_sources_rsync.macports.org_release_ports_net_libpcap/work/libpcap-0.9.5" && make all " returned error 2
Command output: 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
bison -y -p pcap_ -d grammar.y
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
/usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c scanner.c
/usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -Dyylval=pcap_lval -c grammar.c
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
/usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c version.c
ar rc libpcap.a 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  
ranlib libpcap.a
rm -f libpcap.dylib
/usr/bin/gcc-4.0 -dynamiclib -o libpcap.`cat VERSION`.dylib \
		-install_name /opt/macports-1.6.0/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  
Undefined symbols:
  "_lex_init", referenced from:
      _pcap_compile in gencode.o
  "_lex_cleanup", referenced from:
      _pcap_compile in gencode.o
      _pcap_compile in gencode.o
  "_pcap_lex", referenced from:
      _pcap_parse in grammar.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libpcap.dylib] Error 1

Error: Status 1 encountered during processing.
colin@tigger:/opt/macports-1.6.0/var/macports> sudo port version
Version: 1.600
colin@tigger:/opt/macports-1.6.0/var/macports> sudo port info libpcap
libpcap 0.9.5, Revision 1, net/libpcap (Variants: universal, ipv6, no_shared)
http://www.tcpdump.org/

The Packet Capture library provides a high level interface to packet capture systems. All packets on the network, even those destined for other hosts, are accessible through this mechanism.

Platforms: darwin
Maintainers: opendarwin.org@darkart.com
colin@tigger:/opt/macports-1.6.0/var/macports> uname -a
Darwin tigger.local 9.1.0 Darwin Kernel Version 9.1.0: Wed Oct 31 17:46:22 PDT 2007; root:xnu-1228.0.2~1/RELEASE_I386 i386
colin@tigger:/opt/macports-1.6.0/var/macports> which flex
/opt/macports-1.6.0/bin/flex
colin@tigger:/opt/macports-1.6.0/var/macports> which bison
/opt/macports-1.6.0/bin/bison
colin@tigger:/opt/macports-1.6.0/var/macports> gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

Change History (8)

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: opendarwin.org@… added
Milestone: Port Bugs
Summary: macports 1.6.0: libpcap 0.9.5 fails to compilelibpcap 0.9.5 fails to compile

Cc maintainer.

comment:2 Changed 16 years ago by ghosthound

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

libpcap was just upgraded to 0.9.8, should be available within 12 hours via 'port sync' (or 'port selfupdate'). Compiles fine for me on 10.5.1 x86, please test and re-open the ticket if you still have problems.

comment:3 Changed 16 years ago by ghosthound

Resolution: worksforme
Status: newclosed

comment:4 Changed 16 years ago by albatros@…

Resolution: worksforme
Status: closedreopened

Did the "port selfupdate", but 0.9.8 still fails:

colin@tigger:/opt/macports-1.6.0/var/macports> sudo port install libpcap ---> Fetching libpcap ---> Verifying checksum(s) for libpcap ---> Extracting libpcap ---> Applying patches to libpcap ---> Configuring libpcap ---> Building libpcap with target all Error: Target org.macports.build returned: shell command " cd "/opt/macports-1.6.0/var/macports/build/_opt_macports-1.6.0_var_macports_sources_rsync.macports.org_release_ports_net_libpcap/work/libpcap-0.9.8" && make all " returned error 2 Command output: 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 bison -y -p pcap_ -d grammar.y mv y.tab.c grammar.c mv y.tab.h tokdefs.h /usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I. -DHAVE_CONFIG_H -D_U_="attribute((unused))" -c scanner.c /usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I. -DHAVE_CONFIG_H -D_U_="attribute((unused))" -Dyylval=pcap_lval -c grammar.c sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c /usr/bin/gcc-4.0 -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I. -DHAVE_CONFIG_H -D_U_="attribute((unused))" -c version.c ar rc libpcap.a 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 ranlib libpcap.a rm -f libpcap.dylib /usr/bin/gcc-4.0 -dynamiclib -o libpcap.cat VERSION.dylib \

-install_name /opt/macports-1.6.0/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

Undefined symbols:

"_lex_init", referenced from:

_pcap_compile in gencode.o

"_lex_cleanup", referenced from:

_pcap_compile in gencode.o _pcap_compile in gencode.o

"_pcap_lex", referenced from:

_pcap_parse in grammar.o

ld: symbol(s) not found collect2: ld returned 1 exit status make: * [libpcap.dylib] Error 1

Error: Status 1 encountered during processing.

comment:5 Changed 16 years ago by ghosthound

Okay, time for more information. What OS rev, what hardware (PPC vs x86), etc.? Do you have fink installed? Anything in /usr/local? Any other custom stuff installed?

comment:6 Changed 16 years ago by albatros@…

MacBook Pro, i.e. C2D "Santa Rosa", 2.4 GHz, 4 GB.

10.5.1 (fresh installation of 10.5, then upgrade)

No "weirdies" installed, apart from VMware (which has some kexts), no fink.

MacPorts installed in /opt/macports-1.6.0

There's an ssh in /usr/local, and an streplace.

Seeing that there's a problem with lex: lex is /usr/bin/lex, flex is /opt/macports-1.6.0/bin/flex...

From which place should the undefined symbols be normally picked up?

comment:7 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: stefmit@… added

Stefmit reported the same problem on macports-users.

comment:8 Changed 16 years ago by jmpp@…

Description: modified (diff)

Please read WikiFormatting to learn how to properly paste Terminal output into tickets, thanks!

-jmpp

Note: See TracTickets for help on using tickets.