Opened 12 years ago

Closed 12 years ago

#33429 closed defect (fixed)

python27 @2.7.2_4 subports fail to build when compiler path changes

Reported by: benoit.triquet@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: python27

Description

python27 records the compiler path when built and that path is later used to build modules such as py27-tkinter, which fails if the compiler changes locations such as with the transition from Xcode 4.1 to Xcode 4.3

A work-around is to force a rebuild of python without dependent rebuilds:

port -n upgrade --force python27

Suggestions of solutions: 1) have the perl and python portgroups check that the compiler hardcoded

into the interpreter is still available, and tell the user to rebuild as necessary

2) make perl/python/etc modules build using ${configure.compiler}

instead of the compiler used by the interpreter.

(1) is more a work-around than a fix (i don't know the rules of macports but i believe interactions shall be forbidden) but should be otherwise harmless. (2) may fail to guarantee that the newly found compiler is link- and abi- compatible with the previous one, so it's not clear that this solution is fine. Then again, it's not clear that a new compiler found at the recorded solution, as would be silently accepted in the current implementation of python27, is fine either.

PS: thanks to Dan Ports for identifying my problem and providing the above work-around and suggestions. Dan says that other python versions may be affected as well as perl5, apr and postgresql.

Change History (3)

comment:1 Changed 12 years ago by jmroot (Joshua Root)

Note that any port affected by this is not using the unified portgroup, so doing that would be the preferred fix. We've also switched the default from paths in /Developer/usr/bin to ones in /usr/bin, which should be a lot less likely to move in future.

comment:2 Changed 12 years ago by benoit.triquet@…

I confirm a similar occurrence with a perl dependent, forcing the rebuild of perl5.12 + cleaning the dependent allowed the dependent to build.

comment:3 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

2.0.4 uses compilers from /usr/bin if at all possible, and python27 has just been updated.

Note: See TracTickets for help on using tickets.