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

Failed to configure in BigSur (m1) #1423

Closed
sangwoo-joh opened this issue Sep 9, 2021 · 5 comments
Closed

Failed to configure in BigSur (m1) #1423

sangwoo-joh opened this issue Sep 9, 2021 · 5 comments

Comments

@sangwoo-joh
Copy link

Describe the bug
It failed to ./configure in Big Sur with M1 chip.
I've installed llvm via brew install llvm, and Xcode is fully installed too.

./configure
Running cmake:
"cmake" "." -DCMAKE_EXPORT_COMPILE_COMMANDS=1

-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- 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
-- llvm-config executable found: /opt/homebrew/opt/llvm/bin/llvm-config
-- Using Clang version 12.0.1 from /opt/homebrew/Cellar/llvm/12.0.1/lib with CXXFLAGS -I/opt/homebrew/Cellar/llvm/12.0.1/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-- Found LibClang: /opt/homebrew/Cellar/llvm/12.0.1/lib/libclang.dylib  
-- Performing Test LIBCLANG_COMPILES
-- Performing Test LIBCLANG_COMPILES - Success
-- Performing Test CXX_11_EXTENDED_REGEX_SUPPORT
-- Performing Test CXX_11_EXTENDED_REGEX_SUPPORT - Success
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2") 
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for CLOCK_MONOTONIC_RAW
-- Looking for CLOCK_MONOTONIC_RAW - found
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - found
-- Looking for inotify_init
-- Looking for inotify_init - not found
-- Looking for kqueue
-- Looking for kqueue - found
-- Looking for epoll_wait
-- Looking for epoll_wait - not found
-- Looking for select
-- Looking for select - found
-- Looking for FD_CLOEXEC
-- Looking for FD_CLOEXEC - found
-- Looking for SO_NOSIGPIPE
-- Looking for SO_NOSIGPIPE - found
-- Looking for MSG_NOSIGNAL
-- Looking for MSG_NOSIGNAL - found
-- Looking for GetLogicalProcessorInformation
-- Looking for GetLogicalProcessorInformation - not found
-- Looking for SCHED_IDLE
-- Looking for SCHED_IDLE - not found
-- Looking for SHM_DEST
-- Looking for SHM_DEST - not found
OS X version 11.5.2
-- Using FSEvents
-- Performing Test HAVE_STATMTIM
-- Performing Test HAVE_STATMTIM - Failed
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd (found version "1.2.11") 
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
-- Checking for one of the modules 'openssl'
OPENSSL Can't be found. Rct configured without openssl support
-- Performing Test HAVE_CXX11
-- Performing Test HAVE_CXX11 - Failed
CMake Error at src/rct/rct.cmake:262 (message):
  C++11 support not detected.  rct requires a modern compiler, GCC >= 4.8 or
  Clang >= 3.2 should suffice
Call Stack (most recent call first):
  src/CMakeLists.txt:144 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/sangwoo-joh/.dotfiles/rtags/CMakeFiles/CMakeOutput.log".
See also "/Users/sangwoo-joh/.dotfiles/rtags/CMakeFiles/CMakeError.log".

It seems rct.cmake does not recognize the installed clang. However,

❯ clang --version
Homebrew clang version 12.0.1
Target: arm64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

I wonder what I'm missing!

Environment (please complete the following information):

  • OS/Version: macOS Big Sur (11.5.2) (with Apple M1 Chip)
  • Emacs: emacs-plus@28 --with-native-comp
  • LLVM/Clang: check the following:
> brew info llvm
llvm: stable 12.0.1 (bottled), HEAD [keg-only]
Next-gen compiler infrastructure
https://llvm.org/
/opt/homebrew/Cellar/llvm/12.0.1 (9,803 files, 1.5GB)
  Poured from bottle on 2021-09-09 at 11:59:12
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/llvm.rb
License: Apache-2.0 with LLVM-exception
==> Dependencies
Build: cmake ✔, swig ✘
Required: [email protected] ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
To use the bundled libc++ please add the following LDFLAGS:
  LDFLAGS="-L/opt/homebrew/opt/llvm/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib"

llvm is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have llvm first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc

For compilers to find llvm you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"

==> Analytics
install: 17,205 (30 days), 61,440 (90 days), 261,611 (365 days)
install-on-request: 11,864 (30 days), 41,121 (90 days), 198,778 (365 days)
build-error: 0 (30 days)
@jhanssen
Copy link
Collaborator

jhanssen commented Sep 9, 2021

I believe this should be fixed with cdff9b4.

@jhanssen jhanssen closed this as completed Sep 9, 2021
@sangwoo-joh
Copy link
Author

@jhanssen ,
Thanks for your update.
However, it seems like this was not fixed by that commit. My cmake version is below:

❯ cmake --version
cmake version 3.21.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

@jhanssen
Copy link
Collaborator

jhanssen commented Sep 9, 2021

I just tried a clean checkout and it seems to work for me. Could you try a clean checkout, alternatively run git clean -xfd . in the source tree and try again?

@sangwoo-joh
Copy link
Author

@jhanssen Thanks for your update, and thanks for the useful git clean command (I had used git checkout ...)
But it still has the same issue. HAVE_CXX11 Failed.

@sangwoo-joh
Copy link
Author

@jhanssen
After I've switched to v2.38 tag, it did succeed to ./configure, but it seems like the build is now the problem.
I will make another issue for this.
Thanks for your help!

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