Opened 9 years ago

Last modified 9 years ago

#46943 closed defect

py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC — at Initial Version

Reported by: paulccobb@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: leopard powerpc lack-of-interest Cc:
Port: py-gobject3

Description

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.

Change History (2)

Changed 9 years ago by paulccobb@…

Attachment: make.log added

First file: make output log showing build error

Changed 9 years ago by paulccobb@…

Attachment: make-fPIC.log added

Second file: make output log, showing presence of '-fPIC' option, build error apparently gone

Note: See TracTickets for help on using tickets.