Skip to content
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

libsinsp.pc references build tree instead of install prefix #1825

Open
Apteryks opened this issue May 2, 2024 · 1 comment
Open

libsinsp.pc references build tree instead of install prefix #1825

Apteryks opened this issue May 2, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Apteryks
Copy link

Apteryks commented May 2, 2024

Describe the bug

Notice the references to /tmp/guix-build-falcosecurity-libs-0.15.1-drv-0 in the pkg-config libsinsp.pc file, as shown by the grep command below:

$ grep -rin guix-build /gnu/store/c363y8pvmynd2c8dg83802891n4v03nr-falcosecurity-libs-0.15.1
grep: /gnu/store/c363y8pvmynd2c8dg83802891n4v03nr-falcosecurity-libs-0.15.1/lib/libscap_engine_savefile.a : fichiers binaires correspondent
/gnu/store/c363y8pvmynd2c8dg83802891n4v03nr-falcosecurity-libs-0.15.1/lib/pkgconfig/libsinsp.pc:11:Cflags: -I${includedir}/falcosecurity/libsinsp -I/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/source -I/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/source/userspace -I/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/source/userspace/libscap -I/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/build -I/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/build/driver/src -I/gnu/store/vbb4mazz64v6gy10nzz1dp1ixk690fav-tbb-2021.6.0/include/tbb -I/gnu/store/9jkzwa8j0ag4n0bwmdwn9k313ilwgywf-jsoncpp-1.9.5/include -I/gnu/store/m57i4jra2yg42sz886qyz6x5qz2bxiai-valijson-1.0.2/include -I/gnu/store/4w850l8yy5lj5mvrfq253bcs8axhnizc-re2-2022-12-01/include -I/gnu/store/0kzjzrgsn7k1clc6mxk5ndfmsikwm7wz-c-ares-1.18.1/include -I/gnu/store/54cqjg46c15qsx75b63rfbmvshw8w5nd-curl-8.5.0/include

This then causes issues like:

CMake Error in userspace/sysdig/CMakeLists.txt:
  Imported target "PkgConfig::LIBSINSP" includes non-existent path

    "/tmp/guix-build-falcosecurity-libs-0.15.1.drv-0/source"

  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.

With CMake when one tries to use it with pkg_check_modules.

How to reproduce it

Build it in a different location than its installation prefix.

Expected behaviour

The pkg-config file include directives in CFLAGS should refer to the installed files in their final location (installation prefix), not those from the build tree.

Environment

@Apteryks Apteryks added the kind/bug Something isn't working label May 2, 2024
@Apteryks
Copy link
Author

Apteryks commented May 2, 2024

A workaround is to remove the @SINSP_PKG_CONFIG_INCLUDES@ template variable from the userspace/libsinsp/libsinsp.pc.in source file before configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant