I'm on ubuntu 18.04LTS
cmake version 3.10.2
git version 2.17.1
Steps to reproduce:
git clone https://github.com/google/or-tools.git
cd or-tools
mkdir build && cd build
cmake ..
The error I get is the following:
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- version: 7.3.7089
-- Build C++ library: ON
-- Build Python: OFF
-- Build Java: OFF
-- Build .Net: OFF
-- Build all dependencies: OFF
-- Build ZLIB: OFF
-- Build abseil-cpp: OFF
-- Build gflags: OFF
-- Build glog: OFF
-- Build protobuf: OFF
-- Build CoinUtils: OFF
-- Build Osi: OFF
-- Build Clp: OFF
-- Build Cgl: OFF
-- Build Cbc: OFF
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
CMake Error at cmake/cpp.cmake:11 (find_package):
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:88 (include)
-- Configuring incomplete, errors occurred!
can you check if pkg-conf is installed ?
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le lun. 7 oct. 2019 Ã 15:29, Connor Riley notifications@github.com a
écrit :
I'm on ubuntu 18.04LTS
cmake version 3.10.2
git version 2.17.1Steps to reproduce:
cd or-tools
mkdir build && cd build
cmake ..The error I get is the following:
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- version: 7.3.7089
-- Build C++ library: ON
-- Build Python: OFF
-- Build Java: OFF
-- Build .Net: OFF
-- Build all dependencies: OFF
-- Build ZLIB: OFF
-- Build abseil-cpp: OFF
-- Build gflags: OFF
-- Build glog: OFF
-- Build protobuf: OFF
-- Build CoinUtils: OFF
-- Build Osi: OFF
-- Build Clp: OFF
-- Build Cgl: OFF
-- Build Cbc: OFF
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
CMake Error at cmake/cpp.cmake:11 (find_package):
Could not find a package configuration file provided by "absl" with any of
the following names:abslConfig.cmake
absl-config.cmakeAdd the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:88 (include)-- Configuring incomplete, errors occurred!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1630?email_source=notifications&email_token=ACUPL3L3VOT46GH34FE3SRTQNOEYJA5CNFSM4I6IYYF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQFAK6A,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3MSEG5JCIHOI6DG2DTQNOEYJANCNFSM4I6IYYFQ
.
Hi Laurent,
I'm not sure what pkg-conf is -- I have pkg-config installed (0.29.1). Is that the same thing?
Please note that cmake support is still experimental.
This being said, it is tested by our travis continuous build. So I guess
the problem is some missing part.
Was the other component build ? (gflags, glog, protobuf...)
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le lun. 7 oct. 2019 Ã 16:02, Connor Riley notifications@github.com a
écrit :
Hi Laurent,
I'm not sure what pkg-conf is -- I have pkg-config installed (0.29.1). Is
that the same thing?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1630?email_source=notifications&email_token=ACUPL3N6HJLGUM4HIFDCFVLQNOIW7A5CNFSM4I6IYYF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEARTYAY#issuecomment-539180035,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3ITEX6LMOYGER4TN2DQNOIW7ANCNFSM4I6IYYFQ
.
Nothing was built -- I just tried to invoke cmake to configure the project and got the error above. Is there something I should have done before invoking cmake on the root directory of the project?
Looking at the cmake file, it seems like the first package that is looked for is absl (line 34 of ortoolsConfig.cmake.in) which is where I'm getting an error. I think gflags, glog, protobuf are all looked for after absl
can you try adding: -DBUILD_DEPS:BOOL=ON
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le lun. 7 oct. 2019 Ã 16:10, Connor Riley notifications@github.com a
écrit :
Nothing was built -- I just tried to invoke cmake to configure the project
and got the error above. Is there something I should have done before
invoking cmake on the root directory of the project?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1630?email_source=notifications&email_token=ACUPL3OGHQS35EVB2FFZWX3QNOJUZA5CNFSM4I6IYYF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEARUQNQ#issuecomment-539183158,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3OHRGMYU4IEQ2SWWUTQNOJUZANCNFSM4I6IYYFQ
.
Yup that fixed it -- thanks!
Hey @lperron, can confirm that this fix also worked for me - thank you!
I'd like to confirm that using cmake -DBUILD_DEPS:BOOL=ON works in the project.
However, when I want to include it into another, I get a failure:
set(BUILD_DEPS ON)
add_subdirectory(external/or-tools)
add_executable(ortools_test ortools_test.cpp)
target_link_libraries(ortools_test ortools::ortools)
Output from cmake on my project:
-- version: 7.4.7259
-- Build C++ library: ON
-- Build Python: OFF
-- Build Java: OFF
-- Build .Net: OFF
-- USE_XPRESS: OFF
-- USE_CPLEX: OFF
-- Build all dependencies: ON
-- Build ZLIB: ON
-- Build abseil-cpp: ON
-- Build gflags: ON
-- Build glog: ON
-- Build protobuf: ON
-- Build CoinUtils: ON
-- Build Osi: ON
-- Build Clp: ON
-- Build Cgl: ON
-- Build Cbc: ON
-- Building ZLIB: ...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/michal/Code/GT/gtlib2/cmake-build-debug-clang/external/or-tools/dependencies/ZLIB/project_build
[ 11%] Performing patch step for 'ZLIB_project'
error: can't open patch '/home/michal/Code/GT/gtlib2/patches/ZLIB.patch': No such file or directory
make[2]: *** [CMakeFiles/ZLIB_project.dir/build.make:101: ../stamp/ZLIB_project-patch] Error 128
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/ZLIB_project.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
CMake Error at external/or-tools/cmake/utils.cmake:122 (message):
Build step for ZLIB failed: 2
Call Stack (most recent call first):
external/or-tools/cmake/dependencies/CMakeLists.txt:35 (build_git_dependency)
I tried to create the folder with patches: /home/michal/Code/GT/gtlib2/patches/ but that didn't help. Any ideas?
@michalsustr seems to be a bug
https://github.com/google/or-tools/blob/858fa626959f7e386153af82756384b79f983b5a/cmake/dependencies/CMakeLists.txt#L42-L44
should use CMAKE_CURRENT_LIST_DIR IMHO, need to test...
Most helpful comment
can you try adding: -DBUILD_DEPS:BOOL=ON
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le lun. 7 oct. 2019 Ã 16:10, Connor Riley notifications@github.com a
écrit :