Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#63003 closed defect (fixed)

base 2.6.4 and buildbot built ports with deployment target of 11.3; will not run on earlier BigSur versions

Reported by: ShadSterling (Shad Sterling) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: base Version: 2.7.1
Keywords: Cc: cjones051073 (Chris Jones), i0ntempest
Port:

Description

In main.log:

:info:configure configure: error: C compiler cannot create executables

In config.log

xcrun: error: unable execute utility "/opt/local/libexec/llvm-11/bin/clang" because it requires a newer version of macOS.

/opt/local/libexec/llvm-11/bin/clang is provided by clang-11 @11.1.0_2+analyzer+libstdcxx (active)

Attachments (2)

main.log (242.6 KB) - added by ShadSterling (Shad Sterling) 18 months ago.
config.log (24.8 KB) - added by ShadSterling (Shad Sterling) 18 months ago.

Download all attachments as: .zip

Change History (35)

Changed 18 months ago by ShadSterling (Shad Sterling)

Attachment: main.log added

Changed 18 months ago by ShadSterling (Shad Sterling)

Attachment: config.log added

comment:1 Changed 18 months ago by i0ntempest

Either update your OS, or uninstall your clang-11 & sudo port install -s clang-11 & wait it out & try installing R again; or don’t use openmp variant so it uses clang from Xcode

Last edited 18 months ago by i0ntempest (previous) (diff)

comment:2 Changed 18 months ago by i0ntempest

Resolution: invalid
Status: newclosed

Closing as this is not a problem of R

comment:3 Changed 18 months ago by kencu (Ken)

Cc: kjellpk i0ntempest removed
Port: clang-11 added; R removed
Resolution: invalid
Status: closedreopened
Summary: R fails to configure with "C compiler cannot create executables"clang-11: "C compiler cannot create executables"

Can you please try to build the simplest hello_world.c" test program you find or write, and see if you get this error?

I have not seen this before, and I would be surprised if you need a newer version of macos.

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:4 Changed 18 months ago by kencu (Ken)

Owner: set to kencu
Status: reopenedassigned

comment:5 Changed 18 months ago by i0ntempest

This happens most likely because you've installed clang from binaries built by the buildbot, which has macOS 11.3, and binaries from that buildbot can't be run on your machine bc you have 11.2. This is also happening on my 11.1 Hackintosh because I'm away from it and updating OS of a hack while not being next to it could ruin it.

comment:6 Changed 18 months ago by kencu (Ken)

if that is what turns out to be happening, we'll have to sort out how to fix that somehow.

There's nothing I can think of in the build of clang that would do this, and I have not seen this so far with any other software from the buildbot...

comment:7 Changed 18 months ago by i0ntempest

For some added info, X11.app from buildbot cannot run on my hack, likely for the same reason.

comment:8 Changed 18 months ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:9 in reply to:  7 Changed 18 months ago by cjones051073 (Chris Jones)

Replying to i0ntempest:

For some added info, X11.app from buildbot cannot run on my hack, likely for the same reason.

Can you try running 'otool -L' on the binaries you cannot run and post what you get ?

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:10 Changed 18 months ago by i0ntempest

Cc: i0ntempest added

comment:11 Changed 18 months ago by cjones051073 (Chris Jones)

Cc: i0ntempest removed

Ken, if you look at the log of the clang-11 build from the build bot

https://build.macports.org/builders/ports-11_x86_64-builder/builds/29474/steps/install-port/logs/stdio

you can see that it was built with the older base version 2.6.4, and the build is indeed configured to target 11.3

MACOSX_DEPLOYMENT_TARGET='11.3'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk'

whereas, if you compare to what I just got trying to start a fresh build here, using base 2.7.1

MACOSX_DEPLOYMENT_TARGET='11.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk'

I suspect this explains the problem. There have been issues with the changes in how the SDK where versioned with macOS11, and it seems in the latest releases Apple has stabilised things a bit with this 'OSX11' SDK, and there are improvements in base to deal better with this.

I think the fix is just to rev-bump ports affected to trigger a rebuild ?

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:12 Changed 18 months ago by i0ntempest

I take that back, binaries inside /Applications/MacPorts/X11.app/Contents/MacOS/ can be run, it's just when I open the app bundle the system complains it needs 11.2 while I have 11.1. Similarly for /opt/local/libexec/llvm-11/bin/clang it can be run in terminal but xcrun seems to have problems with it.

comment:13 Changed 18 months ago by Chris Jones <jonesc@…>

In a00d8d9334a8770ec73717d80ad69e8051704c86/macports-ports (master):

llvm-11: rev-bump all (sub)ports to trigger rebuild using base 2.7.1
See: #63003

comment:14 in reply to:  12 Changed 18 months ago by cjones051073 (Chris Jones)

Replying to i0ntempest:

I take that back, binaries inside /Applications/MacPorts/X11.app/Contents/MacOS/ can be run, it's just when I open the app bundle the system complains it needs 11.2 while I have 11.1. Similarly for /opt/local/libexec/llvm-11/bin/clang it can be run in terminal but xcrun seems to have problems with it.

