Opened 5 years ago

Closed 3 years ago

#57911 closed defect (fixed)

libcxx @5.0.1_4: does not install without following the LibcxxOnOlderSystems instructions on 10.5 Leopard Intel

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc: kencu (Ken), ballapete (Peter "Pete" Dyballa)
Port: libcxx

Description

make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/libcxxabi-5.0.1.src/lib && ./buildit
+ for FILE in '../src/*.cpp'
+ /usr/bin/g++-4.2 -c -g -O3 -arch i386 -arch ppc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/libcxxabi-5.0.1.src/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/libcxx-5.0.1.src/include -Os -std=c++11 -stdlib=libc++ -nostdinc++ -fstrict-aliasing -Wstrict-aliasing=2 -Wsign-conversion -Wshadow -Wconversion -Wunused-variable -Wmissing-field-initializers -Wchar-subscripts -Wmismatched-tags -Wmissing-braces -Wshorten-64-to-32 -Wsign-compare -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wnewline-eof -D_LIBCPP_BUILDING_LIBRARY -I../include ../src/abort_message.cpp
cc1plus: error: unrecognized command line option "-Wsign-conversion"
cc1plus: error: unrecognized command line option "-Wmismatched-tags"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-stdlib=libc++"
cc1plus: error: unrecognized command line option "-Wsign-conversion"
cc1plus: error: unrecognized command line option "-Wmismatched-tags"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-stdlib=libc++"
fatal error: lipo: can't figure out the architecture type of: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/.tmp/ccqIwXQp.out
make: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/libcxxabi-5.0.1.src/lib/libc++abi.dylib] Error 1

Attachments (1)

main.log (28.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 5 years ago.

Download all attachments as: .zip

Change History (16)

Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

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

that's what happens when you try to build libcxx with gcc (which is fairly easy to fix, BTW, but that's another story).

Now libcxx does build and install on 10.5 Intel, exactly the same as it does on 10.6.8 in fact. (Builds with clang-3.4 initially, then upgrades to the +emulated_tls version using the current latest clang-5.0 +emulated_tls. I have it installed like that, as does Riccardo.

So it's a default compilers / blacklisting / fallback compiler selection thing on 10.5 Intel... always a bit of a PITA given our desire to not whitelist compilers.

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

I tried replacing

compiler.blacklist *gcc* {clang < 500}

with

compiler.blacklist *gcc-3.* *gcc-4.* {clang < 500}

but that resulted in:

Error: Cannot install libcxx for the archs 'i386 ppc' because
Error: its dependency gcc6 cannot build for the required archs.
Error: Problem while installing libcxx

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

I should also say that we have to adjust our thinking on what +universal means on 10.4 and 10.5, because we don't have c++11 capable compilers that can cross build.

comment:4 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

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

Resolution: worksforme
Status: assignedclosed

nothing to fix here

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

Resolution: worksforme
Status: closedreopened

What do you mean? Nothing has changed. The error still occurs as reported.

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

libcxx will never build with gcc-4.2, and nobody can ever fix that.

Feel free to leave this ticket here -- I was just trying to clean up stuff that will never be fixed.

Or to put it differently -- you need to follow the LibcxxOnOlderSystems instructions if you want to use libc++ on 10.5 Intel. I guess if you want this ticket to represent that issue, it can stay here until someone feels motivated to take that on.

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

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

Summary: libcxx @5.0.1_4: cc1plus: error: unrecognized command line option "-Wsign-conversion"libcxx @5.0.1_4: does not install without following the LibcxxOnOlderSystems instructions on 10.5 Leopard Intel

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

I don't want to use libc++. I just want to install and upgrade ports, but most anything I do pulls in an llvm which pulls in libcxx.

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

This is probably a huge part of it:

$ sudo port -u upgr cmake
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
--->  Computing dependencies for libcxx
--->  Building libcxx
Error: Failed to build libcxx: command execution failed

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

Thanks -- I have my 10.5 system set up with LibcxxOnOlderSystems, and I haven't tried to bootstrap anything for a while there.

BTW, I ran into this cmake issue on Intel Tiger building llvm-7.0 there (and all the parts that lead up to it). I had to make a cmake39 port, that installed cmake 3.9, which was the last one that built with the default toolchain on Tiger and Leopard, as far as I can recall. <https://github.com/kencu/TigerPorts/tree/master/devel/cmake39>

comment:12 Changed 3 years ago by Wowfunhappy (Jonathan)

Is there an alternate way to install c++11 ports on Leopard Intel?

I'm currently trying to build Squid 4. It built in a clean Tiger VM, with MacPorts never even trying to install libcxx. But in a clean Leopard VM, it tries to install libcxx and fails. That seems like a bit of an odd state of affairs...

Last edited 3 years ago by Wowfunhappy (Jonathan) (previous) (diff)

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

Leopard Intel does reasonably well building against libstdc++ from gcc-7, and that is the current MacPorts-sanctioned method of installing software on it (same as Leopard PPC). If you are running into an issue doing installs with c++11 software against libstdc++ from gcc7 (ie macports-libstdc++) then we are meant to fix that, so you can open a ticket about the specific build error, and I'll (we'll) try to sort it out with you.

However, FYI, I have found that libc++ builds quite nicely on Leopard Intel, and if you change the Leopard Intel setup to match SnowLeopard, ie set your libc++ to libc++ in macports.conf and set your universal archs to "i386 x86_64" just like SnowLeopard has, you will probably find life much easier for you.

A lot of software has been tweaked to build and run on SnowLeopard libc++, and these tweaks often carry over very nicely to Leopard Intel.

To be honest, I have had good (possibly great) success with libc++ on Tiger Intel as well -- see https://github.com/kencu/TigerPorts for some inspiration. I have up to clang-7.0 working there, and it largely works well. There are some hiccups there still I have found, now and then. But I guess that is not really ready to recommend broadly.

comment:14 Changed 3 years ago by Wowfunhappy (Jonathan)

Thanks, I've opened a new ticket here: #62400. I'll definitely try those adjustments if I need to, but I'd like to attempt the "officially sanctioned" way first. :)

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

Resolution: fixed
Status: reopenedclosed

In df7162b64483ddce805c8a12bd9f16c0c714c0a4/macports-ports (master):

libcxx: fixes for Leopard

  1. disable ppc builds. These have never worked so

far other than very controlled, hand-modified setups.

Attempts to build libcxx on PPC inevitably failed and
resulted in tickets, so just disable it fully.

  1. on Intel, esp for Leopard, force universal archs of i386/x86_64.

These are the only archs that can build libcxx on
Leopard. We could disable universal completely
but libcxx builds well enough as i386/x86_64 and I know
there are users who are using libcxx on 64 bit leopard.

If one day we do enable libcxx to build on PPC, these
can be readdressed at that time.

closes: #62400
closes: #57911

Note: See TracTickets for help on using tickets.