so a few glitches upgrading to snow leopard recently.
a couple programs didn’t work and needed to be re-installed (nambu, parallels, etc), a few issues with macports …
$ port --version
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: mach-o, but wrong architecture
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)
also when trying to do a selfupdate …
$ sudo port selfupdate
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: mach-o, but wrong architecture
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: mach-o, but wrong architecture
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: mach-o, but wrong architecture
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)
so we can try to re-install macports from source, should fix our problems …
$ svn co http://svn.macports.org/repository/macports/trunk/base/ macports-svn
...
$ cd macports-svn
$ ./configure && make && sudo make install;
checking build system type... i386-apple-darwin10.0.0
checking host system type... i386-apple-darwin10.0.0
checking target system type... i386-apple-darwin10.0.0
checking MacPorts version... 1.8.99
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... no
checking Mac OS X version... 10.6
checking Xcode version... 3.1
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/pjkix/src/macports-svn':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
even more troubling news …
$ echo $PATH
/opt/local/lib/mysql5/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
ok lets find gcc … apparently we need to re-init locate db in snow leopard as well …
$ locate gcc
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
looks like its sorta here
$ /Developer/usr/bin/gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5484~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=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5484)
so even though i can run xcode.app it appears that i must re-install it from the snow leopard disc or install the iphone sdk version from apple …
ok so now we got gcc again … back to macports …
$ which gcc
/usr/bin/gcc
$ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)
ok so macports is back working, lots of things out of date … also apache2 has some issues with ssl.
a quick uninstall and re-install fixes this …
need to reinstall ncurses and readline as well as db44, db46 , gawk, libiconv, … basically repeate the following for each that has issues.
$ sudo port -f uninstall ncurses
$ sudo port clean ncurses
$ sudo port install ncurses
if you have a lot of installed mac ports it might be easier to just start from a fresh /opt/local by moving the old files out of the way and re-installing the ports you need.
seem to have problems with libemf, libvorbis as well …
if you see something like the following in the error output, it probably mean a dependancy is installed but needs to be updated first, so you might be able to upgrade it or need to uninstall, clean, re-install which seems to solve the problem
ld: symbol(s) not found
this command might also be usefull if variants are installed but need to be rebuilt first for x86_64
sudo port -fu upgrade --enforce-variants outdated
also a list of macport issues … here http://trac.macports.org/wiki/SnowLeopardProblems and here http://trac.macports.org/wiki/snc/snowleopard. also good info here http://trac.macports.org/wiki/Migration
11 Comments
Thanks… A great article! Had same trouble. Very helpful!
Thanks for this great article, Very helpful too;-)
Wow! Great help. I love Snow Leopard, but sometimes it’s a little bewildering. Vielen Dank!
Cheers dude, you saved me from a frustrated hour with this info
thank you very much for ur professional help…
Thanks for the info. MacPorts is a tedious bloody thing, and after looking at all the fixes and packages that are required, I realised why I got rid of it in the first place off my machine: buggy, tired old versions of software, and over the top dependency/version checking. I’m back to DIY compilation in /usr/local with the original software source (which usually includes Mac-ready compile options)!
Too any newbs out there: be prepared for a lot of frustration with MacPorts – it just doesn’t work very well.
Pete, you may also try to reinstall MacPorts from scratch.
http://codesnippets.joyent.com/posts/show/2373
Pre-compiled binaries that get installed in /usr/local can be found here:
http://rudix.org
Thanks for the article. VERY helpful!
Merci, la réinstallation a suffit pour résoudre le problème et pouvoir installer la 1.9
Thanks for the tips. For the life of me, I can’t exactly remember what sequence of uninstall and cleans I had to do. I had to throw in a reinstall of macports as well. But in the end it worked. For some strange reason, one of the source header files for ncurses (ncurses_def.h, I think) was missing a terminating #endif. In the end, I think I had to (1) force uninstall all versions of ncurses and gawk that I had, (2) that wrecked macports itself so I couldn’t run the port command so I reinstalled macports from the .dmg file, (3) I installed ncurses and gawk, (4) I was trying to install subversion and I think that worked (5) but the svn command wouldn’t work because neon was broken so (5) I upgraded neon. I think *then* subversion finally worked.
But don’t ask about postgresql. Still wrestling with xslt problems..
Spoke too soon. Also had to uninstall, clean and reinstall neon and xslt. I had an older installation of mac ports on Leopard, and I upgraded to Snow Leopard rather than doing a clean install. So I therefore started with outdated macports libraries. I think I just stumble on them when I luck into them and muck around uninstalling, cleaning and reinstalling.