Opened 6 years ago

Closed 5 years ago

#56944 closed defect (fixed)

Error: Failed to build ld64-127: command execution failed

Reported by: mrkapqa Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: cjones051073 (Chris Jones)
Port: ld64-127

Description (last modified by mf2k (Frank Schima))

Hello ,

i tried to follow your guide here

wiki:LibcxxOnOlderSystems

on point 4

sudo port -v install clang-3.7

i get error message

make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ld64/ld64-127/work/ld64-127.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ld64/ld64-127/work/ld64-127.2" && /usr/bin/make -j9 -w all CC="/opt/local/bin/clang-mp-3.4" CXX="/opt/local/bin/clang++-mp-3.4" OTHER_CPPFLAGS="-I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ld64/ld64-127/work/dyld-421.2/include" OTHER_CFLAGS="-Os -arch x86_64" OTHER_CXXFLAGS="-Os -stdlib=libc++ -stdlib=libc++ -arch x86_64" OTHER_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -lc++abi -stdlib=libc++ -arch x86_64" LLVM_CONFIG=/opt/local/bin/llvm-config-mp-3.4 
Exit code: 2
Error: Failed to build ld64-127: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ld64/ld64-127/main.log for details.
Error: rev-upgrade failed: Error rebuilding ld64-127

Thank you

Attachments (1)

clang.log (49.9 KB) - added by mrkapqa 6 years ago.

Download all attachments as: .zip

Change History (15)

Changed 6 years ago by mrkapqa

Attachment: clang.log added

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

Keywords: libcc++ clang-3.7 llvm-3.4 removed
Owner: set to jeremyhu
Port: ld64-127 added; clang-3.7 removed
Status: newassigned
Summary: (Clang-3.7)(10.6.8 - xcode 4.2 for snow leopard) Error: Failed to build ld64-127: command execution failedError: Failed to build ld64-127: command execution failed

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

Description: modified (diff)

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

So this looks like it happens during a rev-upgrade for some reason. Can you tell me (or show me) what happenned just before this, to trigger that rev-upgrade event?

Usually something would have been installed, then some inconsistency found (like a stdlib mismatch for example) to trigger the rebuild.

comment:4 Changed 6 years ago by mrkapqa

I tried to install Waterfox Browser 52 on Snow Leopard, which complained of missing libc++.1. library, and crashes

Dyld Error Message:

Symbol not found: _strndup Referenced from: /Applications/Waterfox.app/Contents/MacOS/libmozglue.dylib Expected in: /usr/lib/libSystem.B.dylib

in /Applications/Waterfox.app/Contents/MacOS/libmozglue.dylib

so i tried with Macports to overcome,

and probably during the process i tried also to install Homebrew (which failed miserably due to curl-issue) and installed Git manually , maybe this could have evoked an error?

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

Ah. Well, cleaning all this up might be a project.

In your case, you would have been OK to just

sudo port -v install libcxx

and it would have installed /usr/lib/libc++.dylib for you and solved the missing library issue. However, I doubt the browser would have worked anyway as it sounds like it's built against 10.7.

For right now today, the best browser for 10.6 is (IMHO) Firefox 45.9.0 ESR, which you can get right here in many languages <https://ftp.mozilla.org/pub/firefox/releases/45.9.0esr/mac/>.

That is the last Firefox available for 10.6.8, and works pretty well, although it is not up to date with security features.

Several of us are working to bring TenFourFox to older Intel systems. We have it building and running now, and it is fully up to date with security fixes. It is not quite ready for general use just now.

comment:6 Changed 6 years ago by mrkapqa

Thank you Kencu,

if i remember correctly i tried that already before but that did not completely solve the issue so i thought it might be worth a try to test the long road.

i do use firefox 45 esr on my system , but it is sometimes a bit outdated (example: twitter). on lion 10.7 i can use waterfox 56.2 , which is otherwise also limited to firefox 45 esr.

it seems on 10.6.8 i am stuck then for now with firefox and waterfox 48 (which opens correctly). actually, safari is best on 10.6.8 in terms of speed, but fails quite often to open pages due to security isseus i think.

I use Tenfourfox 17 (with plugins) and Tenfourfox latest quite regularly . it would be great if it be possible to make it also available in a docker-like format, so that when one has 2 versions of tenfourfox installed , say 17 and a newer, the can run independently, otherwise it is a bit complicated with the plugins and add-ons which tend to update themselves or get deactivated.

