Skip to content

[Bug] Wrong libname in pkgconfig file #1088

@lxmchl

Description

@lxmchl

Describe the bug

After install/zenohc.pc.in is configured, the libname inside the zenohc.pc file is wrong:

Libs: -L${prefix}/lib -llibzenohc

It must be:

Libs: -L${prefix}/lib -lzenohc

Otherwise, the compiler would look for a liblibzenohc.so rather than libzenohc.so when linking.

To reproduce

  • first, build the zenohc library
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/.local
cmake --build . --target install
  • then, try to use pkgconfig file:

arm-unknown-linux-gnueabihf/bin/ld.bfd: cannot find -llibzenohc: No such file or directory

System info

  • Platform: ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions