-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: install target not working: fails: file INSTALL cannot find absl-config.cmake #1025
Comments
hi, Thanks for the feedback, I need to rework the abseil-cpp integration against abseil/abseil-cpp#182 . or-tools should depends on On my way to fix it... |
@phillip-keldenich I also try to install v7.0-beta1 based on source code, and meet the following error: Do you fix this error? Finally, despite I haven't fix this error, I install v7.0 by |
No, for me, building (compiling etc.) worked fine, only installation didn't. This error sounds like some missing include directories somewhere in the build process. I also did not try to install ortools using pip (i.e., python package management), but directly using the source code. I guess that fixing any issues will be harder for you than for me since you are not (completely) in control of the build process and debugging a build done on-the-fly by a package manager like pip will at least be quite inconvenient. Without further information, it also is not clear whether the problem is a bug in the pip package (possible) or ortools itself (also possible). |
The main issues with the current CMake based build, is:
EDIT: mostly fix by #1116 For OR-Tools only, need to explain how to install dependencies if your package manager (apk, pacman, yum, apt-get, zypper, homebrew, vcpkg, conan, hunter) doesn't provide them (ed or not at the right version)... |
Don't want to block the release v7.0 which BTW only use the Makefile-based build to generate all its binary artifacts. |
I tried building and installing the source code from git (I tried both master and tags/v7.0-beta1 with the same error) on Mac OS, installing as dependencies only wget/cmake (using homebrew).
Configuring, building and even testing using the standard CMake workflow
work fine (except for tons of warnings regarding the deprecated "register" keyword and some .cc-files without symbols).
However, running make install (or, equivalently, cmake --build . --target install) fails because the file build/abseil-cpp-src/CMake/absl-config.cmake is missing.
I tried to run
too see whether the file is present somewhere else, but there appears to be no such file in the build directory.
If I manually add an empty file in its place, the install goes through without error. However, as expected, I cannot use ortools in my cmake project with an empty absl-config.cmake file installed:
yields the following error:
I then proceeded to find absl-config.cmake in /patches (in the source directory).
This file seems to contain a syntax error at least in tags/v7.0-beta1 (missing closing parenthesis).
I guess something was supposed to copy that file to the build directory where install expects it; I did that manually, retried the install, and it worked.
I still had no luck consuming ortools cmake config files in my cmake project, still with the same error message as before.
Adding a
find_package(absl CONFIG REQUIRED)
before that fixed this issue, so that configuring, building and linking (in my own CMake project) against ortools::ortools now works.
Was I doing something wrong here, like missing a "patching" step when running cmake? Then that should maybe be included somewhere in the documentation.
The text was updated successfully, but these errors were encountered: