Skip to content

cmake fails on macos #4537

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

Closed
John-Colvin opened this issue Nov 27, 2023 · 1 comment
Closed

cmake fails on macos #4537

John-Colvin opened this issue Nov 27, 2023 · 1 comment

Comments

@John-Colvin
Copy link
Contributor

John-Colvin commented Nov 27, 2023

Current ldc master. Apple silicon. MacOS 14.1.1

I have seen this with other older ldc releases, other ldc bootstrap compiler versions, also with pointing a standalone llvm, other llvm versions...

It works if I re-run the cmake command, which means something is broken & not idempotent.

john@Johns-MacBook-Pro build % cmake ../ -DD_COMPILER=$HOME/dlang/ldc-1.35.0/bin/ldmd2 -DLLVM_CONFIG=/opt/homebrew/Cellar/llvm@16/16.0.6/bin/llvm-config -DCMAKE_BUILD_TYPE=Release
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is AppleClang 15.0.0.15000040
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found host D compiler /Users/john/dlang/ldc-1.35.0/bin/ldmd2, with default flags ''
-- Host D compiler ID: LDMD
-- Host D compiler version: LDC - the LLVM D compiler (1.35.0)
-- Host D compiler front-end version: 2105
-- LLVM_NATIVE_ARCH: AArch64
-- Found LLVM: /opt/homebrew/Cellar/llvm@16/16.0.6 (found suitable version "16.0.6", minimum required is "11.0") 
-- Using LLVM Version 16.0
-- LDC version identifier: 1.36.0-git-fe74d37-dirty
-- -- Building LDC with dynamic compilation support (LDC_DYNAMIC_COMPILE): OFF
-- -- Building LDC with integrated LLD linker (LDC_WITH_LLD): ON
-- -- Building LDC with enabled assertions (LDC_ENABLE_ASSERTIONS): OFF
CMake Error at cmake/Modules/ExtractDMDSystemLinker.cmake:42 (message):
  Failed to link empty D program using
  '/Users/john/dlang/ldc-1.35.0/bin/ldmd2 -wi':

  ld: library not found for -lpthread

  clang: error: linker command failed with exit code 1 (use -v to see
  invocation)

  Error: /Library/Developer/CommandLineTools/usr/bin/cc failed with status: 1
Call Stack (most recent call first):
  CMakeLists.txt:643 (include)


-- Configuring incomplete, errors occurred!
@kinke
Copy link
Member

kinke commented Nov 27, 2023

Duplicate of #3901.

@kinke kinke closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants