[MacPorts] #46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC

MacPorts noreply at macports.org
Mon Feb 23 10:01:52 PST 2015


#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with
-fPIC
-------------------------+--------------------------------
 Reporter:  paulccobb@…  |      Owner:  macports-tickets@…
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.3.3
 Keywords:               |       Port:
-------------------------+--------------------------------
 I found a few days ago that in trying to upgrade py27-gobject3 from
 3.12.1_0 to 3.14.0_0, the build failed with the following error in
 main.log:

 ld: absolute addressing (perhaps -mdynamic-no-pic) used in
 _pygobject_constructv from .libs/_gi_la-gobjectmodule.o not allowed in
 slidable image. Use '-read_only_relocs suppress' to enable text relocs
 collect2: ld returned 1 exit status

 I can't claim to be an expert on MacPorts or on PowerPC build issues, but
 I've tried to understand what's going wrong, and offer the following info
 in case it helps.

 I found by experiment in the work/pygobject-3.14.0 directory (under
 macports/build) that if I insert the switch '-fPIC' in the CFLAGS for each
 Makefile, that makes the problem go away. As far as I understand the
 issue, PowerPC compilation has historically assumed -mdynamic_no_pic as
 the default; so if the rest of the build process wants pic, it has to be
 enabled explicitly.

 In case they're useful, I've attached two files that each capture the
 output of a 'make' run, invoked in the work/pygobject-3.14.0 directory
 without args: the first one ends with the build error, while the second
 has the -fPIC switch present in all Makefiles and appears to run to
 completion.

-- 
Ticket URL: <https://trac.macports.org/ticket/46943>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list