appstream icon indicating copy to clipboard operation
appstream copied to clipboard

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

Open rossburton opened this issue 2 years ago • 4 comments

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

https://github.com/ximion/appstream/blob/1217913bc0276ad5a0bf02b8ab93744c373fc4f4/meson.build#L188

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.

rossburton avatar Dec 22 '23 14:12 rossburton

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

ximion avatar Dec 22 '23 14:12 ximion

Filed https://github.com/snowballstem/snowball/issues/190 to nudge snowball maintainers.

rossburton avatar Dec 22 '23 14:12 rossburton

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.

eli-schwartz avatar Jan 11 '24 04:01 eli-schwartz

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

rossburton avatar Jan 11 '24 11:01 rossburton