I suspect that is just not the same checks are performed running a binary at the command line to through xcrun, or as a system application, and its something to do with the above. I've submitted a rebuild for all the llvm 11 ports so lets see if that helps.

comment:15 Changed 18 months ago by i0ntempest

Cc: i0ntempest added

comment:16 Changed 18 months ago by ShadSterling (Shad Sterling)

For my original problem of not being able to update R, I tried reinstalling clang-11, which failed to reinstall (possibly due to #63008), and without it installed I was able to install updated R. Now I'll try again to reinstall clang-11.

comment:17 Changed 18 months ago by cjones051073 (Chris Jones)

Unless you really have a need for universal builds, i would suggest staying away from them.

comment:18 Changed 18 months ago by kencu (Ken)

Hmm. Interesting.

If that rebuild fixes it, then I wonder how many things might have been build with:

MACOSX_DEPLOYMENT_TARGET='11.3'

that will now need to be rebuilt with

MACOSX_DEPLOYMENT_TARGET='11.0'

comment:19 Changed 18 months ago by i0ntempest

Revbumped clang 11 binaries from buildbot can now build R +openmp successfully.

comment:20 Changed 18 months ago by cjones051073 (Chris Jones)

Ok thanks will close this then. Sounds like xorg-server at least also will need rebuilding..

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:21 Changed 18 months ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: assignedclosed

comment:22 Changed 18 months ago by Chris Jones <jonesc@…>

In c1185f6b5c1868a12be4ad0512729af4a56f93bb/macports-ports (master):

xorg-server: rev bump to trigger rebuild using base 2.7.1
See: #63003#comment:8

comment:23 Changed 18 months ago by kencu (Ken)

I fear there may be hundreds of ports that need rebuilding.

comment:24 Changed 18 months ago by cjones051073 (Chris Jones)

I suspect not, as its only going to be select situations where it is a problem. E.g. application bundles or compilers run through xcrun. Anything just used at the command line will likely be OK.

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:25 Changed 18 months ago by cjones051073 (Chris Jones)

Also, most users on macOS 11 will likely be running 11.3 anyway so will not have a problem.

I would just wait and see what reports come in.

comment:26 Changed 18 months ago by kencu (Ken)

well, anything built by the buildbot was built with a dep target of 11.3 for a long time.

All those builds, hundreds or more, are affected.

Anyway, yes, horse has left the barn. Time will take care of it.

comment:27 Changed 18 months ago by kencu (Ken)

Component: portsbase
Port: clang-11 removed
Summary: clang-11: "C compiler cannot create executables"base 2.6.4 and buildbot built ports with deployment target of 11.3; will not run on earlier BigSur versions

comment:28 in reply to:  26 Changed 18 months ago by cjones051073 (Chris Jones)

Replying to kencu:

well, anything built by the buildbot was built with a dep target of 11.3 for a long time.

That by itself is not a problem. Its only a problem if they are used in certain ways. See the comments above that state clang built targettting 11.3 worked fine at the command line on its own. It only failed when run through xcrun, which performs additional checks. Similarly the X11 server binaries only failed to start when run as an application. At the command line they where OK.

The majority of ports will not be used in a way where this is an issue.

All those builds, hundreds or more, are affected.

Anyway, yes, horse has left the barn. Time will take care of it.

comment:29 Changed 18 months ago by kencu (Ken)

oh, I see your suggestion that command line binaries are perhaps unaffected.

I'll have to think about why not and see if that really turns out to be true...the dep target is embedded in the binary, so they should be affected.

If they are not, then presumably libs are OK too, and we might have dodged that one...

comment:30 Changed 18 months ago by kencu (Ken)

ie I can't for the moment see how running things through xcrun would cause the error, but running them directly would be fine...

if that is also true, I'll have to figure out why that would possibly be the case...

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:31 Changed 18 months ago by Wowfunhappy (Jonathan)

So, for the moment, OP should be able to work around this by setting buildfromsource to always in macports.conf, right? Installing ports will take a long time this way, of course.

Just trying to help them, since I don't think this was stated explicitly and they may not realize!

comment:32 Changed 18 months ago by kencu (Ken)

although that would fix it, it's a sour thing to recommend.

We're trying to get a sense still of how extensive, and how much of an issue, this will be.

Worst case, we revbump every port built during the 'dark period'.

Best case, we ignore it all, and it's a non-issue.

Likely -- some ports will need to be revbumped, as people notice and complain.

As I happen to have a BigSur system stuck on 11.2.3 due to OpenCore issues, I will probably be one of the people who see this more than others. Anyone who has updated BigSur to 11.3+ (which is almost everyone) won't see this at all.

comment:33 Changed 18 months ago by cjones051073 (Chris Jones)

Also note llvm/clang-11 has already been rev-bumped, so building from source is not required for this port.

Note: See TracTickets for help on using tickets.