Errors building gcc44 under MacOsX

Ryan Schmidt ryandesign at macports.org
Sun Sep 4 15:27:38 PDT 2011


On Sep 4, 2011, at 15:48, David Epstein wrote:

> Jeremy Lavergne wrote:
>> 
>> You must be running an old version of MacPorts then.
>> Have you considered updating it `port selfupdate`?
>> 
>> I get:
>> $ port -v installed zlib
>> The following ports are currently installed:
>>  zlib @1.2.5_0 (active) platform='darwin 10' archs='x86_64'
>> 
> 
> That's an interesting difference, and does seem to reflect a difference in
> 'port'. I have indeed run 'sudo port selfupdate' today. It says I am running
> version 2.0.2. Is that what you are running? I also did 'sudo port upgrade
> outdated'.

All it means is that at the time that zlib was installed, you were running MacPorts 1.8 or earlier. Architecture and platform information was not recorded in the registry until MacPorts 1.9.


> When I installed Mac Os X 10.6, I did, as recommended, restart MacPorts from
> nothing, but maybe something has gone mysteriously wrong despite my care. I
> hope I won't have to delete everything and start again. It takes so long to
> rebuild everything.

The fact that you clearly have a 64-bit Mac, and that zlib was nevertheless installed 32-bit, and on MacPorts 1.8 or earlier, suggests zlib was in fact installed a long time ago, when you were running Leopard or earlier, perhaps on a previous machine whose disk was migrated to this one, or restored to this one from a backup, and that you did not subsequently successfully uninstall your old ports and rebuild them. At least not zlib. But I would be surprised if zlib were the only port affected.


> I tried to uninstall zlib, wanting to reinstall it, but there are a lot of
> ports that depend on zlib, so it refused to uninstall. Should I use -f on
> zlib or will that make everything break?

You can (and should) force zlib to rebuild, like this:

sudo port clean zlib
sudo port -n upgrade --force zlib

You can then verify that it is now installed for x86_64 by running:

port -v installed zlib

But you should investigate what (if any) other ports are in a similar situation, like this:

port -v installed | grep -v archs=

(This gets the verbose list of installed ports, and then excludes all the lines that list architectures, leaving you with just the lines that don't.)

You should rebuild all these ports. But if there are many, and if we assume that they, like zlib, were built 32-bit instead of 64-bit, you may run into dependency problems if you rebuild the ports in the wrong order, and discovering the right order can be tedious, in which case it may be easier to try following the migration instructions again:

https://trac.macports.org/wiki/Migration





More information about the macports-users mailing list