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

build successfully on macOS monterey but can't find old llvm@12 dylib #107

Open
Inc0n opened this issue Jun 28, 2022 · 2 comments
Open

build successfully on macOS monterey but can't find old llvm@12 dylib #107

Inc0n opened this issue Jun 28, 2022 · 2 comments

Comments

@Inc0n
Copy link

Inc0n commented Jun 28, 2022

Build was successful using the script copied from #104 (comment), with the only difference that llvm@13 is installed, and all environmental variables are changed accordingly.

However, when running c2ffi, it produced the following error:

dyld[11622]: Library not loaded: /opt/homebrew/opt/llvm@12/lib/libclang-cpp.dylib
  Referenced from: /Users/xception/.local/bin/c2ffi
  Reason: tried: '/opt/homebrew/opt/llvm@12/lib/libclang-cpp.dylib' (no such file), '/usr/local/lib/libclang-cpp.dylib' (no such file), '/usr/lib/libclang-cpp.dylib' (no such file)
zsh: abort      c2ffi

It's trying to find llvm@12, whilst the configured llvm is versioned 13.

The actual build script used
mkdir -p build
cd build
export CPPFLAGS="-I/opt/homebrew/opt/llvm@13/include"
export LDFLAGS="-L/opt/homebrew/opt/llvm@13/lib"
export PATH="/opt/homebrew/opt/llvm@13/bin:$PATH"
LLVM_DIR=/opt/homebrew/opt/llvm@13/ CC="clang" CXX="clang++" cmake --install-prefix ~/.local/bin ..
make
make install
@Inc0n Inc0n changed the title c2ffi build successful on macOS monterey but can't find old llvm@12 dylib build successfully on macOS monterey but can't find old llvm@12 dylib Jun 28, 2022
@eliascotto
Copy link

On my macOS Monterey 12.4 with M1 I get the following error with your script

➜  build git:(llvm-13.0.0) export CPPFLAGS="-I/opt/homebrew/opt/llvm@13/include"
➜  build git:(llvm-13.0.0) export LDFLAGS="-L/opt/homebrew/opt/llvm@13/lib"
➜  build git:(llvm-13.0.0) export PATH="/opt/homebrew/opt/llvm@13/bin:$PATH"
➜  build git:(llvm-13.0.0) LLVM_DIR=/opt/homebrew/opt/llvm@13/ CC="clang" CXX="clang++" cmake --install-prefix ~/.local/bin ..
-- Config: -Release
-- CXX Compiler: AppleClang
-- Building for Linux-x64
-- Found LLVM 13.0.1
-- LLVM installed in /opt/homebrew/opt/llvm@13
-- Using LLVMConfig.cmake in: /opt/homebrew/opt/llvm@13/lib/cmake/llvm
CMake Error at CMake/cxx_features.cmake:102 (__cxx_std_process):
  Unknown CMake command "__cxx_std_process".
Call Stack (most recent call first):
  CMakeLists.txt:62 (target_cxx_std)


-- Configuring incomplete, errors occurred!
See also "/Users/elia/c2ffi/build/CMakeFiles/CMakeOutput.log".
See also "/Users/elia/c2ffi/build/CMakeFiles/CMakeError.log".

@jcguu95
Copy link

jcguu95 commented Apr 9, 2023

Related: #104

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

3 participants