Opened 5 years ago

Last modified 5 years ago

#59794 closed defect

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

Reported by: lpagani91 Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
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.

Change History (2)

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
Note: See TracTickets for help on using tickets.