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

Available library/driver detection in ruby/GNUmakefile is unreliable #321

Open
bluewww opened this issue Dec 16, 2021 · 4 comments
Open

Comments

@bluewww
Copy link

bluewww commented Dec 16, 2021

I realized when compiling ares on an opensuse tumbleweed machine that drivers are not being included. There seems to be a broad check in ruby/GNUmakefile with test -e /usr/lib/lib$1.so to check whether certain *.so files are available.

Unfortunately, this does not work like this on some distros. For example my libudev has the following full path: /usr/lib/libudev.so.1.

Maybe consider using pkg-config instead to do the detection?

@Screwtapello
Copy link
Contributor

I wrote a patch to make higan use pkg-config, but it significantly slowed down the build process on FreeBSD so he declined to apply it to ares and did his own thing instead.

That said, applications shouldn't link with *.so.1 or *.so.97 or *.so.8.6.7.5.3.0.9 or whatever, they should specifically link to the .so file and the system figures out which specific version of the library to link against. Usually the libwhatever.solink ships with the libwhatever-dev package that includes the headers and pkg-config file, not the libwhatever package that includes libwhatever.so.1.

@bluewww
Copy link
Author

bluewww commented Dec 16, 2021

You are right I forgot to install the devel package for libudev.
Nonetheless for example my libSDL2 is placed under /usr/lib64/libSDL2.so and not /usr/lib so the test -e fails either way.

@LukeUsher
Copy link
Member

I wrote a patch to make higan use pkg-config, but it significantly slowed down the build process on FreeBSD so he declined to apply it to ares and did his own thing instead.

That said, applications shouldn't link with *.so.1 or *.so.97 or *.so.8.6.7.5.3.0.9 or whatever, they should specifically link to the .so file and the system figures out which specific version of the library to link against. Usually the libwhatever.solink ships with the libwhatever-dev package that includes the headers and pkg-config file, not the libwhatever package that includes libwhatever.so.1.

I'd be willing to take a look at this if you could create a pull-request

@bsdcode
Copy link
Contributor

bsdcode commented Aug 13, 2024

Isn't this issue fixed with be1f424 since two years?

And regarding:

I wrote a patch to make higan use pkg-config, but it significantly slowed down the build process on FreeBSD so he declined to apply it to ares and did his own thing instead.

no problem here on FreeBSD ;) pkg-config is widely used on FreeBSD too.

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

No branches or pull requests

4 participants