macport 的问题
我还遇到了一些其他问题,一些端口为错误的 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)
I was having some other problems with some ports building for the wrong CPU architecture, and I'm trying to rebuild everything as universal.
I've done: sudo port upgrade outdated +universal
, which ran for a long time, and seemed to install a lot of stuff I didn't need. But it didn't fail.
Then I tried with one of the libraries I was previously having problems with:
$ 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, Intel Core i5)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
sudo port Upgrade outdated +universal
只会升级自安装以来已更改的端口,因此如果端口未更改,则不会安装/重新编译。第一步并不是严格必需的,但当您拥有特定端口的多个版本时,可以消除一些问题。此步骤是删除所有不活动的端口
sudo port uninstall inactive
要重新编译所有端口,请使用
sudo portupgrade --forceinstalled+universal
关键字installed将获取您的所有端口和-force 将确保所有内容都得到重建。为了使将来的事情变得更容易,您应该更改 macports 配置以构建通用,而不必在 port 命令上执行此操作。您可以通过将 +universal 添加到 /opt/local/etc/macports/variants.conf 来完成此操作
sudo port upgrade outdated +universal
will only upgrade ports which have changed since you installed them so if a port has not changed it will not be installed/recompiled.The first step is not strictly required but will remove some issues when you have multiple version of a particular port. This step is to remove all inactive ports
sudo port uninstall inactive
To recompile all your ports use
sudo port upgrade --force installed +universal
the keyword installed will get all your ports and the -force will make sure all are rebuilt.To make things easier in the future you should change the macports configuration to build universal without having to do that on the port command. You do this by adding +universal to /opt/local/etc/macports/variants.conf
问题是您已经指定了 +universal,因此它尝试为 32 位和 64 位架构(x86_64 和 i386)构建...
但在 32 位构建中失败
它在 32 位中失败构建因为 libpng 是为 64 位构建的,无法与 32 位版本链接。
如果您不需要通用构建,请删除
+universal
,问题就会消失!如果您确实需要通用构建...那么,macports 应该能解决。我相信问题是 libpixman 没有声明对任何东西的依赖关系(libpng 似乎是一个可选的 dep)。 Macports 不知道它必须构建 32 位版本的 libpng。无论如何,这是我最好的猜测。
这就是正是您的错误。不幸的是,维护者的结论是您应该手动强制将 libpng 重新编译为 32 位。这是一个糟糕的解决方案,因为它破坏了 gtk2 及更高版本的自动化通用构建。真正的问题是缺少依赖项,Macports 无法知道在没有它的情况下重建 libpng。
The problem is you've specified
+universal
, so it's trying to build for both 32 and 64 bit architectures (x86_64 and i386)...but failing in the 32 bit build
It's failing in the 32 bit build because libpng is built for 64 bit and can't link with the 32 bit version.
If you don't need a universal build, remove the
+universal
and the problem should go away!If you do need a universal build... well, macports should figure it out. I believe the issue is that libpixman does not declare dependencies on anything (libpng appears to be an optional dep). Macports can't know it has to build a 32 bit version of libpng. That's my best guess anyway.
Here is exactly your bug. Unfortunately the maintainer's conclusion was that you should manually force recompile libpng as 32 bit. This is a crappy solution as it breaks automated universal builds up to gtk2 and beyond. The real problem is the missing dependency and that Macports can't know to rebuild libpng without it.