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

pkg-config file has CI paths #2475

Open
battlesnake opened this issue Dec 17, 2024 · 6 comments
Open

pkg-config file has CI paths #2475

battlesnake opened this issue Dec 17, 2024 · 6 comments

Comments

@battlesnake
Copy link

battlesnake commented Dec 17, 2024

$ pkg-config --cflags mavsdk
-I/home/runner/work/MAVSDK/MAVSDK/install/include -I/home/runner/work/MAVSDK/MAVSDK/install/include/mavsdk -I/usr/include/x86_64-linux-gnu -I/usr/include/jsoncpp

The include paths in the current ubuntu 22.04 pkg-config file seem to reference CI user directories instead of the eventual installation directories.

@battlesnake
Copy link
Author

(sanity check: I don't have a user called runner or a /home/runner directory)

@battlesnake
Copy link
Author

battlesnake commented Dec 17, 2024

$ cat /usr/lib/pkgconfig/mavsdk.pc
prefix=/home/runner/work/MAVSDK/MAVSDK/install
exec_prefix=/home/runner/work/MAVSDK/MAVSDK/install/bin
libdir=/home/runner/work/MAVSDK/MAVSDK/install/lib
includedir=/home/runner/work/MAVSDK/MAVSDK/install/include

...

@battlesnake
Copy link
Author

Similar for Debain 12 ARM64: /work/build/linux-arm64/install

@JonasVautherin
Copy link
Collaborator

This is what's being used to generate it. If I remember correctly, those variables are defined with CMAKE_INSTALL_PREFIX and GNUInstallDirs.

My guess would be that it is all coming from CMAKE_INSTALL_PREFIX in the end. And it is set e.g. here in the CI.

I feel like the CI jobs for the CI should not override CMAKE_INSTALL_PREFIX and install on the system instead.

Would you be able to test that?

@battlesnake
Copy link
Author

Sure I can test stuff - I'm installing MAVSDK as part of a container build so I can test changes pretty easily by applying them and commenting out my current workarounds. I'll try to fit it in sometime tomorrow.

@julianoes
Copy link
Collaborator

Those paths work for the .deb packages, so I'm confused why they don't for the pkg-config. I guess we always just use CMake's find_package and not pkg-config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants