nmap.
python zenmap) gives
Error in sys.excepthook:
Traceback (most recent call last):
File "zenmap", line 58, in excepthook
import gtk
ImportError: No module named gtk
Original exception was:
Traceback (most recent call last):
File "zenmap", line 149, in <module>
app.run()
File "/Users/david/nmap/zenmap/zenmapGUI/App.py", line 96, in run
self.__run_gui()
File "/Users/david/nmap/zenmap/zenmapGUI/App.py", line 100, in __run_gui
import gtk
ImportError: No module named gtk
.app with python setup.py py2app works, but trying to run the resulting file gives this dialog:
.profile modifications it was supposed to, so I made the changes suggested at http://guide.macports.org/#installing.shell.
sudo port install py25-gtk./zenmap doesn't work, but /opt/local/bin/python2.5 zenmap starts up X11 and shows a dialog saying sqlite3 isn't found.
sudo port install py25-sqlite3
/opt/local/bin/python2.5 zenmap gives this crash:
for a in `port installed | grep '^ ' | sed -e 's/@.*//'`; do port deactivate $a; done to turn off MacPorts so it won't interfere.
jhbuild bootstrap
sudo jhbuild build
$HOME/Source/pkgs, and chose the "force_checkout" option.
./configure in pygobject, had to add /opt/gtk/bin to PATH for pkg-config. sudo make install.
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure in pygtk.
./configure, make, make install in pycairo.
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure CFLAGS=-I/opt/gtk/include LDFLAGS=-L/opt/gtk/lib
/usr/local/bin, /usr/local/include, etc., except for Python packages in /Library/Python/2.5/site-packages.
CFLAGS=-I/usr/local/include/pygtk-2.0 python setup.py build.
/Library/Python/2.5/site-packages, a postinstall script in /usr/local/bin, and data files in /System/Library/Frameworks/Python.framework/\
Versions/2.5/{include,share}. Also silently put pkg-config files in /System/Library/Frameworks/Python.framework/Versions/2.5/lib/pkgconfig.

