Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62417 closed defect (fixed)

llvm-7.0 fails to build on Leopard Intel

Reported by: Wowfunhappy (Jonathan) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: kencu (Ken)
Port: llvm-7.0

Description

(Hopefully this is actually the last one?)

Log is attached. I usually try to pull out the most (seemingly) relevant piece, but I couldn't make any sense of this one I'm afraid...

Attachments (2)

main.log (522.9 KB) - added by Wowfunhappy (Jonathan) 4 years ago.
Threading.inc (5.9 KB) - added by Wowfunhappy (Jonathan) 4 years ago.

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by Wowfunhappy (Jonathan)

Attachment: main.log added

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

We fixed this before...

:info:build   ::pthread_setname_np(NameStr.data());

here

<https://github.com/macports/macports-ports/blob/master/lang/llvm-7.0/files/0005-Threading-Only-call-pthread_setname_np-on-SnowLeopar.patch>

what happened, I wonder?

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

open this file:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-7.0/llvm-7.0/work/llvm-7.1.0.src/lib/Support/Unix/Threading.inc

and take a look at that block the patch was supposed to fix. is it patched? It should be.

Jeremy likes this construct:

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060

but to be honest, I think it's more reliable if you just use this:

#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060

If the first is not working properly, try the second. I might just change it anyway.

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

Changed 4 years ago by Wowfunhappy (Jonathan)

Attachment: Threading.inc added

comment:3 in reply to:  2 Changed 4 years ago by Wowfunhappy (Jonathan)

Replying to kencu:

and take a look at that block the patch was supposed to fix. is it patched? It should be.

I think so yes, see attached. I'll try changing it...

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

Well I don't know. My own build just roared past that spot and is going through to the end on Leopard.

Could you possibly have older "Command Line Tools" installed in "/" ?

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

OH I think I know what this is.

To have any hope of having leopard work properly on MacPorts, you have to do these fixes:

<https://trac.macports.org/wiki/LeopardSDKFixes>

If you don't, you see errors like the ones you have.

comment:6 Changed 4 years ago by Wowfunhappy (Jonathan)

I actually think the first change you suggested fixed it:

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060

but to be honest, I think it's more reliable if you just use this:

#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060

Hopefully I'm not speaking to soon, because llvm is still compiling, but it usually doesn't go this long before failing. :)

(I will also make those SDK edits though, it looks super quick/painless. If possible, it might be good to put a link to that page in an error message for some high-visible port which is known to need them. I don't think I would have found it myself.)

comment:7 Changed 4 years ago by Wowfunhappy (Jonathan)

Yep, can now confirm, that one line change allowed llvm to compile successfully, even without any sdk edits. (Thank you!)

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

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

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 6c800aa99656327cb0b888e6d1feb7462bc1c9f9/macports-ports (master):

llvm-7.0: tweak leopard blocker

allows this patch to work even if users have not
undertaken the SDK fixes in https://trac.macports.org/wiki/LeopardSDKFixes

closes: #62417

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

So I just installed a new installation of MacPorts on a virgin Leopard Intel system.

Then I made the tiny change in <​https://trac.macports.org/wiki/LeopardSDKFixes> in AvailabilityInternal.h.

There was a hangup at autoconf barfing on gtk-doc, so I installed autoconf 2.6.9_5 instead of 2.7.1. And the usual silly thing about deactivating libunwind-headers when building libgcc7.

But other than that, it installed all the way to clang-7.0 without touching the keyboard. Took a while, but it's all finished.

I will have to manually upgrade libcxx to the +emulated_tls variant still to get full functionality, but other than that, it's clean.

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

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

btw clang-9.0 seems fine on Leopard, and matches SnowLeoaprd so if that holds up we can change the Leopard defaulting to match SL.

Note: See TracTickets for help on using tickets.