Brand new, clean install of MacPorts 1.5 on a Tiger 10.4.10 server. The command line I used:
sudo port -v install ntop
Lots of bits and pieces configure and compile for about 30 minutes, and it all ends with this:
gcc -dynamiclib -undefined dynamic_lookup -o .libs/libntop-3.3.dylib .libs/address.o .libs/argv.o .libs/dataFormat.o .libs/fcUtils.o .libs/getopt.o .libs/getopt1.o .libs/globals-core.o .libs/hash.o .libs/iface.o .libs/initialize.o .libs/l7.o .libs/leaks.o .libs/ntop.o .libs/pbuf.o .libs/database.o .libs/plugin.o .libs/prefs.o .libs/protocols.o .libs/sessions.o .libs/term.o .libs/util.o .libs/utildl.o .libs/traffic.o .libs/vendor.o .libs/version.o .libs/ntop_darwin.o /opt/local/lib/libart_lgpl_2.dylib /opt/local/lib/libz.dylib /opt/local/lib/libpng12.dylib /opt/local/lib/libfreetype.dylib -L/opt/local/lib -L/usr/local/lib -lpthread -lc -lssl /opt/local/lib/librrd_th.dylib /opt/local/lib/libgdbm.dylib -L/usr/lib -lnetsnmp -lcrypto -lz -lm -lwrap -lpcap -install_name /opt/local/lib/libntop-3.3.dylib
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
So I Google the error, read around a bit, and try this at the command line (per the suggestion of many sites):
export MACOSX_DEPLOYMENT_TARGET=10.4
It makes no difference. The compile still fails with the error:
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
As a non-developer, I have no real idea what this error means or how to correct it. As I’ve stated before, it was my understanding that MacPorts was intended to make software compilation like this simple for those of us who are non-developers.
This kind of problem eventually happens every damn time I use MacPorts (and previously, Fink). Clean installs. Simple compilation of a common app. Utter failure and no real way to fix it.
The other surprising part of all this is that I am completely unable to find any kind of installer package for ntop 3.3 Is there really no alternative to MacPorts out there for this kind of useful software? I’m extremely pissed because MacPorts simply doesn’t work, and hasn’t and I keep getting sucked back into it because it appears to be the only way to install some applications that are very useful.
MacPorts people, wake the hell up. Fix your software. This is completely unacceptable. Why should it be this hard and this frustrating for me to install software with your port system?
PS: I just checked my own site, and the last time MacPorts pissed me off, it was for the same reason: An environment variable that was set wrong which prevents the software from compiling. Do you not test? Do you not read feedback from your users? Do your users not provide feedback? How does this kind of error make it to a production product? My server is nothing special, with no odd software or configuration, developer tools properly installed, the first MacPorts ever installed on this machine, and it’s broken. Unacceptable.

My .Mac Web Gallery
October 21st, 2007 at 8:23 pm
As we’ve discussed before… its not MacPorts or even the developer’s of NTOPs problem. It would be impossible to test everyone configuration of every package they have in the ports tree. My recommendation…
sudo port -v selfdupate
and then try
sudo port -v install ntop
or even
sudo port -v install ntop +server
if that does not work.. they maybe try the mailing list
http://lists.macosforge.org/mailman/listinfo/macports-users
or contact the maintainer directly
port info ntop
Good thing you don’t use Linux… your blood pressure would be through the roof
October 21st, 2007 at 8:41 pm
I have to disagree. This is the fault of MacPorts. I understand not all possible combinations of OS / chip / developer tools can be tested. But in my case, I have a pretty basic install of the most recent server OS with a basic install of the developer tools and a clean install of MacPorts. If something like ntop, a network app that is very likely to be installed on a server, doesn’t compile correctly in that most basic of configurations, where does it install? And why is this now the second app to fail for the same reason? That seems indicative of a larger issue to me.
Mailing lists are a piss poor support method. I have to go to the trouble of subscribing to the list, and then hope I get a response that is actual help and not some lippy 20-something with a superiority complex. Or someone will suggest that I try the fix I’ve already tried (and that I stated I’ve tried), and then there will be no further responses to my inquiry. I’ve been there before.
I’ve already run selfupdate immediately after installing ntop. Your third suggestion, adding +server to the end, failed for the same reason.
What I will do is contact the maintainer.
As for Linux, the reason I use a Mac is exactly because I don’t want to compile this stuff by hand. I have neither the time nor the patience, and MacPorts is supposed to be a kind of shorthand way to accomplish those Linux-y things on the Mac.
October 22nd, 2007 at 3:38 pm
[...] 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 [...]