New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #35559 (closed defect: invalid)

Opened 10 months ago

Last modified 10 months ago

py27-crypto fails to build

Reported by: jcorso@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: clang Cc: jwa@…, ram@…
Port: py27-crypto

Description (last modified by ryandesign@…) (diff)

Trying to install py27-crypto fails. The last posting on this site I can see about py27-crypto is 21 months old...

Log file points to a build error in clang. (error copied below)

XCode 4.4 on 10.8 (setting up a new machine) and a new download/install of macports.

:info:build /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.8-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.8-x86_64-2.7/Crypto/PublicKey/_fastmath.so
:info:build ld: illegal text-relocation to ___gmp_binvert_limb_table in /usr/local/lib/libgmp.a(mp_minv_tab.o) from ___gmpn_divexact_1 in /usr/local/lib/libgmp.a(dive_1.o) for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build error: command '/usr/bin/clang' failed with exit status 1
:

I have tried also forcing to use gcc (4.2), apple-gcc-4.2, and gcc-llvm (as listed on the Problem Hotlist page) to no avail.

Thanks

Change History

comment:1 Changed 10 months ago by ryandesign@…

  • Keywords py27-crypto removed
  • Cc jwa@…, ram@… added
  • Status changed from new to closed
  • Resolution set to invalid
  • Description modified (diff)

Because of how the Python build process works, changing the compiler for Python modules has no effect. Modules will always build using the same compiler that was used to compile Python itself.

The error message points to the file /usr/local/lib/libgmp.a, which appears to be interfering with the build. We do not support using MacPorts while there is software installed in /usr/local precisely because of the likelihood of interference like this. Please remove that file (and anything else you might have in /usr/local), clean the port, and try again.

comment:2 Changed 10 months ago by jcorso@…

Thanks for the help.

However, based on your comment, installing the 'gmp' port inside of macports solved the problem without touching that library in /usr/local (or anything else I have there). py27-crypto built once I installed gmp.

Also, although I had missed it before submitting this ticket, the FAQ entry (https://trac.macports.org/wiki/FAQ#usrlocal) about /usr/local is different than the recommendation given in this response (which is to remove all software in /usr/local, which I don't think is reasonable).

Thanks for producing and supporting macports.

Note: See TracTickets for help on using tickets.