Opened 5 years ago

Closed 5 years ago

#59493 closed defect (fixed)

gmp fails con configure on Leopard (nm ?)

Reported by: rmottola (Riccardo) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc:
Port: gmp

Description

Hi! gmp library fails to configure and thus build at all on 10.5 x86

:info:configure checking for assembler byte directive... .byte
:info:configure checking how to define a 32-bit word... /usr/bin/nm: object: conftest.o malformed object (unknown load command 1)
:info:configure /usr/bin/nm: object: conftest.o malformed object (unknown load command 1)
:info:configure configure: error: cannot determine how to define a 32-bit word

Attachments (1)

main.log (28.0 KB) - added by rmottola (Riccardo) 5 years ago.
full build log

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by rmottola (Riccardo)

Attachment: main.log added

full build log

comment:1 Changed 5 years ago by kencu (Ken)

Yes, you're right, to get past this initial error, we'll need to spec a newer NM to handle the output from the newer clang compilers.

You know the drill I think, setting NM=${prefix}/bin/nm in the environment or on the build line or patch it into the Makefile or monkey with the PATH or otherwise force it to happen.

It's getting rather tedious to do this for port after port after port, and I have come across a better way. There is a way to use an "SDK Overlay" with Apple software, where an SDK with some newer parts shadows the main fallback SDK. Kind of like our "legacysupport" idea, but with other useful bits like tools too. Xcode knows what to do with that. Maybe that would work better.

We'll need that to build any Xcode-built software on older systems now that we've moved to libc++ anyway...

comment:2 Changed 5 years ago by rmottola (Riccardo)

I did add

if {${os.platform} eq "darwin" && ${os.major} < 10} {
    depends_build-append port:cctools
    configure.env-append NM=${prefix}/bin/nm
    configure.args-append lt_cv_path_NM=${prefix}/bin/nm
} 

to the portfile and now I have gmp!

comment:3 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Status: newaccepted

comment:4 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

There is a pull request that attempts to apply the proposed fix.

comment:5 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: acceptedclosed

In bf455821bf3dd5de8f188c4a042571249c4dbe6b/macports-ports (master):

gmp: allow build on older systems

Fixes #59493

Note: See TracTickets for help on using tickets.