Opened 6 years ago

Closed 6 years ago

#58114 closed defect (fixed)

py37-numpy-1.16.1_0+gfortran+openblas fails to build

Reported by: bakergilx (Dennis Baker) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: captainproton1971 (Captain Proton)
Port: py-numpy

Description

Error: Failed to build py37-numpy: command execution failed

Attachments (1)

main.log (211.4 KB) - added by bakergilx (Dennis Baker) 6 years ago.
py37-numpy/main.log

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by bakergilx (Dennis Baker)

Attachment: main.log added

py37-numpy/main.log

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Cc: michaelld removed
Owner: set to michaelld
Port: py-numpy added; py37-numpy removed
Status: newassigned

comment:2 Changed 6 years ago by kencu (Ken)

:info:build /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 build/temp.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_litemodule.o build/temp.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_lite/python_xerbla.o -L/opt/local/lib -Lbuild/temp.macosx-10.14-x86_64-3.7 -L/opt/local/lib -lopenblas -lopenblas -o build/lib.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_lite.cpython-37m-darwin.so -undefined dynamic_lookup -bundle
2588	:info:build ld: invalid option to -undefined [ warning | error | suppress | dynamic_lookup ]
2589	:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

It looks like the build system needs to wrap all the linker commands in -Wl, wraps, not just some of them.

Specifically, -Wl,-undefined,dynamic_lookup

comment:3 Changed 6 years ago by captainproton1971 (Captain Proton)

Cc: captainproton1971 added

comment:4 Changed 6 years ago by michaelld (Michael Dickens)

Has duplicate #58141

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

Also happens with python 2.7, and most likely every python version.

comment:6 in reply to:  2 Changed 6 years ago by lpsinger (Leo Singer)

Replying to kencu:

:info:build /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 build/temp.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_litemodule.o build/temp.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_lite/python_xerbla.o -L/opt/local/lib -Lbuild/temp.macosx-10.14-x86_64-3.7 -L/opt/local/lib -lopenblas -lopenblas -o build/lib.macosx-10.14-x86_64-3.7/numpy/linalg/lapack_lite.cpython-37m-darwin.so -undefined dynamic_lookup -bundle
2588	:info:build ld: invalid option to -undefined [ warning | error | suppress | dynamic_lookup ]
2589	:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

It looks like the build system needs to wrap all the linker commands in -Wl, wraps, not just some of them.

Specifically, -Wl,-undefined,dynamic_lookup

That worked for me. Thanks! See https://github.com/macports/macports-ports/pull/3772.

comment:7 Changed 6 years ago by lpsinger (Leo Singer)

Resolution: fixed
Status: assignedclosed

In c5dea4548c794745e202b0ba611240fbd55b3b9a/macports-ports (master):

py-numpy: fix build with +gfortran +openblas

  • Wrap linker args in -Wl

Closes: #58114

Note: See TracTickets for help on using tickets.