1

I'm trying to cmake a c++ application and get the following error.

CMake Error at /home/prabhat/miniconda3/share/cmake/ZeroMQ/ZeroMQConfig.cmake:44 (include): include could not find load file:

/home/prabhat/miniconda3/share/cmake/ZeroMQ/ZeroMQTargets.cmake

Call Stack (most recent call first):

/usr/lib/x86_64-linux-gnu/cmake/ignition-cmake0/cmake0/FindZeroMQ.cmake:62 (find_package)

/usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:65 (find_package)

/usr/lib/x86_64-linux-gnu/cmake/ignition-transport4/ignition-transport4-config.cmake:107 (find_dependency)

/usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:197 (find_package) CMakeLists.txt:3 (find_package)

and line 44 of cmake is

'''if(NOT TARGET libzmq AND NOT TARGET libzmq-static) include("${CMAKE_CURRENT_LIST_DIR}/ZeroMQTargets.cmake")'''

Can anyone tell me how to fix this issue ? Thank you

  • Which libzmq version do you have and how did you install it? Which Linux distribution and version do you use? – Vasil Velichkov Nov 09 '19 at 01:17
  • Hi Vasil,I am using libzmq 4.2.2. I installed from thsi link here https://gist.github.com/katopz/8b766a5cb0ca96c816658e9407e83d00 Im on Ubuntu 16.04 – prabhat telidevara Nov 09 '19 at 01:49
  • Could you provide the full list of files in `/home/prabhat/miniconda3/share/cmake/ZeroMQ/`? Do you need miniconda3 for your application? The instruction you've used would install libzmq in `/usr/local` and not in `/home/prabhat/miniconda3/`. Did you install zeromq with `conda` command as well? – Vasil Velichkov Nov 09 '19 at 02:14
  • Here is the list of files in ../ZEROMQ/ **ZERMQConfig.cmake** and **ZEROMQVersionConfig.cmake** I did not install zeromq with conda command. Is tehre a way I can move the install files from **/usr/local** to **/minicona3/..** – prabhat telidevara Nov 09 '19 at 04:43
  • There is no way to move from /usr/local to ~/miniconda3. Better remove all miniconda environment variables from your ~/.bash_profile or ~/.bashrc and logout/login or reboot. – Vasil Velichkov Nov 09 '19 at 12:20
  • 1
    this seemed to work. I removed all of miniconda3 but now the error points to a location that doesnt exist on my drive **CMake Error in CMakeLists.txt: Imported target "ignition-transport4::ignition-transport4" includes non-existent path\n "/home/prabhat/miniconda3/include" in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: * The path was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and references files it does not provide.** – prabhat telidevara Nov 12 '19 at 10:02
  • Delete the `build` directory in order to clear the cmake's cache and then create it again to start from scratch. Another approach would be to try building your application in a clean docker container or in a clean VM, where you can install only the needed dependencies. – Vasil Velichkov Nov 12 '19 at 15:37
  • 1
    Deleted the build and created again. The original issue of the post is resolved. I still have make errors but that is to do with gazebo-9, seems like. – prabhat telidevara Nov 14 '19 at 09:39

0 Answers0