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 Error 'functional' file not found #253

Open
lotshawpc opened this issue Feb 3, 2022 · 3 comments
Open

CMake Error 'functional' file not found #253

lotshawpc opened this issue Feb 3, 2022 · 3 comments

Comments

@lotshawpc
Copy link

I'm trying to install QCOR on Mac using
git pull,
mkdir build,
cd build,
cmake .. -DXACC_BUILD_TESTS=TRUE -DXACC_BUILD_EXAMPLES=TRUE,
make -j 48 install

This returns an error at the end of the install

In file included from /Users/5ci/.xacc/include/qcor/qcor_lang_ext.hpp:12:
/Users/5ci/.xacc/include/qcor/objective_function.hpp:13:10: fatal error: 'functional' file not found
#include
^~~~~~~~~~~~
1 error generated.
CMake Error at runtime/cmake_install.cmake:89 (file):
file INSTALL cannot find
"/Users/5ci/qcor/build/runtime/qcor_lang_ext.hpp.pch": No such file or
directory.
Call Stack (most recent call first):
cmake_install.cmake:48 (include)

I've tried updating to the latest version of xacc before installing, but this didn't help. Any ideas what is going on?

@amccaskey
Copy link
Collaborator

Usually the 'include functional' not found error is related to not being able to find the xcode command line tools. Make sure you install that, and you might also set the SDKROOT environment variable. check out eclipse/xacc#430

For building from source check out https://aide-qc.github.io/deploy/getting_started/build_from_source/#a-idxqbrewa-xacc-and-qcor-on-mac-os-x-and-linux-x86_64-with-homebrew-not-ubuntu. For example, you wouldn't want to set XACC_BUILD* when running cmake for qcor.

@lotshawpc
Copy link
Author

lotshawpc commented Feb 8, 2022 via email

@KJay221
Copy link

KJay221 commented Dec 1, 2022

Hi, @amccaskey
I found same error when I install QCOR on ubuntu 22.04 LST using following command

$ git clone https://github.com/qir-alliance/qcor.git
$ cd qcor && mkdir build && cd build    
$ cmake .. -G Ninja -DLLVM_ROOT=/usr/local/aideqc/llvm
$ cmake --build . --target install

And I get error message when running $ cmake --build . --target install

In file included from /home/kjay/.xacc/include/qcor/qcor_lang_ext.hpp:12:
/home/kjay/.xacc/include/qcor/objective_function.hpp:13:10: fatal error: 'functional' file not found
#include <functional>
	 ^~~~~~~~~~~~
1 error generated.
CMake Error at runtime/cmake_install.cmake:98 (file):
  file INSTALL cannot find
  "/home/kjay/Desktop/quantum_computing/qcor/build/runtime/qcor_lang_ext.hpp.pch":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:53 (include)


FAILED: CMakeFiles/install.util 
cd /home/kjay/Desktop/quantum_computing/qcor/build && /home/kjay/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.

Any ideas or suggestions?
Thanks!!!

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