Skip to content

The binary installation and source code installation paths are different #419

@Plumezz

Description

@Plumezz

Hello,

When I built package libhri, it needs the magic_enum package. So I built and installed the package from source.

For the face.cpp of libhri package, it includes magic_enum by this way #include "magic_enum.hpp".

But it built faild with follow error:

/home/qiguanxiao/ws/ws_libhri/hri/src/hri/face.cpp:27:10: fatal error: magic_enum.hpp: No such file or directory
   27 | #include "magic_enum.hpp"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/hri.dir/build.make:90: CMakeFiles/hri.dir/src/hri/face.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:174: CMakeFiles/hri.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< hri [17.3s, exited with code 2]

I found that the source installation paths is ws/install/magic_enum/include/magic_enum/magic_enum.hpp.
So I replaced #include "magic_enum.hpp" with #include "magic_enum/magic_enum.hpp" in face.cpp. Finally it can be built correctly.

Then I used sudo apt install ros-humble-magic-enum to install the binary packge.
I found that the install path is /opt/ros/humble/include/magic_enum.hpp.
It does not have the prefix module. So the way #include "magic_enum.hpp" is correct.
But for other packages that I used apt to install, their install path are "/opt/ros/humble/include/package/file.hpp".

So I wonder to know if I went wrong or the project itself does have problems.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions