Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#12949 closed defect (worksforme)

BUG: libpcap 0.9.5, Revision 1 fails to compile

Reported by: spam@… Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc: opendarwin.org@…, spam@…
Port: libpcap

Description

Hei, i can't build libpcap (and anything that depends on it).

This is what sudo port install libpcap says:

--->  Building libpcap with target all
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.5" && make all " returned error 2
Command output: gcc -O2 -fno-common -O2 -I. -dynamic -fno-common -DHAVE_CONFIG_H -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./pcap-bpf.c
./pcap-bpf.c: In function 'pcap_inject_bpf':
./pcap-bpf.c:348: error: 'BIOCSHDRCMPLT' undeclared (first use in this function)
./pcap-bpf.c:348: error: (Each undeclared identifier is reported only once
./pcap-bpf.c:348: error: for each function it appears in.)
make: *** [pcap-bpf.o] Error 1

Error: Status 1 encountered during processing.

Information about my system (my first bugreport, sorry if i'm too (less) verbose) I run the latest DeveloperTools on 10.4.10.

uname -a

Darwin pea 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007;
root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc

gcc -v

Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/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=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)

In the manpage of bpf there is no explaination about BIOCSHDRCMPLT

Change History (9)

comment:1 Changed 17 years ago by nox@…

Milestone: Port Bugs

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

libpcap has been updated to 0.9.8. Can you please check whether the problem still occurs?

comment:3 Changed 17 years ago by ghosthound

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

comment:4 Changed 17 years ago by ghosthound

Status: newassigned

comment:5 Changed 17 years ago by ghosthound

Resolution: worksforme
Status: assignedclosed

If this is still a problem (w/ libpcap @0.9.8, etc.) please re-open the ticket.

comment:6 Changed 17 years ago by jim@…

Resolution: worksforme
Status: closedreopened

At least for me, even 0.9.8 doesn't build.

% sudo port install libpcap
Portfile changed since last build; discarding previous state.
--->  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/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: /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 ./pcap-bpf.c
./pcap-bpf.c: In function 'pcap_inject_bpf':
./pcap-bpf.c:348: error: 'BIOCSHDRCMPLT' undeclared (first use in this function)
./pcap-bpf.c:348: error: (Each undeclared identifier is reported only once
./pcap-bpf.c:348: error: for each function it appears in.)
make: *** [pcap-bpf.o] Error 1

Error: Status 1 encountered during processing.
% uname -a
Darwin foo.example.com 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar  4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386 i386
% gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

comment:7 Changed 16 years ago by blb@…

Keywords: libpcap removed
Port: libpcap added

Both 10.4 (with Xcode 2.5) and 10.5 (with Xcode 3.1.1) should have BIOCSHDRCMPLT defined in /usr/include/net/bpf.h. To anyone for whom this fails, does this file exist, and if it does, is BIOCSHDRCMPLT defined within it?

comment:8 Changed 16 years ago by tobypeterson

Resolution: worksforme
Status: reopenedclosed

comment:9 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.