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

clang++-19: error: linker command failed with exit code 1 on macOS #64

Open
ClausKlein opened this issue Nov 1, 2024 · 1 comment
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ClausKlein
Copy link

bash-5.2$ cmake --workflow --preset release
Executing workflow step 1 of 3: configure preset "release"

Preset CMake variables:

  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_CXX_EXTENSIONS:BOOL="FALSE"
  CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wno-shadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Woverloaded-virtual -Wformat=2 -Wno-error"
  CMAKE_CXX_STANDARD="26"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  CMAKE_EXPORT_COMPILE_COMMANDS:BOOL="TRUE"
  CMAKE_INSTALL_PREFIX:PATH="/Users/clausklein/Workspace/cpp/beman-project/exemplar/stagedir"
  CMAKE_PREFIX_PATH:STRING="/Users/clausklein/Workspace/cpp/beman-project/exemplar/stagedir"

-- The CXX compiler identification is Clang 19.1.2
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/beman-project/exemplar/build/release

Executing workflow step 2 of 3: build preset "release"

[7/10] Linking CXX static library src/beman/exemplar/libbeman.exemplar.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: src/beman/exemplar/libbeman.exemplar.a(identity.cpp.o) has no symbols
[9/10] Linking CXX executable examples/beman.exemplar.examples.identity_direct_usage
FAILED: examples/beman.exemplar.examples.identity_direct_usage 
: && /usr/local/opt/llvm/bin/clang++ -Wall -Wextra -Wpedantic -Wno-shadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Woverloaded-virtual -Wformat=2 -Wno-error -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/usr/local/opt/llvm/lib/c++ examples/CMakeFiles/beman.exemplar.examples.identity_direct_usage.dir/identity_direct_usage.cpp.o -o examples/beman.exemplar.examples.identity_direct_usage  src/beman/exemplar/libbeman.exemplar.a && :
ld: archive member '/' not a mach-o file in '/Users/clausklein/Workspace/cpp/beman-project/exemplar/build/release/src/beman/exemplar/libbeman.exemplar.a'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
bash-5.2$ 
@bretbrownjr bretbrownjr added bug Something isn't working help wanted Extra attention is needed labels Nov 1, 2024
@ClausKlein
Copy link
Author

ClausKlein commented Nov 1, 2024

see how to fix it #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants