我在为错误的CPU架构构建一些端口时遇到了一些其他问题,我正在尝试将所有东西重新构建为通用的。
我已经完成了:sudo port upgrade outdated +universal,它运行了很长时间,似乎安装了很多我不需要的东西。但它并没有失败。
然后,我尝试使用之前遇到问题的一个库:
$ sudo port install cairo +universal
Password:
---> Building libpixman
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for libpixman is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libpixman/libpixman/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade libpixman failed
To report a bug, see <http://guide.macports.org/#project.tickets>Log is here http://hpaste.org/56449 (OSX 10.6.8,英特尔酷睿i5)
发布于 2012-01-15 03:08:47
问题是您已经指定了+universal,所以它试图构建32位和64位架构(x86_64和i386)……
:info:build ---> Building libpixman for architecture x86_64
...and then later...
:info:build ---> Building libpixman for architecture i386但在32位构建中失败
:info:build ld: warning: in /opt/local/lib/libpng14.dylib, file was built for unsupported file format which is not the architecture being linked (i386)它在32位构建中失败了,因为libpng是为64位构建的,不能与32位版本链接。
如果你不需要一个通用的构建,删除+universal,这个问题就会消失!
如果你确实需要一个通用的构建...好吧,macports应该能解决这个问题。我认为问题在于libpixman并没有声明对任何东西的依赖(libpng似乎是一个可选的dep)。Macports不能知道它必须构建一个32位版本的libpng。不管怎样,这是我最好的猜测。
这是exactly your bug。不幸的是,维护者的结论是您应该手动强制将libpng重新编译为32位。这是一个糟糕的解决方案,因为它打破了gtk2甚至更多的自动通用构建。真正的问题是缺少依赖,Macports无法知道在没有依赖的情况下如何重建libpng。
发布于 2012-01-15 03:07:17
sudo port upgrade outdated +universal只会升级自安装后发生更改的端口,因此如果端口没有更改,则不会安装/重新编译它。
第一步并不是严格要求的,但当您有多个版本的特定端口时,会消除一些问题。此步骤是删除所有非活动端口sudo port uninstall inactive
要重新编译所有端口,请使用sudo port upgrade --force installed +universal,关键字installed将获得所有端口,并且-force将确保重新编译所有端口。
为了使以后的工作更容易,您应该更改macports配置以构建通用的,而不必在port命令上执行此操作。为此,您可以将+universal添加到/opt/local/etc/macports/variants.conf中
https://stackoverflow.com/questions/8864477
复制相似问题