[MacPorts] #33439: ld64 build failed under lion 10.7
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ---------------------------------+------------------------------------------ I tried to build ld64 on my MBA running Lion 10.7, Xcode 4.3. I had successfully built several ports, so macports seems works on my computer. Yesterday I tried to install R, but it failed on ld64. {{{ root@dyn-218:~# port -v install ld64 ---> Computing dependencies for ld64. ---> Building ld64 Build settings from command line: ARCHS = x86_64 GCC_VERSION = com.apple.compilers.llvm.clang.1_0 MACOSX_DEPLOYMENT_TARGET = 10.7 OBJROOT = build/ SDKROOT = SYMROOT = build/ === BUILD NATIVE TARGET ld OF PROJECT ld64 WITH CONFIGURATION Release === Check dependencies Ld build/Release/ld normal x86_64 cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-127.2 setenv MACOSX_DEPLOYMENT_TARGET 10.7 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-127.2/build/Release -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-127.2/build/Release -filelist /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-127.2/build/ld64.build/Release/ld.build /Objects-normal/x86_64/ld.LinkFileList -mmacosx-version-min=10.7 -Wl,-lazy_library,/Applications/Xcode.app/Contents/Developer/usr/lib/libLTO.dylib -Wl,-exported_symbol,__mh_execute_header -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-127.2/build/Release/ld ld: file not found: /Applications/Xcode.app/Contents/Developer/usr/lib/libLTO.dylib Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ failed with exit }}} -- Ticket URL: <https://trac.macports.org/ticket/33439> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ld64 ---------------------------------+------------------------------------------ Changes (by ryandesign@…): * cc: obartunov@… (removed) * owner: macports-tickets@… => mfeiri@… * port: => ld64 Comment: Please "sudo port clean ld64" and try again. If it fails again, attach the main.log file. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ld64 ---------------------------------+------------------------------------------ Comment(by obartunov@…): I cleaned, but it's still failed. I attached main.log -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ld64 ---------------------------------+------------------------------------------ Comment(by larry.velazquez@…): I encounter the same problem. The build process is looking for /Applications/Xcode.app/Contents/Developer/usr/lib/libLTO.dylib, which is nonexistent. But: {{{ % sudo find -x / -name .MobileBackups -prune -or -name libLTO.dylib /.MobileBackups /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libLTO.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libLTO.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib /opt/local/libexec/llvm-2.9/lib/libLTO.dylib /opt/local/libexec/llvm-3.0/lib/libLTO.dylib /usr/lib/libLTO.dylib }}} OS X 10.7.3 (11D50b), Xcode 4.3 (4E109), MacPorts 2.0.4. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ld64 ---------------------------------+------------------------------------------ Comment(by jwhowse4@…): I have the same problem with Lion 10.7.3, Xcode 4.3 and MacPort 2.0.4. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: ld64 ---------------------------------+------------------------------------------ Changes (by mfeiri@…): * status: new => assigned Comment: Please try again now. I've committed an update to version 128.2 a couple of hours ago in r90363. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Changes (by cal@…): * cc: cal@… (added) * keywords: => haspatch Comment: I can reproduce this on 10.7, Xcode 4.3 and MacPorts 2.0.4, too. While there seems to be a libLTO.dylib in the 10.7 SDK, it really is just a broken symlink: {{{ $ ls -lash /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libLTO.dylib lrwxr-xr-x 1 root wheel 37 Feb 18 00:12 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libLTO.dylib -> ../..//Developer/usr/lib/libLTO.dylib $ file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/usr/lib/libLTO.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/usr/lib/libLTO.dylib: cannot open `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/usr/lib/libLTO.dylib' (No such file or directory) }}} I have used `/usr/lib/libLTO.dylib` in the proposed patch instead and the port builds fine with this patch. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Comment(by cal@…): Just to clarify: This patch is against the new version 128.2 of ld64, commited in r90363, which still fails for me without the patch. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Comment(by jwhowse4@…): The library libLTO.dylib also exists in the directory /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ and this file is identical to the one in /usr/lib. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Comment(by obartunov@…): Replying to [comment:8 cal@…]:
Just to clarify: This patch is against the new version 128.2 of ld64, commited in r90363, which still fails for me without the patch.
Where to get version 128.2 ? I have 127.2. I tried to apply manually your patch, but port still fails with the same problem. I patched /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/ld64/Portfile -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Comment(by cal@…): Running selfupdate should get you the current version; however syncing the ports tree via rsync might be delayed by an hour or something, since the tarball isn't updated immediately. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ---------------------------------+------------------------------------------ Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: ld64 ---------------------------------+------------------------------------------ Comment(by mfeiri@…): The ld64 port should actually use the libLTO library provided by macports. Only a "lucky" combination of lazy linking and a relative link path covered this bug and an issue in our llvm ports. I'll try to figure out if we should fix this the apple way (by removing an install_name_tool patch in llvm-X.X) or the unix way (by adding an additional install_name_tool patch in ld64). You can see a preview at http://macports.feiri.eu/devel/ld64/Portfile (this currently shows the unix way). -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ----------------------------------+----------------------------------------- Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: fixed | Keywords: haspatch Port: ld64 | ----------------------------------+----------------------------------------- Changes (by mfeiri@…): * status: assigned => closed * resolution: => fixed Comment: Fixed in r90446. Decided to use the unix way. -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33439: ld64 build failed under lion 10.7 ----------------------------------+----------------------------------------- Reporter: obartunov@… | Owner: mfeiri@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: fixed | Keywords: haspatch Port: ld64 | ----------------------------------+----------------------------------------- Comment(by obartunov@…): Thanks, that works ! -- Ticket URL: <https://trac.macports.org/ticket/33439#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts