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

Mark binutils-related conflicts #15075

Merged
merged 3 commits into from
Feb 20, 2020
Merged

Conversation

sethrj
Copy link
Contributor

@sethrj sethrj commented Feb 19, 2020

When binutils builds on macOS, it omits ld and other key components. Additionally, gcc+binutils %clang sends invalid arguments to the linker since it assumes it's being built with GCC. This MR:

  • marks binutils+gold as conflicting with platform=darwin since ld.gold doesn't actually get built in this case;
  • marks gcc+binutils on darwin as well, for the same reasons
  • marks gcc+binutils+nvptx as conflicting since +binutils requires bootstrapping and +nvptx explicitly disables it.

Configure errors when building with %clang

configure: error: C compiler cannot create executables
See `config.log' for more details.
checking for C compiler default output file name... checking for suffix of object files... checking for C compiler default output file name... make[2]: *** [configure-stage1-libdecnumber] Error 77

where closer inspection of spack-src/spack-build/libdecnumber/config.log shows

configure:2649: /ornldev/code/spack/lib/spack/env/clang/clang -g   -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/gcc/f2gezvp/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/gcc/f2gezvp/lib64 -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/binutils/alksglg/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/gmp/icsy6fw/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/isl/uvsapsa/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/libiconv/jg6ekuh/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/mpc/eam5ugi/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/mpfr/pzmx6wv/lib -Wl,-rpath,/ornldev/code/spack/opt/spack/clang-11.0.0-apple/zlib/xj36ejk/lib -static-libstdc++ -static-libgcc -Wl,-no_pie  conftest.c  >&5
clang: error: unsupported option '-static-libgcc'
configure:2653: $? = 1
configure:2690: result: 
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libdecnumber"
| #define PACKAGE_TARNAME "libdecnumber"
| #define PACKAGE_VERSION " "
| #define PACKAGE_STRING "libdecnumber  "
| #define PACKAGE_BUGREPORT "gcc-bugs@gcc.gnu.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2696: error: in `/private/var/folders/fy/x2xtwh1n7fn0_0q2kk29xkv9vvmbqb/T/s3j/spack-stage/spack-stage-gcc-8.3.0-f2gezvpdyzaxh3drmmiz6i2ou22vgbip/spack-src/spack-build/libdecnumber':
configure:2700: error: C compiler cannot create executables
See `config.log' for more details.

After fixing that error but still using +binutils

configure: error: cannot execute: /ornldev/code/spack/opt/spack/clang-11.0.0-apple/binutils/alksglg/bin/ld: check --with-ld or env. var. DEFAULT_LINKER

Copy link
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with these changes (I've never used +binutils or +gold), but I would like to see someone else review this before merging.

@sethrj
Copy link
Contributor Author

sethrj commented Feb 20, 2020

The +binutils stuff was due to @eschnett four years ago, maybe he could comment?

@eschnett
Copy link
Contributor

I used to have problems building gcc on MacOS. These days, the default build options for gcc work for me. I don't build binutils any more (on MacOS), so removing support for it is fine by me.

@adamjstewart adamjstewart merged commit a1e3a16 into spack:develop Feb 20, 2020
eugeneswalker pushed a commit to eugeneswalker/spack that referenced this pull request Feb 25, 2020
* Mark conflicts with binutils on darwin

* Explicitly require binutils bootstrapping and mark conflict with nvptx

* Disable gold variant by default on darwin
@sethrj sethrj deleted the binutils-conflicts branch March 17, 2020 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants