Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc: revision for new Xcode #45585

Closed
wants to merge 2 commits into from
Closed

gcc: revision for new Xcode #45585

wants to merge 2 commits into from

Conversation

fxcoudert
Copy link
Member

Now that Mojave has Xcode 11 and the 10.15 SDK, we need to update GCC there so that it fixes the system headers. Since High Sierra also now has a new Xcode version, it seems appropriate to refresh our bottles, so users avoid a mismatched GCC / Xcode / SDK combination.

@fxcoudert fxcoudert mentioned this pull request Oct 19, 2019
@alebcay
Copy link
Member

alebcay commented Oct 21, 2019

ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0'
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0/../../..'
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0'
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0/../../..'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: ipopt: failed

It looks like ipopt is linking to #{lib} instead of #{opt_lib}.

@fxcoudert
Copy link
Member Author

ipopt is making gcc dump its internal paths and records those. Nasty behaviour :(

@SMillerDev
Copy link
Member

Anything we can do about that?

@fxcoudert
Copy link
Member Author

On Mojave, and Mojave only:

ImportError: dlopen(/usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: _aligned_alloc
  Referenced from: /usr/local/opt/gcc/lib/gcc/9/libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib
 in /usr/local/opt/gcc/lib/gcc/9/libgomp.1.dylib

It seems that libgomp (part of GCC) tries to use aligned_alloc, which is defined in the 10.15 SDK (part of Xcode 11 on Mojave) but apparement not available on Mojave system libraries.

One solution would be to force it off, configuring with ac_cv_func_aligned_alloc=no

@fxcoudert
Copy link
Member Author

Trying to fix by forcing the use of the SDK version that corresponds to the macOS version currently running (instead of latest SDK).

@fxcoudert
Copy link
Member Author

Compiling against the 10.14 SDK on Mojave is not enough. I need someone with access to a Mojave machine to tell me what the full output of brew install -s -v gcc is (in particular the libgomp configure).

@boris-kolpackov
Copy link
Contributor

@fxcoudert Strange, I was able to manually change the XCode 11.0 SDK symlink to 10.14 on 10.14.5 and successfully rebuild GCC from source (as per #46393).

@Bo98
Copy link
Member

Bo98 commented Nov 15, 2019

@fxcoudert We've discovered that the 11.0 CLT (11.1 CLT does not exist), which the CI uses, shipped with the wrong system headers in the 10.14 SDK: #46466 (comment). The problem has been fixed in 11.2.

Apparently a lot of people don't have the 11.0 CLT because Apple also botched up the update process, henced why this fix worked locally for some - they weren't using the broken CLT.

@EricFromCanada
Copy link
Member

@BrewTestBot Test this please

@Bo98
Copy link
Member

Bo98 commented Nov 21, 2019

This is building twice. Might want to kill the first one (I don't see how to).

@fxcoudert
Copy link
Member Author

abyss test data is missing (temporarily?)
Other than that, all good!

@EricFromCanada
Copy link
Member

Requested reupload of test data for abyss in bcgsc/abyss#305.

@lock lock bot added the outdated PR was locked due to age label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
@fxcoudert fxcoudert deleted the gcc branch October 12, 2020 19:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants