At the suggestion of my friend Chris, who posted a comment to my most recent MacPorts complaint, I contacted the maintainer of the post, Mark D. After a few e-mails between each other discussing the issue, Mark instructed me to add the following two lines to the end of /opt/local/var/macports/sources/
rsync.macports.org/release/ports/net/ntop/Portfile :
build.env-append MACOSX_DEPLOYMENT_TARGET="10.3"
destroot.env-append MACOSX_DEPLOYMENT_TARGET="10.3"
I added those lines and ntop finally compiled correctly… but it still didn’t work. Something about a GDBM error, which I didn’t record. So I removed MacPorts, reinstalled it, re-ran the ntop install, and it failed this time compiling Perl 5.8. Just to be super duper sure, I re-ran the install one more time and it finally installed a working ntop and all dependencies, as if Perl had never been a problem. What a load of crap that I have to go to such trouble.
I do want to thank ntop port maintainer Mark D. for his help. In his e-mail, Mark stated that he had not tested a compile of ntop on a PowerPC system because he has an Intel Mac, and that the necessary changes will be added to MacPorts and available in a few hours.
The error, for those who don’t know, and the Google page crawler, was
ld: flag: -undefined dynamic_lookup can't be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
gnumake[2]: *** [libntop.la] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
The whole point of attempting to compile ntop to begin with is because I’d like to create a sort of network appliance that I can plug into customer networks, consisting of a Mac mini and ntop, that would monitor and record their traffic for a certain amount of time and assist with troubleshooting and other issues. I’ll likely keep plugging away with MacPorts and compile an mpkg with ntop and its dependencies as universal binaries. However, I can’t recommend using MacPorts to install software on any kind of production server - it’s just too flaky. What I would recommend is to have a second machine to create mkpg files containing dependencies, and compiling those as universal binaries for storage and installation elsewhere, as I stated that I will do.

My .Mac Web Gallery
January 29th, 2008 at 2:45 pm
Hi Aaron,
I followed your instruction but i still get an error
—-
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_ntop/work/ntop-3.3″ && gnumake all ” returned error 2
Command output: cd . && /bin/sh ./missing –run echo
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
gnumake all-recursive
Making all in .
/bin/sh ./libtool –tag=CC –mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -g -Os -DBUILD=112 -DMACOSX_DEPLOYMENT_TARGET=10.5 -F/System/Library/PrivateFrameworks/ -F/System/Library/Frameworks/ -pipe -Udarwin9 -Ddarwin9=darwin9 -I. -I/usr/local/include -I/opt/local/include -DDARWIN -I/usr/local/include -g -no-cpp-precomp -O2 -I/opt/local/include -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-common -DPIC -MT address.lo -MD -MP -MF .deps/address.Tpo -c -o address.lo address.c
mkdir .libs
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -g -Os -DBUILD=112 -DMACOSX_DEPLOYMENT_TARGET=10.5 -F/System/Library/PrivateFrameworks/ -F/System/Library/Frameworks/ -pipe -Udarwin9 -Ddarwin9=darwin9 -I. -I/usr/local/include -I/opt/local/include -DDARWIN -I/usr/local/include -g -no-cpp-precomp -O2 -I/opt/local/include -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-common -DPIC -MT address.lo -MD -MP -MF .deps/address.Tpo -c address.c -fno-common -DPIC -o .libs/address.o
In file included from ntop.h:484,
from address.c:21:
globals-structtypes.h:103: error: two or more data types in declaration specifiers
globals-structtypes.h:103: warning: useless type name in empty declaration
gnumake[2]: *** [address.lo] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
Error: Status 1 encountered during processing.
—–
I looked at the portfile and I see the following
# $Id: Portfile 30175 2007-10-22 15:46:34Z markd@macports.org $
PortSystem 1.0
name ntop
version 3.3
categories net
maintainers markd
description network traffic probe
platforms darwin
long_description ntop is a network traffic probe that shows the network \
usage, similar to what the popular top Unix command does.
homepage http://www.ntop.org/
master_sites sourceforge
checksums md5 a0e52a85587c8a5519d822d04862dab4
depends_build port:gawk
depends_lib port:libpcap \
port:gd2 \
port:libpng \
port:gdbm \
port:rrdtool
configure.cflags-append -I${prefix}/include
configure.args –with-localedir=${prefix}/share/locale \
–mandir=${prefix}/share/man
build.env-append MACOSX_DEPLOYMENT_TARGET=”10.5″
destroot.env-append MACOSX_DEPLOYMENT_TARGET=”10.5″
use_autoconf yes
build.type gnu
destroot.target install install-data-as
variant server {
# Create a startupitem to start/stop the server
startupitem.create yes
startupitem.start “${prefix}/share/${name}/ntop.sh”
startupitem.stop “${prefix}/share/${name}/ntop.sh”
}
pre-configure {
system “cd ${worksrcpath} && ./autogen.sh –noconfig”
}
post-destroot {
xinstall -m 755 -o nobody -d ${destroot}/${prefix}/var/ntop \
${destroot}/${prefix}/var/ntop/rrd
system “cd ${destroot}${prefix}/var/ntop && \
touch addressQueue.db dnsCache.db macPrefix.db \
ntop_pw.db prefsCache.db rrd/.turd”
system “chown -R nobody ${destroot}${prefix}/var/ntop”
xinstall -m 755 -d ${destroot}${prefix}/etc/ntop
xinstall -m 755 \
${worksrcpath}/packages/FreeBSD-ports/net/ntop/files/ntop.conf.sample \
${destroot}${prefix}/etc/ntop/ntop.conf
reinplace “s|%%DBDIR%%/ntop|${prefix}/var/ntop|g” \
${destroot}${prefix}/etc/ntop/ntop.conf
reinplace “s|#–interface sis0|–interface en0|g” \
${destroot}${prefix}/etc/ntop/ntop.conf
if { [variant_isset server] } {
xinstall -m 755 ${portpath}/${filesdir}/ntop.sh \
${destroot}${prefix}/share/ntop/ntop.sh
reinplace “s|__PREFIX__|${prefix}|g” \
${destroot}${prefix}/share/ntop/ntop.sh
}
}
platform darwin 6 {
patchfiles patch-darwin6-util.c
}
so I see the line you where asked to add is already there, i tried asdding your line at the end with the same result so I instead changed the 10.3 to 10.5 being that I am in Leopard.
Any thoughts ?