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 build issue from source on ubuntu 22.04 #641

Closed
palec87 opened this issue Apr 17, 2024 · 1 comment
Closed

cmake build issue from source on ubuntu 22.04 #641

palec87 opened this issue Apr 17, 2024 · 1 comment
Labels
question Troubleshooting requests

Comments

@palec87
Copy link

palec87 commented Apr 17, 2024

Describe the problem
Hello, I ran into problems while doing cmake --build . on the pull from the current master branch

terminal error for all steps after [36/41]:

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
ninja: build stopped: subcommand failed.

CMakeError.log

Performing C SOURCE FILE Test c_fp_model_precise failed with the following output:
Change Dir: /home/davidp/python_repos/tomopy/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/ninja cmTC_0947d && [1/2] Building C object CMakeFiles/cmTC_0947d.dir/src.c.o
FAILED: CMakeFiles/cmTC_0947d.dir/src.c.o 
/usr/bin/cc -Dc_fp_model_precise  -fPIE   -fp-model=precise -std=gnu11 -o CMakeFiles/cmTC_0947d.dir/src.c.o -c /home/davidp/python_repos/tomopy/build/CMakeFiles/CMakeTmp/src.c
cc: error: unrecognized command-line option '-fp-model=precise'
ninja: build stopped: subcommand failed.


Source file was:
int main(void) { return 0; }
Performing C++ SOURCE FILE Test cxx_fp_model_precise failed with the following output:
Change Dir: /home/davidp/python_repos/tomopy/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/ninja cmTC_778b5 && [1/2] Building CXX object CMakeFiles/cmTC_778b5.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_778b5.dir/src.cxx.o 
/usr/bin/c++ -Dcxx_fp_model_precise  -fPIE   -fp-model=precise -std=gnu++11 -o CMakeFiles/cmTC_778b5.dir/src.cxx.o -c /home/davidp/python_repos/tomopy/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option '-fp-model=precise'
ninja: build stopped: subcommand failed.


Source file was:
int main() { return 0; }

To Reproduce (if applicable)
Installation specific: I had to manually changed path to the mkl library in CMakeCache.txt in the step, should be correct because mkl.h was found.
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_INSTALL_LIBDIR=lib

//MKL include directory
MKL_INCLUDE_DIR:PATH=/usr/include/mkl

//MKL root directory
MKL_ROOT_DIR:PATH=/usr/share/intel-mkl

Platform Information:

  • OS: [Ubuntu 22.04]
  • Python Version [e.g. 3.11]
  • TomoPy Version [e.g. 1.5.0]

Thank you for any hints. I managed to successfully install conda install -c conda-forge tomopy

@palec87 palec87 added the question Troubleshooting requests label Apr 17, 2024
@carterbox
Copy link
Member

cc: error: unrecognized command-line option '-fp-model=precise'

Your compiler does not support '-fp-model=precise'.

/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:

This error comes from the C++11 headers, not from TomoPy source code. Probably your compiler doesn't support C++11 syntax.

Thank you for any hints. I managed to successfully install conda install -c conda-forge tomopy

Happy to consider a PR for better compiler compatability, but probably you should just use the precompiled package from conda-forge or use newer compilers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Troubleshooting requests
Projects
None yet
Development

No branches or pull requests

2 participants