HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

`include(python-highs)`, cmake error, include could not find requested file

Open topazus opened this issue 1 year ago • 1 comments

❯ cmake . -B build -DPYTHON=ON -DFORTRAN=ON
-- The CXX compiler identification is Clang 17.0.6
-- The C compiler identification is Clang 17.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- HIGHS version: 1.6.0
-- Build C++ library: ON
-- Build Python: ON
-- Build Fortran: ON
-- Build CSharp: OFF
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of long
-- Check size of long - done
-- Found long size: 8
-- Check size of long long
-- Check size of long long - done
-- Found long long size: 8
-- Check size of int64_t
-- Check size of int64_t - done
-- Found int64_t size: 8
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Found unsigned long size: 8
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Found unsigned long long size: 8
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Found uint64_t size: 8
-- Check size of int *
-- Check size of int * - done
-- Found int * size: 8
-- Performing Test HIGHS_HAVE_MM_PAUSE
-- Performing Test HIGHS_HAVE_MM_PAUSE - Success
-- Performing Test HIGHS_HAVE_BUILTIN_CLZ
-- Performing Test HIGHS_HAVE_BUILTIN_CLZ - Success
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - /usr/bin/f95
-- The Fortran compiler identification is GNU 14.0.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/f95 - skipped
-- Performing Test NO_OMIT_FRAME_POINTER_FLAG_SUPPORTED
-- Performing Test NO_OMIT_FRAME_POINTER_FLAG_SUPPORTED - Success
-- Found ZLIB: /usr/lib64/libz.so (found suitable version "1.3.0", minimum required is "1.2.3")  
-- Git hash: dd4a9a2
-- Compilation date: 2024-02-12
-- FAST_BUILD set to on.
 Note: The HiGHS team is preparing for our first official release. If you
       experience any issues please let us know via email or on GitHub.
-- Build type: RELEASE
-- Build examples: ON
-- Build C++: 
-- Build Python: ON
-- Build CSharp: OFF
-- Build ZLIB: OFF
-- Python: Build pybind11: OFF
-- Python: Create venv: ON
-- Python: Allow venv to use system site packages: OFF
-- Python: Fetch dependencies: OFF
-- No CSharp support
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Error at CMakeLists.txt:567 (include):
  include could not find requested file:

    python-highs


-- Configuring test /tmp/HiGHS/examples/call_highs_from_cpp.cpp: ...
-- Configuring test /tmp/HiGHS/examples/call_highs_from_cpp.cpp: ...DONE
-- Configuring test /tmp/HiGHS/examples/call_highs_from_c.c: ...
-- Configuring test /tmp/HiGHS/examples/call_highs_from_c.c: ...DONE
-- Configuring incomplete, errors occurred!

topazus avatar Feb 12 '24 02:02 topazus

Thank you for raising this, building Python and Fortran at the same time is something we have yet to test, and points to something I need to fix in the CMake files. I will look at the details.

galabovaa avatar Feb 13 '24 21:02 galabovaa

The build system has been updated further, to make python stable. The PYTHON cmake option has now been removed. It has been replaces with PYTHON_BUILD_SETUP, which is intended to be called from scikit-build-core, when you call "pip install". The recommended way to install highspy is via "pip install ." from the root dir, or from PyPi. We have now pushed a pre-release version 1.7.1.dev0, which you are very welcome to check out. If you run into any further problems, please open a new issue.

Note, that setting PYTHON_BUILD_SETUP will disable building the standard C++ libraries, which Fortran will depend on. Please build Fortran and Python separately.

galabovaa avatar Mar 11 '24 14:03 galabovaa