Skip to content

Instantly share code, notes, and snippets.

@imajes
Created September 25, 2009 01:06
Show Gist options
  • Save imajes/193184 to your computer and use it in GitHub Desktop.
Save imajes/193184 to your computer and use it in GitHub Desktop.
% sudo port install libpcap
---> Computing dependencies for libpcap
---> Fetching libpcap
---> Verifying checksum(s) for libpcap
---> Extracting libpcap
---> Applying patches to libpcap
---> Configuring libpcap
---> Building libpcap
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-1.0.0" && /usr/bin/make -j2 all shared " returned error 2
Command output: /usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_image.c
/usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_dump.c
./runlex.sh lex -oscanner.c scanner.l
yacc -d grammar.y
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
sed -e 's|@includedir[@]|/opt/local/include|g' \
-e 's|@libdir[@]|/opt/local/lib|g' \
-e 's|@DEPLIBS[@]||g' \
pcap-config.in >pcap-config.tmp
mv pcap-config.tmp pcap-config
chmod a+x pcap-config
/usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap.c
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
/usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c version.c
/usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c scanner.c
/usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -Dyylval=pcap_lval -c grammar.c
rm -f libpcap*.dylib
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
/usr/bin/gcc-4.2 -L/opt/local/lib -dynamiclib -undefined error -o libpcap.`cat ./VERSION`.dylib 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 \
-install_name /opt/local/lib/libpcap.A.dylib \
-compatibility_version 1 \
-current_version `sed 's/[^0-9.].*$//' ./VERSION`
ranlib libpcap.a
Undefined symbols:
"_pcap_parse", referenced from:
_pcap_compile in gencode.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libpcap.dylib] Error 1
Error: Status 1 encountered during processing.
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment