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

Don't hardcode /usr/include in meson.build #569

Open
rossburton opened this issue Dec 22, 2023 · 4 comments
Open

Don't hardcode /usr/include in meson.build #569

rossburton opened this issue Dec 22, 2023 · 4 comments

Comments

@rossburton
Copy link

If AppStream is build with stemmer enabled, it forcibly looks in /usr/include:

stemmer_inc_dirs = include_directories(['/usr/include'])

I may have installed stemmer anywhere, and in cross-compiled environments hardcoding this path is absolutely the wrong thing to do as it is the host includes not the target includes.

@ximion
Copy link
Owner

ximion commented Dec 22, 2023

Patches welcome ;-)
Ideally Snowball would just ship a pkg-config file, but annoyingly it doesn't.

@rossburton
Copy link
Author

Filed snowballstem/snowball#190 to nudge snowball maintainers.

@eli-schwartz
Copy link

Ideally Snowball would just ship a pkg-config file, but annoyingly it doesn't.

Ideally snowball would support installing anything at all, period.

However I am slightly curious why you need to specify any include directories at all. Do the compiler builtin defaults not work? That should already have /usr/include, but only on native builds, since in cross builds it will have /path/to/cross-sysroot/usr/include

And given that you don't know where snowball is installed without a pkg-config file, it seems 100% pointless to hardcode an arbitrary location that may not be true.

@rossburton
Copy link
Author

Right, I'd have thought that the meson header/library checking code would have been sufficient to validate that the library is present.

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