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

OpenBSD: Could not open library 'libglib-2.0.so.0': File not found #221

Closed
ghost opened this issue Jan 20, 2020 · 7 comments
Closed

OpenBSD: Could not open library 'libglib-2.0.so.0': File not found #221

ghost opened this issue Jan 20, 2020 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 20, 2020

Getting LoadError (Could not open library 'glib-2.0.so.0': File not found. Could not open library 'libglib-2.0.so.0': File not found) here on OpenBSD. How to tell ruby-vips to look for /usr/local/lib/libglib-2.0.so.4201.2 instead?

Thanks.

@jcupitt
Copy link
Member

jcupitt commented Jan 20, 2020

Hello @1234dev,

I think Ruby ffi is expecting there to be a symlink meaning "glib-2.0 API version 0", ie. a link from libglib-2.0.so.0 to whatever binary you have. You'll need a similar link for libvips.so.42 as well.

I don't know much about the OpenBSD linker -- how does it handle ABI back compatibility? You might need to ask the Ruby ffi maintainer (they are very helpful) to make some adjustments to their library finder.

@ghost
Copy link
Author

ghost commented Jan 23, 2020

Thanks @jcupitt!

@jcupitt
Copy link
Member

jcupitt commented May 17, 2020

So perhaps the problem is with the openbsd glib package. Why is there no link for libglib-2.0.so.0?

@jcupitt jcupitt closed this as completed May 17, 2020
@basicfeatures
Copy link

Looks like a port was created not too long after this issue:

https://openports.se/graphics/libvips

@basicfeatures
Copy link

basicfeatures commented Jun 30, 2022

Install libvips and its dependencies:

pkg_add libvips
pkg_add glib
pkg_add gobject-introspection

Symlink the OpenBSD binaries with what ruby-vips expects as of 2022.06.30:

ln -s /usr/local/lib/libvips.so.0.0 /usr/local/lib/libvips.so.42
ln -s /usr/local/lib/libglib-2.0.so.4201.6 /usr/local/lib/libglib-2.0.so
ln -s /usr/local/lib/libgobject-2.0.so.4200.13 /usr/local/lib/libgobject-2.0.so.0

Cc: ffi/ffi#738

@basicfeatures
Copy link

For more please see https://github.com/basicfeatures/openbsd-rails 👍

@jcupitt
Copy link
Member

jcupitt commented Jun 30, 2022

Oh, great! Thanks for the update @basicfeatures.

You probably don't need gobject-introspection, fwiw. Maybe just gobject?

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

No branches or pull requests

2 participants