Last edited 6 years ago by mrkapqa (previous) (diff)

comment:7 Changed 6 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

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

Description: modified (diff)

comment:9 Changed 6 years ago by snunez1 (Steve Nunez)

I just went through the same process and can add a bit to this report. In addition to WaterFox, I sense that going forward long term maintenance is going to require a lot of self compiling, and having an update to date toolchain will really be welcome. Somethings, like Boost, require it. I am happy to help test. Fixing is probably beyond my abilities, but happy to help in any way I can.

Here is what happened:

After building clang 3.7 (step 4), I get this:

--->  Cleaning clang-3.7
--->  Removing work directory for clang-3.7
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
ncurses is using libstdc++ (this installation is configured to use libc++)
llvm-3.4 is using libstdc++ (this installation is configured to use libc++)
ld64-127 is using libstdc++ (this installation is configured to use libc++)
gettext is using libstdc++ (this installation is configured to use libc++)
db48 is using libstdc++ (this installation is configured to use libc++)
clang-3.4 is using libstdc++ (this installation is configured to use libc++)
cctools is using libstdc++ (this installation is configured to use libc++)
--->  Found 7 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 db48 @4.8.30+java
 ncurses @6.1
 gettext @0.19.8.1
 llvm-3.4 @3.4.2
 ld64-127 @127.2+llvm34
 clang-3.4 @3.4.2+analyzer
 cctools @895+llvm34
Continue? [Y/n]: 

Answered 'no' and continued with steps 5, 6 and 7. After a long while:

ncurses is using libstdc++ (this installation is configured to use libc++)
llvm-3.4 is using libstdc++ (this installation is configured to use libc++)
ld64-127 is using libstdc++ (this installation is configured to use libc++)
gettext is using libstdc++ (this installation is configured to use libc++)
db48 is using libstdc++ (this installation is configured to use libc++)
clang-3.4 is using libstdc++ (this installation is configured to use libc++)
--->  Found 6 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 db48 @4.8.30+java
 ncurses @6.1
 gettext @0.19.8.1
 llvm-3.4 @3.4.2
 ld64-127 @127.2+llvm34
 clang-3.4 @3.4.2+analyzer
Continue? [Y/n]:

Saying 'no' here and picking up with the rest of step 6 brings us right back to the error. Trying the rev-upgrade results in:

--->  Cleaning ncurses
--->  Removing work directory for ncurses
--->  Computing dependencies for llvm-3.4.
--->  Cleaning llvm-3.4
--->  Removing work directory for llvm-3.4
Error: ld64: Variant llvm39 conflicts with llvm34
Error: Unable to open port: Error evaluating variants
Error: rev-upgrade failed: Error rebuilding ld64-127
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

I also tried 'yes' at the prompts and got the same errors.

Last edited 5 years ago by snunez1 (Steve Nunez) (previous) (diff)

comment:10 Changed 5 years ago by jeremyhu (Jeremy Huddleston Sequoia)

What is your variants.plist? In step 5, you should have added -llvm34

What do you mean by "After a long while:" after completing step 6? Steps 5 & 6 doesn't have you do anything other than edit those files.

Step 7 has you install cctools and ld64 with the +llvm39 -llvm34 variants explicitly specified.

So it's not clear what you are doing between step 6 and step 7 that accounts for that "After a long while:", but you should just do step 7 after step 6 to address that error.

Disable revdep rebuild while you do this.

comment:11 Changed 5 years ago by snunez1 (Steve Nunez)

I have just updated the sequence I followed for clarity.

The build has succeeded. The key was your comment 'disable revdep'. It took me a while to understand what that might mean. In the end I kept answering 'no' to any 'rev-upgrade' questions and, eventually, everything succeeded.

It might be useful to mention this in the wiki page, or add an option to the 'port install' command, if there is one, to disable rev-upgrade.

comment:12 Changed 5 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from jeremyhu to kencu

Over to Ken, since he's a bit more up on this than I am these days. Sounds like the docs just need to be updated to reflect changes over the past couple years.

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

I think the thing to do is add a small step early in the instructions to turn off rev-upgrade in macports.conf during the build:

revupgrade_autorun  	no

and then turn it back on at the end of the process.

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

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.