macports


Problems with macports


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)
The problem is you've specified +universal, so it's trying to build for both 32 and 64 bit architectures (x86_64 and i386)...
:info:build ---> Building libpixman for architecture x86_64
...and then later...
:info:build ---> Building libpixman for architecture i386
but failing in the 32 bit build
: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)
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.
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

Related Links

Macports warning when installing automake: Warning: Deactivate forced. Proceeding despite dependencies
Macports Selfupdate
How to recompile macport with additional ./configure flag?
Macport self update failed
Is it possible to use MacPorts to distribute custom software?
How do I make libgc work in Mac OS X?
500 OOPS: vsftpd: not configured for standalone, must be started from inetd
Mac Ports Update Failing
Macports ncurses error when trying to upgrade [closed]
macports: list out my own ports
why does macports “--set ipython ipython32” fail?
Prevent MacPorts from installing pre-built package?
Wine is extremely slow, how do I find out why?
Problems with macports
Where can I view tools or packages availble in Homebrew
See what has been installed via MacPorts

Categories

HOME
visual-studio
apache-nifi
list
clearcase
dafny
plaid
celery
google-play-services
cypher
openflow
iptables
angular-meteor
phpseclib
anchor
jpa-criteria
clickable-image
driver
amazon-emr
complexity-theory
corona
temperature
google-tasks-api
google-sites
pickle
tfsbuild
scheduled-tasks
amazon-mws
jitsi
error-logging
fluent-migrator
quantitative-finance
android-service
uilocalnotification
jackrabbit-oak
math.js
laravel-4.2
javax.persistence
openbr
osx-lion
mongoengine
bean-validation
busboy
mv
unification
utf
data-uri
vungle-ads
zend-form
doctrine-extensions
autorelease
webvtt
mura
nslayoutconstraint
jsonix
bilinear-interpolation
gcloud-node
ftp-client
nsdata
xcopy
phpquery
smart-tv
bjam
wso2ml
google-gdk
artisan
ipod
webproject
html-escape-characters
comctl32
utf8-decode
tabris
storing-data
communicate
git-reset
roxy-fileman
django-sites
strdup
colon
codahale-metrics
quickgraph
google-code-prettify
aero
android-dialog
clearinterval
server-name
kaazing
kext
active-record-query
ccl
powergui
projectpier
fxruby
external-sorting
rakudo
watchpoint
service-factory

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App