.app package built. It runs and gives you the "you're not root" dialog, but then the main window doesn't repaint itself and stops responding. (You need to "force quit.")
rm -r /usr/local/{bin,include,lib,liibexec,share}rm -r /Library/Python/2.5/site-packages/*rm -r /System/Library/Frameworks/Python.framework/\
Versions/2.5/{include/*,lib/pkgconfig,share/*}
sudo find / -newerBB /opt/local | tee find-new.log.
sudo port uninstall py25-sqlite3 sqlite3
for a in `port installed | grep '^ ' | sed -e 's/@.*//'`; do port activate $a; done
export PYTHONPATH=/opt/local/lib/python2.5/site-packages:\
/opt/local/lib/python2.5/site-packages/gtk-2.0
./configure --prefix=/usr/local, make, make install in nmap.
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5. Copy it from the MacPorts version. Later I replaced it with the files from the MacPython 2.5.1 distribution.
PATH=/usr/local/bin:$PATH
PYTHONPATH=/usr/local/lib/python2.5/site-packages:$PYTHONPATH
zenmap
sudo port install py25-sqlite3 which brings in sqlite3 as a dependency.
sudo port uninstall -f sqlite3 which uninstalls sqlite3 without uninstalling py25-sqlite3.
./configure, make PYTHON=/opt/local/bin/python2.5, sudo make install.
/usr/local/bin/zenmap works. With sudo too. And nothing weird in the environment.
./bootstrap
. /sw/bin/init.sh
fink selfupdate; choose "rsync".
fink -b install nmap
/sw/bin/zenmap
.app bundlesudo port install py25-zlib (for compressed executable).
sudo install py25-gtk +universal, but that fails due to this bug.
$(LDFLAGS) from the /usr/bin/libtool line.
universal_variant no.
sudo port install py25-gtk +universal
sudo port install py25-sqlite3 +universal
sudo port install py25-zlib +universal
MacPorts-1.6.0.tar.bz2.
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11/bin (the "/usr/X11/bin" is because of this bug.
sudo mkdir /Library/Tcl/macports-universal
./configure --prefix=/opt/local-universal --with-tclpackage=/Library/Tcl/macports-universal
make
sudo make install
sudo vi /opt/local-universal/etc/macports/variants.conf; add +universal.
sudo /opt/local-universal/bin/port selfupdate
mkdir -p ~/macports-sources/ports/python
cp -R /opt/local-universal/var/macports/sources/\
rsync.macports.org/release/ports/python/\
{py25-hashlib,py25-libxml2,py25-numeric,py25-numpy,py25-sqlite3,py25-zlib} \
~/macports-sources/ports/python/
mkdir -p ~/macports-sources/ports/lang
cp -R /opt/local-universal/var/macports/sources/\
rsync.macports.org/release/ports/lang/python25 ~/macports-sources/ports/lang/
ln -s /opt/local-universal/var/macports/sources/rsync.macports.org/release/ports ~/macports-sources/ports.orig
cd ~/macports-sources
diff -ru -x PortIndex ports.orig ports | grep -v '^Only in' > macports-1.6.0-universal.diff
sudo vi /opt/local-universal/etc/macports/sources.conf; add file:///Users/david/macports-sources/ports/ above the rsync line.
cd ~/macports-sources/ports/
sudo /opt/local-universal/bin/portindex
sudo /opt/local-universal/bin/port install py25-gtk py25-sqlite3 py25-zlib
I have a feeling some of the crashes are because my libraries are compiled to be universal on 10.5 only. You have to give arguments like the location of the SDK and -mmacosx-version-min to make it work on 10.4 also. MacPorts has configuration variables to control these (universal_target, universal_sysroot, universal_archs), but they aren't in the 1.6.0 version. I checked out revision 36289 from Subversion.
svn co http://svn.macports.org/repository/macports/trunk/base MacPorts-svn
cd MacPorts-svn
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11/bin
sudo mkdir /Library/Tcl/macports-universal-10.4
./configure --prefix=/opt/local-universal-10.4 --with-tclpackage=/Library/Tcl/macports-universal-10.4 --with-universal-target=10.4 --with-universal-sysroot=/Developer/SDKs/MacOSX10.4u.sdk
make
sudo make install
sudo vi /opt/local-universal-10.4/etc/macports/variants.conf; add +universal.
sudo /opt/local-universal-10.4/bin/port sync ("sync", not "selfupdate", or you will get downgraded to 1.6.0!)
sudo vi /opt/local-universal-10.4/etc/macports/sources.conf; add file:///Users/david/macports-sources/ports/ above the rsync line.
sudo /opt/local-universal-10.4/bin/port install py25-gtk py25-sqlite3 py25-zlib
sudo /opt/local-universal/bin/portindex
sudo /opt/local-universal-10.4/bin/port install py25-gtk py25-sqlite3 py25-zlib
It turns out glib2 needs a patch that I copied from Inkscape. I applied the patch and rebuilt the port index. I had trouble removing just the packages that depend on glib2, so I wiped out my whole installation and reinstalled.
sudo rm -rf /opt/local-universal-10.4
cd ~/MacPorts-svn
sudo make install
sources.conf.
variants.conf.
sudo /opt/local-universal-10.4/bin/port sync
PATH=/opt/local-universal-10.4/bin:/opt/local-universal-10.4/sbin:\
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
sudo /opt/local-universal-10.4/bin/port -v install py25-gtk py25-sqlite3 py25-zlib
ditto -arch ppc program program-ppc ./program-ppc
cups-config.
py25-macholib-devel.
--x-includes and --x-libraries.
.dmg files are disk images, basically a compressed bundle that gets mounted as a disk. This is a container around a package. It's the preferred container format. Here's a command line for building a .dmg from an .app directory.
.pkg files are installers run by the Installer application. This is known as a "managed install."
.app files are single-component packages, really just a directory recursively copied to the filesystem. This is known as "manual install." It's the preferred way to deliver applications. This is also known as a "bundle," a directory with a specific hierarchical structure.
.app.
.dmg.
Info.plist and creating icons.
Nmap seemed not to be working at first, not recording received packets. Ping scan didn't work. However, it worked if tcpdump was being run simultaneously. Wireshark works too, and running Wireshark makes Nmap work (only while a live capture is running).
/Developer/usr/bin was removed from my PATH, so make and gcc didn't work. When I added it back, I couldn't compile:
configure:2433: checking for C compiler default output file name configure:2455: gcc conftest.c >&5 ld: library not found for -lcrt1.10.5.o collect2: ld returned 1 exit status
After recompiling with a newly installed Xcode, I get the hang problem that has been described.