[MacPorts] #46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC
#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
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+----------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: leopard powerpc Port: py-gobject3 | --------------------------+----------------------------- Changes (by mf2k@…): * owner: macports-tickets@… => cal@… * keywords: => leopard powerpc * port: => py-gobject3 Comment: In the future, please use WikiFormatting, fill in the Port field and Cc the port maintainers ({{{port info --maintainers py27-gobject3}}}), if any. -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+----------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: leopard powerpc Port: py-gobject3 | --------------------------+----------------------------- Description changed by mf2k@…: Old 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.
New 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. -- -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+----------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: leopard powerpc Port: py-gobject3 | --------------------------+----------------------------- Comment (by cal@…): I've attached a patch against the Portfile. Can you test whether this fixes the issue for you? Unfortunately, I don't have a PowerPC box ready to test this myself. -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+----------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: leopard powerpc Port: py-gobject3 | --------------------------+----------------------------- Changes (by cal@…): * status: new => assigned -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+----------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: leopard powerpc Port: py-gobject3 | --------------------------+----------------------------- Comment (by cal@…): Sorry that patch has a syntax error, this one is the right one: {{{ #!patch Index: Portfile =================================================================== --- Portfile (revision 133802) +++ Portfile (working copy) @@ -48,6 +48,13 @@ --disable-silent-rules configure.cppflags-append \ -I${python.prefix}/include + platform darwin { + # PowerPC builds fail because -mdynamic_no_pic is the default, #46943 + if {([variant_isset universal] && ("ppc" in ${universal_archs} || "ppc64" in ${universal_archs})) + || (![variant_isset universal] && [string match "ppc*" ${build_arch}])} { + configure.cflags-append -fPIC + } + } build.cmd [portbuild::build_getmaketype] build.target }}} -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#46943: py27-gobject3 fails to build on MacOS 10.5.8 PPC; can fix problem with -fPIC --------------------------+---------------------------------------------- Reporter: paulccobb@… | Owner: cal@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: worksforme | Keywords: leopard powerpc lack-of-interest Port: py-gobject3 | --------------------------+---------------------------------------------- Changes (by cal@…): * keywords: leopard powerpc => leopard powerpc lack-of-interest * status: assigned => closed * resolution: => worksforme Comment: Closing due to missing response. Please re-open if you can confirm this fixes your issue. -- Ticket URL: <https://trac.macports.org/ticket/46943#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts