Opened 4 years ago

Last modified 4 years ago

#60607 new enhancement

Universal archs on macports on OSX systems upgraded from OSX 10.5

Reported by: JamesC1 Owned by:
Priority: Normal Milestone:
Component: website Version:
Keywords: Cc:
Port:

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

On OSX 10.6.8, I was failing to follow these instructions: LibcxxOnOlderSystems including the older version here: https://web.archive.org/web/20170331190323/https://trac.macports.org/wiki/LibcxxOnOlderSystems

The output was one cycle, among many, was:

sh-3.2# port install clang_select
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  Found 5 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 ncurses @6.1
 gettext @0.19.8.1
 llvm-3.4 @3.4.2
 cctools @895+llvm34
 ld64-127 @127.2+llvm34
Continue? [Y/n]: Y
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
--->  Computing dependencies for libcxx
--->  Fetching archive for libcxx
--->  Attempting to fetch libcxx-5.0.1_4+universal.darwin_10.i386-ppc.tbz2 from http://kmq.jp.packages.macports.org/libcxx
--->  Attempting to fetch libcxx-5.0.1_4+universal.darwin_10.i386-ppc.tbz2 from https://packages.macports.org/libcxx
--->  Attempting to fetch libcxx-5.0.1_4+universal.darwin_10.i386-ppc.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libcxx
--->  Building libcxx
Error: Failed to build libcxx: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/main.log for details.
Error: Problem while installing libcxx
Error: rev-upgrade failed: Error rebuilding ncurses
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
sh-3.2#

I ended up fixing the problem by changing my universal architectures in /opt/local/etc/macports/macports.conf as follows:

# CPU architectures to use for Universal Binaries (+universal variant)
#universal_archs                i386 ppc  # breaks libcxx binary support
universal_archs         i386 x86_64

which enabled me to find the prebuilt libcxx here: https://packages.macports.org/libcxx

Anyone whose macports started out on OSX 10.5 could have this problem. Should it be documented on, or linked from the libcxx page above?

Change History (5)

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

yes, the universal archs need to be changed as you say on older Intel systems. If it's not in those instructions I'll add it. (thought I had).

libcxx is the first example people usually run into, but nothing that needs c++11 will build +universal cross arch right now.

btw: we could probably fix cross-arch building...it's just a bit complicated. The hiccup right now is figuring out how to automatically build a multi-arch compiler_rt for clang (I have done it manually though) and how to build a gcc cross-compiler (also recipes on the internet, and I have done that manually too.)

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

once you're up and running, you should find 10.6.8 quite usable on macports, btw.

There are still a few hiccups here and there, but thousands and thousands of ports build, including the latest clang, webkit2-gtk, etc.

make sure you follow the extra steps to upgrade libcxx to the emulated_tls variant, and ld64 to ld64_latest, to get a fully functional system.

and use my tenfourfox for intel port, available on the tenfoufox sourceforge site in the contrib directory.

K

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Updating macports.conf is mentioned on wiki:Migration, which is supposed to be followed after any major OS upgrade.

comment:4 in reply to:  description Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to JamesC1:

On OSX 10.6.8, I was failing to follow these instructions: LibcxxOnOlderSystems

That page is pretty clear about the fact that you no longer need to do anything special to get MacPorts to use libc++ on 10.6 and later.

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

Description: modified (diff)
Note: See TracTickets for help on using tickets.