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

Cmake errors when installing on mac osx #61

Closed
bnord opened this issue Aug 29, 2018 · 1 comment
Closed

Cmake errors when installing on mac osx #61

bnord opened this issue Aug 29, 2018 · 1 comment

Comments

@bnord
Copy link

bnord commented Aug 29, 2018

Context:

  1. mac os x sierra
  2. Conda environment activated
  3. xcode with command line tools installed

While following installation instructions:

| => cmake ..
-- C++ version  configured.
-- Installing XACC to /usr/local. Override with -DCMAKE_INSTALL_PREFIX=...
CMake Error at /anaconda3/envs/proj-astroqml/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /anaconda3/envs/proj-astroqml/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /anaconda3/envs/proj-astroqml/share/cmake-3.11/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  tpls/cppmicroservices/CMakeLists.txt:441 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/nord/Code/xacc/build/CMakeFiles/CMakeOutput.log".
See also "/Users/nord/Code/xacc/build/CMakeFiles/CMakeError.log".
@bnord
Copy link
Author

bnord commented Aug 29, 2018

@amccaskey and @bnord discussed on project slack and the following solution was suggested

add the following lines of code to the top-level CMakeLists.txt file

set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)

I put them right before the option(XACC_BUILD_TESTS...) call

These lines found in this page

ausbin pushed a commit to ausbin/xacc that referenced this issue Dec 18, 2024
Instantiated JSON programmatically in IBM plugin
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