Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#28039 closed defect (fixed)

libnet11 @1.1.5 build failure

Reported by: spammedonline@… Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: opendarwin.org@…
Port: libnet11

Description

Fresh install of MacPorts on a Mac Pro running Snow Leopard 10.6.6 with Developer Tools 3.2 installed.

Running "sudo port install libnet11" produces the following error:

<snip>
--->  Configuring libnet11
--->  Building libnet11
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for libnet11 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_libnet11/main.log
Error: Status 1 encountered during processing.
<snip>

main.log contains the following:

<snip>
:info:build libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -pipe -O2 -arch x86_64 -c libnet_write.c  -fno-common -DPIC -o .libs/libnet_write.o
:info:build libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -pipe -O2 -arch x86_64 -c libnet_link_bpf.c  -fno-common -DPIC -o .libs/libnet_link_bpf.o
:info:build libnet_link_bpf.c: In function 'libnet_open_link':
:info:build libnet_link_bpf.c:127: error: 'BIOCVERSION' undeclared (first use in this function)
:info:build libnet_link_bpf.c:127: error: (Each undeclared identifier is reported only once
:info:build libnet_link_bpf.c:127: error: for each function it appears in.)
:info:build libnet_link_bpf.c:147: error: 'BIOCSETIF' undeclared (first use in this function)
:info:build libnet_link_bpf.c:157: error: 'BIOCGDLT' undeclared (first use in this function)
:info:build make[1]: *** [libnet_link_bpf.lo] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -pipe -O2 -arch x86_64 -c libnet_resolve.c -o libnet_resolve.o >/dev/null 2>&1
:info:build libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -pipe -O2 -arch x86_64 -c libnet_write.c -o libnet_write.o >/dev/null 2>&1
:info:build make: *** [all-recursive] Error 1
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_libnet11/work/libnet-1.1.5" && /usr/bin/make -j8 all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
<snip>

If I cd to the work directory for libnet-1.1.5 (not libnet11...curious) and run make from there, I get

<snip>
Making all in src
/bin/sh ../libtool --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include  -I/opt/local/include  -pipe -O2 -arch x86_64 -c -o libnet_link_bpf.lo libnet_link_bpf.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -pipe -O2 -arch x86_64 -c libnet_link_bpf.c  -fno-common -DPIC -o .libs/libnet_link_bpf.o
libnet_link_bpf.c: In function 'libnet_open_link':
libnet_link_bpf.c:127: error: 'BIOCVERSION' undeclared (first use in this function)
libnet_link_bpf.c:127: error: (Each undeclared identifier is reported only once
libnet_link_bpf.c:127: error: for each function it appears in.)
libnet_link_bpf.c:147: error: 'BIOCSETIF' undeclared (first use in this function)
libnet_link_bpf.c:157: error: 'BIOCGDLT' undeclared (first use in this function)
{standard input}:unknown:FATAL:can't create output file: .libs/libnet_link_bpf.o
make[1]: *** [libnet_link_bpf.lo] Error 1
make: *** [all-recursive] Error 1
<snip>

The .libs directory does exist, and contains several other .o files.

The following other ports are currently installed (as reported by "port installed"):

  autoconf @2.68_1 (active)
  automake @1.11.1_0 (active)
  expat @2.0.1_1 (active)
  gettext @0.18.1.1_2 (active)
  gperf @3.0.4_0 (active)
  help2man @1.38.4_0 (active)
  libiconv @1.13.1_0 (active)
  libtool @2.4_0 (active)
  m4 @1.4.15_2 (active)
  ncurses @5.7_1 (active)
  ncursesw @5.7_1 (active)
  p5-locale-gettext @1.05_3 (active)
  perl5 @5.8.9_0 (active)
  perl5.8 @5.8.9_3 (active)

These were installed as part of the installation process for yersinia. The install process failed at libnet11.

Attachments (1)

main.log (59.9 KB) - added by spammedonline@… 14 years ago.
main.log

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by spammedonline@…

By the way, libnet_link_bpf is appearently a packet filter. The /dev directory on the Mac Pro contains the devices bpf0-bpf3.

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

Keywords: libnet11 yersinia removed
Owner: changed from macports-tickets@… to snc@…

Please attach the complete main.log file. You may have snipped something important in your abbreviated output above. libnet11 installs fine for me on Snow Leopard.

comment:3 Changed 14 years ago by nerdling (Jeremy Lavergne)

I'm curious if this is a case of too many parallel make jobs, and upstream only expected two at most.

Changed 14 years ago by spammedonline@…

Attachment: main.log added

main.log

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Works for me with 4 jobs.

comment:5 Changed 14 years ago by spammedonline@…

I found a workaround. libnet_link_bpf.c had two includes for bpf.h. One pointed to net/bpf.h and the other simply to bpf.h. I was able to work around the problem by commenting out the one that pointed to the net directory. It's installed now.

comment:6 Changed 14 years ago by spammedonline@…

I finally got yersinia installed, but I ran into a problem similar to this while trying to install libpcap. One of its files, pcap-bpf.c, had to be edited to point to an alternate bpf.h file, one that supplies the declaration for BIOCVERSION. The versions of bpf.h that these two installs were trying to use appearently did not supply it. Running "sudo find / -name bpf.h -exec grep "BIOCVERSION" '{}' \; -print" on my hard drive uncovered about 8 instances of this file in various places, and some of them did lack the BIOCVERSION declaration.

It seems that the root cause of the problem here and with libpcap is a path problem. For the record, the one for my box is:

PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

comment:7 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: opendarwin.org@… added
Status: newassigned

Adding libpcap maintainer so he can see how to modify his Portfile as well.

comment:8 Changed 14 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: assignedclosed

Fixed in r75553.

comment:9 Changed 14 years ago by jmroot (Joshua Root)

Why is this change necessary? It already worked for Ryan and me, so what is different about the reporter's system and is it something that we want to support?

BTW, regarding comment:6, port sets its own PATH, so that's unlikely to be it.

comment:10 in reply to:  9 Changed 14 years ago by spammedonline@…

Replying to jmr@…:

Why is this change necessary? It already worked for Ryan and me, so what is different about the reporter's system and is it something that we want to support?

BTW, regarding comment:6, port sets its own PATH, so that's unlikely to be it.

I think a more thorough analysis would be required to answer that question. For the record, my Mac Pro is a recent purchase. I used the migration assistant in OS X to move my files and apps over from my G4, which is running the latest version of Leopard. I did not did not have MacPorts installed on it. It did have fink though.

Note: See TracTickets for help on using tickets.