Opened 12 years ago

Closed 4 years ago

#37340 closed defect (fixed)

py32-numpy (but other version also?) does not link against libgomp when needed

Reported by: Veence (Vincent) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: OpenMP numpy Cc: cooljeanius (Eric Gallager), petrrr
Port: py-numpy

Description

It seems when using an OpenMP enabled compiler, macports-gcc-4.7 for instance, the lapack_lite.so module of numpy (name given from memory) does not link against libgomp, thereby creating an unknown symbol error at runtime. I saw this on an old G4 box (MacOS 10.4), it would have to be confirmed for other combinations of MacOS / Python.

Fix is to add ${prefix}/lib/gccXX/libgomp.dylib in the extra_link_args line of patchfile ‘patch-numpy_linalg_setup.py.diff’

Change History (12)

comment:1 Changed 12 years ago by Veence (Vincent)

Cc: ram@… added
Keywords: OpenMP numpy added
Port: py-numpy added

comment:2 Changed 12 years ago by lpsinger (Leo Singer)

Better than explicitly linking against libgomp is to to pass -fopenmp to both the compiler and the linker.

comment:3 Changed 12 years ago by Veence (Vincent)

Yes, you’re right, I’d forgotten this flag. Thanks for pointing it out.

comment:4 in reply to:  2 Changed 12 years ago by skymoo (Adam Mercer)

Replying to aronnax@…:

Better than explicitly linking against libgomp is to to pass -fopenmp to both the compiler and the linker.

Leo: feel free to make the required changes as you're more familiar with OpenMP.

comment:5 Changed 12 years ago by lpsinger (Leo Singer)

Whichever source files use OpenMP pragmas would have to be compiled with -fopenmp too. Which source files in Numpy use OpenMP?

comment:6 Changed 12 years ago by Veence (Vincent)

The error was solely reported in the lapack_lite.so module. I think it is tied to gfortran, but I can’t be fully positive. What is certain is that, after adding the library in the patch file, as I wrote before, I built a numpy passing all self-tests.

comment:7 Changed 12 years ago by skymoo (Adam Mercer)

Cc: ram@… removed

comment:8 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:9 Changed 11 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:10 Changed 9 years ago by petrrr

Cc: michaelld@… added
Owner: changed from macports-tickets@… to dh@…

I assign (CC) this to the maintainer to check if this is still relevant. py32 subport is gone, but might be relevant to other subports as well.

comment:11 Changed 8 years ago by mf2k (Frank Schima)

Cc: michaelld@… removed
Owner: changed from dh@… to michaelld@…

dh has retired. See #51239.

comment:12 Changed 4 years ago by Veence (Vincent)

Resolution: fixed
Status: newclosed
  • Not relevant anymore -
Note: See TracTickets for help on using tickets.