You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CMake error with v2 changes on libabsl_log_severity.a #146
Hi, while using ros-humble-fields2cover (2.0.0-9jammy.20240516.152001), there is a reproducible issue with these 3 lines of minimal CMakeLists.txt. mkdir build; cd build; cmake ... This could be related to the ortools dependency. Any idea how can this be fixed and resolved?
root@0447bae7c411:/build# cmake ..
CMake Error at pt/ros/humble/lib/x86_64-linux-gnu/cmake/absl/abslTargets.cmake:1909 (message):
The imported target "absl::log_severity" references the file
"/opt/ros/humble/lib/lib/libabsl_log_severity.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/opt/ros/humble/lib/x86_64-linux-gnu/cmake/absl/abslTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/opt/ros/humble/lib/x86_64-linux-gnu/cmake/absl/abslConfig.cmake:32 (include)
/usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/opt/ros/humble/lib/x86_64-linux-gnu/cmake/ortools/ortoolsConfig.cmake:33 (find_dependency)
/usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/opt/ros/humble/lib/cmake/fields2cover/Fields2CoverConfig.cmake:14 (find_dependency)
CMakeLists.txt:4 (find_package)
It is used in swig/python/CMakeLists.txt and also in the spline dependency.
Copy and pasting comment made in opennav_coverage here too
The main problem of using the Fields2Cover package, (2.0.0-13noble.20240514.144256) right now is the command line flags that the ros buildfarm uses and what they do to the locations of where things get installed prior to creating the debian package.
Fields2Cover does not use ament_cmake and I when I started trying to help, I tried to workaround what was there. I introduced the use of cmake include(GNUInstallDirs) and used the variable CMAKE_INSTALL_LIBDIR which is overriden by the ros packaging command in a way that is not playing nicely.
Notice the -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
Notice that i tweak the install prefix to /optmw isolate it on my local dev system.
I have some ideas to get it to play nicely (in a ros package install) that I am playing around with.
My aim is to find a way to get the ortools sfuff installed in /opt/ros/rolling/opt/f2c_ortools while still working for a non-ros/non-ament build.
THIS #146 (remove libabsl-dev from Fields2Cover/package.xml) might be a simple fix for now but the way the Fields2Cover package is dumping ortools artifacts into /opt/ros/rolling should really be improved so I will keep plugging away at it.
#156 has been merged, but still I'm getting the exact same error as above (with the duplicate "lib" directory in the path). Is that known and are investigations still ongoing?
Hi @rovo89,
it usually takes a few days between the merging on our side and the ROS release. I've checked ROS iron and humble and they should be fine now.
Can you try again please?
I'm trying to compile it within another project. Inside the workspace, they have this repo's main branch checked out to src/lib/fields2cover (along with other dependencies). And then have colcon build --base-paths "src/lib/*" in their Makefile to compile it. This still fails with the error above, while changing into the directory and running colcon build there works fine (except for some python warnings and taking more than 3 minutes to compile).
I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.
I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.
Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?
I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.
Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?
Yah, sorry, should have specified. I cloned the repo.
I was also able to get it to compile and run by running rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -y to install lib_absl. After that it compiled fine.
Thanks for sharing the info! Is ./libraries/Fields2Cover the source cloned from this repo, or only the packed installed using apt?
Yah, sorry, should have specified. I cloned the repo.
Got it, did you install OR-tools by following the google's instructions?
Nope. Didn't do that. I think in the latest CMakes it downloads them
automatically if needed. Though I admit I had gotten it running before on
that computer so it may just have been seeing my previously downloaded
version.
Thanks! I got new errors if I try to build it, with such steps
git clone Fields2Cover repo, and put it into ./fields2cover_repo/src
install rosdep install -i --from-path ./src/Fields2Cover --rosdistro iron -y
in the ./fields2cover run colcon build, the errors of (
--- stderr: fields2cover
/home/repos/complete_coverate/build/fields2cover/swig/python/setup.py:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.sysconfig import get_python_lib
/home/repos/complete_coverate/build/fields2cover/swig/python/setup.py:2: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
from distutils.sysconfig import get_python_lib
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Hi @pl3703, those are warnings, not the actual error.
Sorry, let me clarify my question. When I tried to build opennav_coverage package using Fields2Cover as dependency, it gave such error. I clone both (Fields2Cover and opennav_coverage) in src/ folder and run colcon build on the outside of src/. Then I found Fields2Cover is able to build (using colcon build --packages-select fields2cover), but the opennav_coverage (who depends on Fields2Cover) failed.
CMake Error at /usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
Could not find a package configuration file provided by "ortools" with any
of the following names:
ortoolsConfig.cmake
ortools-config.cmake
Add the installation prefix of "ortools" to CMAKE_PREFIX_PATH or set
"ortools_DIR" to a directory containing one of the above files. If
"ortools" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
/home/repos/complete_coverate/install/fields2cover/lib/cmake/fields2cover/Fields2CoverConfig.cmake:18 (find_dependency)
CMakeLists.txt:18 (find_package)
I had the same issue on ROS2 Humble and I managed to fix that with below steps:
To fix ortools error I had to remove fields2cover from /usr (I installed it previosly with rosdep): find / -type f -iname "*fields2cover*" and then remove eveything related to that.
I had the same issue on ROS2 Humble and I managed to fix that with below steps:
To fix ortools error I had to remove fields2cover from /usr (I installed it previosly with rosdep): find / -type f -iname "*fields2cover*" and then remove eveything related to that.
No, I didn't. Checked to be sure with find / -type f -iname "*ortools*" and it's not installed.
Please let me know if this steps will work for you after you try.
No, I didn't. Checked to be sure with find / -type f -iname "*ortools*" and it's not installed. Please let me know if this steps will work for you after you try.
Thanks a lot! The humble version can be built successfully. Have you ever tried to build the iron with v2.0.0 Fields2cover? I'm still having the issue to complete this step
cd ~/ros2_ws/src/Fields2Cover`
mkdir -p build;
cd build; cmake -DCMAKE_BUILD_TYPE=Release ..;
make -j$(nproc);
sudo make install;
Error is
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required is at
least version "4.0")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindSWIG.cmake:153 (find_package_handle_standard_args)
swig/CMakeLists.txt:1 (find_package)
Activity
Gonzalo-Mier commentedon Jun 4, 2024
@aosmw, do you have any idea how to fix this?
wimos-ai commentedon Jun 4, 2024
In the package.xml, comment out the line that says, "libabsl-dev". At least that works for me
Gonzalo-Mier commentedon Jun 4, 2024
Let's try that
aosmw commentedon Jun 5, 2024
It might have something to do with the use of https://cmake.org/cmake/help/latest/variable/LIBRARY_OUTPUT_PATH.html
It is used in swig/python/CMakeLists.txt and also in the spline dependency.
Copy and pasting comment made in opennav_coverage here too
aosmw commentedon Jun 5, 2024
See Work In Progress #156
rovo89 commentedon Jun 20, 2024
#156 has been merged, but still I'm getting the exact same error as above (with the duplicate "lib" directory in the path). Is that known and are investigations still ongoing?
I can work around the issue by creating symlinks:
With that, the build is able to complete, but it's obviously very hacky.
Gonzalo-Mier commentedon Jun 24, 2024
Hi @rovo89,
it usually takes a few days between the merging on our side and the ROS release. I've checked ROS iron and humble and they should be fine now.
Can you try again please?
rovo89 commentedon Jun 24, 2024
I'm trying to compile it within another project. Inside the workspace, they have this repo's main branch checked out to
src/lib/fields2cover(along with other dependencies). And then havecolcon build --base-paths "src/lib/*"in their Makefile to compile it. This still fails with the error above, while changing into the directory and runningcolcon buildthere works fine (except for some python warnings and taking more than 3 minutes to compile).pl3703 commentedon Jun 29, 2024
I'm able to reproduce the error quite easily. Please find the steps
wimos-ai commentedon Jul 15, 2024
I was also able to get it to compile and run by running
rosdep install -i --from-path ./libraries/Fields2Cover --rosdistro humble -yto install lib_absl. After that it compiled fine.pl3703 commentedon Jul 18, 2024
Thanks for sharing the info! Is
./libraries/Fields2Coverthe source cloned from this repo, or only the packed installed using apt?wimos-ai commentedon Jul 18, 2024
Yah, sorry, should have specified. I cloned the repo.
pl3703 commentedon Jul 22, 2024
Got it, did you install OR-tools by following the google's instructions?
wimos-ai commentedon Jul 22, 2024
pl3703 commentedon Jul 23, 2024
Thanks! I got new errors if I try to build it, with such steps
./fields2cover_repo/srcrosdep install -i --from-path ./src/Fields2Cover --rosdistro iron -y./fields2coverruncolcon build, the errors of ()
Gonzalo-Mier commentedon Jul 23, 2024
Hi @pl3703, those are warnings, not the actual error.
pl3703 commentedon Jul 23, 2024
Sorry, let me clarify my question. When I tried to build opennav_coverage package using Fields2Cover as dependency, it gave such error. I clone both (Fields2Cover and opennav_coverage) in
src/folder and runcolcon buildon the outside ofsrc/. Then I found Fields2Cover is able to build (usingcolcon build --packages-select fields2cover), but the opennav_coverage (who depends on Fields2Cover) failed.Jakubach commentedon Jul 26, 2024
I had the same issue on ROS2 Humble and I managed to fix that with below steps:
To fix ortools error I had to remove
fields2coverfrom/usr(I installed it previosly withrosdep):find / -type f -iname "*fields2cover*"and then remove eveything related to that.Then make a new installation:
ros2_wsintosrc(git clone with selected branch doesn't work since there is no branch v1.2.1).Fields2Cover.opennav_coverageintosrc:git clone https://github.com/open-navigation/opennav_coverage.git -b humbleFields2Coverros2_wsdirectory):pl3703 commentedon Jul 30, 2024
Thanks! I'll try it today. BTW, did you install ortools before step 4?
Jakubach commentedon Jul 30, 2024
No, I didn't. Checked to be sure with
find / -type f -iname "*ortools*"and it's not installed.Please let me know if this steps will work for you after you try.
pl3703 commentedon Aug 2, 2024
Thanks a lot! The humble version can be built successfully. Have you ever tried to build the iron with v2.0.0 Fields2cover? I'm still having the issue to complete this step
Error is
pl3703 commentedon Aug 7, 2024
For iron version build, I'm able to build the v2.0.0 after installing dependencies by
apt install swig gnuplot libfftw3-dev.