Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59794 closed defect (fixed)

ld64: dyld: Library not loaded: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib

Reported by: lpagani91 Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: macdeport
Port: ld64

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Ran port selfupdate followed by port upgrade outdated. It stopped during the update of py36-scipy. I tried to clean and redo, same, to de-install and re-install, same.

bash-3.2$ sudo port clean py36-scipy
--->  Cleaning py36-scipy
bash-3.2$ sudo port upgrade outdated
--->  Computing dependencies for py36-scipy
--->  Fetching archive for py36-scipy
--->  Attempting to fetch py36-scipy-1.3.3_0+gfortran+openblas.darwin_16.x86_64.tbz2 from http://kmq.jp.packages.macports.org/py36-scipy
--->  Attempting to fetch py36-scipy-1.3.3_0+gfortran+openblas.darwin_16.x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/py36-scipy
--->  Attempting to fetch py36-scipy-1.3.3_0+gfortran+openblas.darwin_16.x86_64.tbz2 from https://packages.macports.org/py36-scipy
--->  Fetching distfiles for py36-scipy
--->  Verifying checksums for py36-scipy
--->  Extracting py36-scipy
--->  Configuring py36-scipy
--->  Building py36-scipy
Error: Failed to build py36-scipy: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py36-scipy/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Attachments (2)

main.log.gz (55.0 KB) - added by lpagani91 5 years ago.
main.log file of the py36-scipy compilation gzipped
main.log.tgz (87.2 KB) - added by macdeport 5 years ago.
main.log <= py36-scipy

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by lpagani91

Attachment: main.log.gz added

main.log file of the py36-scipy compilation gzipped

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michaelld removed
Description: modified (diff)
Owner: set to jeremyhu
Port: ld64 added; py36-scipy removed
Status: newassigned
Summary: py36-scipy crashes during build upon upgrade outdatedld64: dyld: Library not loaded: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib

The log says the reason for the crash was:

:info:build collect2: fatal error: ld terminated with signal 6 [Abort trap: 6]
:info:build compilation terminated.
:info:build dyld: Library not loaded: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib
:info:build   Referenced from: /opt/local/bin/ld
:info:build   Reason: image not found

It seems your ld is still linked with an llvm 3.9 library, although llvm 3.9 was made obsolete. The llvm39 variant was removed from the ld64 port, but the revision was not increased, leaving any users who had the port installed with that variant with broken installations.

There are several subports of ld64 that provide different versions of ld64. Since you're on Sierra, you're probably using ld64-latest, and you could fix the immediate problem by reinstalling ld64-latest with a newer llvm variant. (See port variants ld64-latest for the available options.)

However ld64-latest is not actually that new: it currently contains the version of ld64 that shipped with Xcode 8.2.1. Your log shows you are using Xcode 9.2, so using ld64 from Xcode 8.2.1 with that may not always work.

Until we update ld64-latest to a newer version, it's probably better to install the ld64 port with the +ld64_xcode variant, so that MacPorts will just use the ld64 from Xcode itself:

sudo port install ld64 +ld64_xcode

comment:2 Changed 5 years ago by macdeport

Cc: macdeport added

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

Resolution: fixed
Status: assignedclosed

the recent update to ld64 should have pulled in a new llvm variant for you.

comment:4 in reply to:  3 Changed 5 years ago by macdeport

Replying to kencu:

the recent update to ld64 should have pulled in a new llvm variant for you.

Thank you for this update but I am still unable to build py36-scipy|py37-scipy...

New main.log file of the py36-scipy failed build gzipped

Changed 5 years ago by macdeport

Attachment: main.log.tgz added

main.log <= py36-scipy

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

We have moved on to a new issue causing breakage for you:

:info:build clang++: scipy/fft/_pocketfft/pypocketfft.cxx
:info:build scipy/_lib/_uarray/_uarray_dispatch.cxx:109:1: error: thread-local storage is not supported for the current target
:info:build thread_local std::unordered_map<
:info:build ^

Nobody promises there can be only one issue :>

The /usr/bin/clang that comes with macOS 10.10 is quite dated, and does not support thread_local. This is a different problem, should be a new ticket. Surprisingly, I don't see an open ticket for this issue already. The Portfile will need to be updated to reflect this.

For now the way to move past this error (and hopefully there will be no more, but no promises!) is to force the use of a newer compiler. The following steps usually will work:

sudo port clean py36-scipy
sudo port -v install clang-9.0
sudo port -v install py36-scipy configure.compiler=macports-clang-9.0

Best of luck!

comment:6 in reply to:  5 Changed 5 years ago by macdeport

Replying to kencu:

Nobody promises there can be only one issue :>

The /usr/bin/clang that comes with macOS 10.10 is quite dated, and does not support thread_local. This is a different problem, should be a new ticket. Surprisingly, I don't see an open ticket for this issue already. The Portfile will need to be updated to reflect this.

For now the way to move past this error (and hopefully there will be no more, but no promises!) is to force the use of a newer compiler. The following steps usually will work:

sudo port clean py36-scipy
sudo port -v install clang-9.0
sudo port -v install py36-scipy configure.compiler=macports-clang-9.0

Best of luck!

As in all situations, it is much better to try to help the luck: thanks a lot for your help of the luck... and me.

Hopefully, it was the sole issue and py36-scipy|py37-scipy are now compiled/builded without trouble :-)

Note: See TracTickets for help on using tickets.