Snow Leopard にアップグレードしてから特にトラブル無く使っていたのですが、MacPorts が使えなくなっている事に気づきました。
そんな情報もあったのでそのうち試してみなければとはおもっていましたが…
こんなエラーが表示されています。
ちょっと検索してみましたが公式な手順としてこんな対処がありましたmacbook:~ nova$ port 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)
- XcodeとMacPortsをインストールしなおす(上書きで良いのか一度削除してからなのかは不明。おそらく上書きで良いはず。ダメだったら削除してやり直せるし…)
- MacPortsは動くようになるのでインストール済の一覧をテキストファイルに書き出しておく
port installed > myports.txt
- MacPortsでインストールした物を全て削除する
sudo port clean installed sudo port -f uninstall installed
- 書き出しておいたテキストファイルを見ながら必要な物をMacPortsでインストールし直す
sudo port install portname +variant1 +variant2 ...
いきなりやる気が失せる面倒さ!!
仕方ないので言われた通りXcodeとMacPortsを上書きインストールしたところ
動きそうです。macbook:~ nova$ port MacPorts 1.8.1 Entering interactive mode... ("help" for help, "quit" to quit) [Users/nova] > quit Goodbye
.bash_profile にコマンドへのパスが追加されていますが、manのパスは追加されていません
次の手順、今インストールされている物のリストを書き出します
実際に使っているのはごく僅かなのですが、依存するパッケージが多く242のパッケージがインストールされています…macbook:~ nova$ port installed > ~/Documents/myports.txt
次の手順はアンインストールです。
おかしな事にならなければ良いんですが…
アンインストールが出来たら念のため再起動します。一応、念のため。
必要ないかもしれませんがMacPortsそのもののアップデートをしておきます(MacPorts でよく使うコマンド を参照)
…エラーが出ますねぇ
仕方がないのでMacPortsをアンインストールすることに
方法は公式の情報に従って行います
/opt/local は消していいのか少々迷いましたがこれは MacPorts だけが使っている模様sudo rm -rf /opt/local \ /Applications/MacPorts \ /Applications/DarwinPorts \ /Library/Tcl/macports1.0 \ /Library/Tcl/darwinports1.0 \ /Library/LaunchDaemons/org.macports.* \ /Library/StartupItems/DarwinPortsStartup \ /Library/Receipts/MacPorts*.pkg \ /Library/Receipts/DarwinPorts*.pkg \ ~/.macports
そういえば以前もコレで悩んだ覚えが…
一歩間違うと全て消えてしまうので慎重に…
再度 MacPorts をインストールしてアップデート
…まだエラーが出る orz
デバッグ情報付きで実行してみたらrsyncがタイムアウトしていた模様
っていうか最初からそうしろ、自分!!
…会社のファイアウォールの設定が変わったからか!!
というわけでおそらくMacPortsのアンインストール必要なかったですね^^;
遅いけど別回線をつかってやってみたら正常に動作しました。
さて、手順2で作成したテキストファイルを見ながら必要なパッケージをインストールしていきます
まずはSubversionから
~/.bash_profile の最後に設定を追加しろと出てるのでそれは手動で追加しましたsudo port install subversion +bash_completion +unicode_path
次にネイティブ動作するGIMPを…sudo port install gimp-app +quartz---> Installing bash-completion @1.0_3 To use bash_completion, add the following lines at the end of your .bash_profile: if [ -f /opt/local/etc/bash_completion ]; then . /opt/local/etc/bash_completion fi
やはり
と、この部分は必要なら手作業でやれといわれる部分があります。################################################################################################# # Startup items have been generated that will aid in # starting dbus with launchd. They are disabled # by default. Execute the following command to start them, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist # launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist ##################################################################################################
さらにxmlcatmgrも色々と言ってきます。
###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.1.2/catalog.xml". ###################################################################### ###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.2/catalog.xml". ###################################################################### ###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.3/catalog.xml". ###################################################################### ###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.4/catalog.xml". ###################################################################### ###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.5/catalog.xml". ###################################################################### ###################################################################### # As MacPorts does not currently have a post-deactivate hook, # you will need to ensure that you manually remove the catalog # entry for this port when you uninstall it. To do so, run # "xmlcatmgr remove nextCatalog /opt/local/share/xsl/docbook-xsl/catalog.xml". ######################################################################
多すぎ^^;
で、順調に進んでいたと思ったらエラー来ましたてなわけで、MacPorts自体は問題なく動くようになりましたが---> Fetching tk ---> Attempting to fetch tk8.5.7-src.tar.gz from http://downloads.sourceforge.net/tcl ---> Verifying checksum(s) for tk ---> Extracting tk ---> Configuring tk ---> Building tk Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix" && /usr/bin/make -j2 all " returned error 2 Command output: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1033: warning: implicit declaration of function 'ShowControl' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1037: warning: implicit declaration of function 'SetControlVisibility' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1038: warning: implicit declaration of function 'Draw1Control' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1044: warning: implicit declaration of function 'KillPicture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1044: error: 'union <anonymous>' has no member named 'picture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: In function 'SetupBevelButton': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1107: error: 'union <anonymous>' has no member named 'picture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1107: warning: implicit declaration of function 'OpenCPicture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1108: error: 'union <anonymous>' has no member named 'picture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1134: warning: implicit declaration of function 'ClosePicture' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: At top level: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1238: error: expected declaration specifiers or '...' before 'ControlUserPaneBackgroundProcPtr' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: In function 'SetUserPaneSetUpSpecialBackgroundProc': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1240: error: 'ControlUserPaneBackgroundUPP' undeclared (first use in this function) /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1240: error: (Each undeclared identifier is reported only once /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1240: error: for each function it appears in.) /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1240: error: expected ';' before 'myControlUserPaneBackgroundUPP' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1242: error: 'myControlUserPaneBackgroundUPP' undeclared (first use in this function) /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1242: warning: implicit declaration of function 'NewControlUserPaneBackgroundUPP' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1242: error: 'upp' undeclared (first use in this function) /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: In function 'UserPaneDraw': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1271: warning: implicit declaration of function 'GetControlReference' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1275: warning: implicit declaration of function 'GetPort' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1276: warning: implicit declaration of function 'GetControlBounds' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1278: warning: implicit declaration of function 'EraseRect' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: At top level: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1301: error: expected declaration specifiers or '...' before 'ControlBackgroundPtr' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c: In function 'UserPaneBackgroundProc': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.7/unix/../macosx/tkMacOSXButton.c:1305: error: 'info' undeclared (first use in this function) make: *** [tkMacOSXButton.o] Error 1 Error: The following dependencies failed to build: gimp2 gegl babl librsvg libgsf gnome-vfs gconf gtk2 atk gtk-doc gnome-doc-utils py26-libxml2 python26 tk rarian getopt intltool gnome-common p5-getopt-long p5-pathtools p5-scalar-list-utils cairo fontconfig freetype libpixman libpng xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto jasper jpeg pango Xft2 shared-mime-info tiff orbit2 libidl policykit gnome-mime-data libbonobo w3m boehmgc ffmpeg XviD dirac cppunit faac mp4v2 faad2 gmake lame libogg libsdl-devel libtheora libvorbis schroedinger liboil x264 yasm graphviz gd2 xpm urw-fonts xorg-libXaw xorg-libXext xorg-libXmu xorg-libXt xorg-libsm xorg-libice libopenraw boost boost-jam libspiro lua openexr ilmbase gsed lcms libexif libgnomeui gnome-icon-theme hicolor-icon-theme icon-naming-utils p5-xml-simple p5-xml-namespacesupport p5-xml-sax gnome-keyring libgcrypt libgpg-error libtasn1 libbonoboui libglade2 libgnome esound audiofile libgnomecanvas libmng libwmf poppler openjpeg poppler-data py25-gtk py25-cairo py25-numpy fftw-3 py25-nose py25-setuptools python25 py25-gobject Error: Status 1 encountered during processing.
ネイティブ環境で動くGIMPはダメでした orz