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 · 4 comments
Open

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

Apteryks opened this issue May 2, 2024 · 4 comments
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.

@poiana
Copy link
Contributor

poiana commented Jul 31, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@poiana
Copy link
Contributor

poiana commented Aug 30, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

@Apteryks
Copy link
Author

/remove-lifecycle rotten

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

2 participants