-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Installation issue: binutils 2.42 on macOS #42947
Copy link
Copy link
Closed
Labels
Description
Steps to reproduce the issue
$ spack spec -I [email protected] %apple-clang
- [email protected]%[email protected]~gas~gprofng~headers~interwork~ld~libiberty~lto~nls~pgo+plugins build_system=autotools compress_debug_sections=zlib libs=shared,static arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected] build_system=autotools arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sonoma-m2
[+] ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected] build_system=autotools arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected]+compat+opt build_system=autotools arch=darwin-sonoma-m2
[+] ^[email protected]%[email protected]+programs build_system=makefile compression=none libs=shared,static arch=darwin-sonoma-m2
Error message
Error message for darwin-sonoma-m2, essentially same for GCC and Apple Clang
libtool: link: /Users/ejberqu/development/forks/spack/lib/spack/env/clang/clang -dynamiclib -o .libs/libctf-nobfd.0.dylib .libs/libctf_nobfd_la-ctf-archive.o .libs/libctf_nobfd_la-ctf-dump.o .libs/libctf_nobfd_la-ctf-create.o .libs/libctf_nobfd_la-ctf-decl.o .libs/libctf_nobfd_la-ctf-error.o .libs/libctf_nobfd_la-ctf-hash.o .libs/libctf_nobfd_la-ctf-labels.o .libs/libctf_nobfd_la-ctf-dedup.o .libs/libctf_nobfd_la-ctf-link.o .libs/libctf_nobfd_la-ctf-lookup.o .libs/libctf_nobfd_la-ctf-open.o .libs/libctf_nobfd_la-ctf-serialize.o .libs/libctf_nobfd_la-ctf-sha1.o .libs/libctf_nobfd_la-ctf-string.o .libs/libctf_nobfd_la-ctf-subr.o .libs/libctf_nobfd_la-ctf-types.o .libs/libctf_nobfd_la-ctf-util.o -L/private/var/folders/mv/cxdf9v7s4tj9_xrqn0bjmmhw0046c5/T/ejberqu/spack-stage/spack-stage-binutils-2.42-slnhx2cd627q4yns4zvxbt72togvs66j/spack-src/libctf/../libiberty/pic -liberty -lz -install_name /Users/ejberqu/development/forks/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder_/darwin-sonoma-m2/apple-clang-15.0.0/binutils-2.42-slnhx2cd627q4yns4zvxbt72togvs66j/lib/libctf-nobfd.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-exported_symbols_list,.libs/libctf-nobfd-symbols.expsym
ld: Undefined symbols:
_ctf_open, referenced from:
_ctf_link_add_ctf in libctf_nobfd_la-ctf-link.o
_ctf_link_deduplicating_count_inputs in libctf_nobfd_la-ctf-link.o
Error message for darwin-ventura-skylake
2024-03-01T16:33:46.3655620Z libtool: link: /Users/runner/work/sst-spack/sst-spack/spack/lib/spack/env/clang/clang -dynamiclib -o .libs/libctf-nobfd.0.dylib .libs/libctf_nobfd_la-ctf-archive.o .libs/libctf_nobfd_la-ctf-dump.o .libs/libctf_nobfd_la-ctf-create.o .libs/libctf_nobfd_la-ctf-decl.o .libs/libctf_nobfd_la-ctf-error.o .libs/libctf_nobfd_la-ctf-hash.o .libs/libctf_nobfd_la-ctf-labels.o .libs/libctf_nobfd_la-ctf-dedup.o .libs/libctf_nobfd_la-ctf-link.o .libs/libctf_nobfd_la-ctf-lookup.o .libs/libctf_nobfd_la-ctf-open.o .libs/libctf_nobfd_la-ctf-serialize.o .libs/libctf_nobfd_la-ctf-sha1.o .libs/libctf_nobfd_la-ctf-string.o .libs/libctf_nobfd_la-ctf-subr.o .libs/libctf_nobfd_la-ctf-types.o .libs/libctf_nobfd_la-ctf-util.o -L/private/var/folders/f8/xn9w26457_v2fc5qzhbrlyj00000gn/T/runner/spack-stage/spack-stage-binutils-2.42-zsxtatmgqkdn7tvak2zxcp4nvxn7wit3/spack-src/libctf/../libiberty/pic -liberty -lz -install_name /Users/runner/work/sst-spack/sst-spack/spack/opt/spack/[padded-to-128-chars]/darwin-ventura-skylake/apple-clang-15.0.0/binutils-2.42-zsxtatmgqkdn7tvak2zxcp4nvxn7wit3/lib/libctf-nobfd.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-exported_symbols_list,.libs/libctf-nobfd-symbols.expsym 2024-03-01T16:33:46.4761430Z ld: Undefined symbols: 2024-03-01T16:33:46.5061900Z _ctf_open, referenced from: 2024-03-01T16:33:46.5064060Z _ctf_link_add_ctf in libctf_nobfd_la-ctf-link.o 2024-03-01T16:33:46.5065040Z _ctf_link_deduplicating_count_inputs in libctf_nobfd_la-ctf-link.o
Information on your system
- Spack: 0.22.0.dev0 (763f444)
- Python: 3.9.6
- Platform: darwin-sonoma-m2
- Concretizer: clingo
Additional information
spack-build-out-m2-apple-clang.txt
spack-build-out-m2-gcc.txt
I don't have the full build logs from the Intel machines right now, they're GitHub runners.
I have a branch with a requires that locks out 2.42 from macOS, but will try this patch instead, from Homebrew/homebrew-core#161274:
diff --git a/gold/output.cc b/gold/output.cc
index ead67f20363..98b2f25c18b 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -29,7 +29,9 @@
#include <unistd.h>
#include <sys/stat.h>
#include <algorithm>
+#ifndef __APPLE__
#include <uchar.h>
+#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
diff --git a/gold/stringpool.cc b/gold/stringpool.cc
index d8f38cfabc1..e04909edad1 100644
--- a/gold/stringpool.cc
+++ b/gold/stringpool.cc
@@ -25,7 +25,9 @@
#include <cstring>
#include <algorithm>
#include <vector>
+#ifndef __APPLE__
#include <uchar.h>
+#endif
#include "output.h"
#include "parameters.h"General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have run
spack maintainers <name-of-the-package>and @mentioned any maintainers - I have uploaded the build log and environment files
- I have searched the issues of this repo and believe this is not a duplicate
Reactions are currently unavailable