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

GIO dependency is through libRSVG #1575

Closed
charmander opened this issue Mar 13, 2020 · 7 comments
Closed

GIO dependency is through libRSVG #1575

charmander opened this issue Mar 13, 2020 · 7 comments

Comments

@charmander
Copy link
Contributor

When building with --without-rsvg (and without everything else), linking fails on GIO functions, e.g.

if( g_cancellable_set_error_if_cancelled( cancellable, error ) )

I’m not familiar enough with Autotools to know whether this is a correct fix, but I added it to configure.ac here:

PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.6 gmodule-2.0 gobject-2.0 gio-2.0)
PACKAGES_USED="$PACKAGES_USED glib-2.0 gmodule-2.0 gobject-2.0 gio-2.0"

Sorry for not making sure exactly which optional library exclusions are required or listing the exact functions – rebuilding takes a while on my device.

@jcupitt
Copy link
Member

jcupitt commented Mar 13, 2020

That's odd, it's supposed to test for GIO and disable rsvg if it's not available. I'll have a look.

jcupitt added a commit that referenced this issue Mar 13, 2020
We need to add gio to packages-used if it's available.

See #1575
@jcupitt
Copy link
Member

jcupitt commented Mar 13, 2020

OK, I think that fixes it. Thanks!

@jcupitt jcupitt closed this as completed Mar 13, 2020
@lovell
Copy link
Member

lovell commented Mar 23, 2020

libvips is dependent on gio (e.g. g_input_stream_get_type) independently of librsvg so I think the original suggestion to modify PKG_CHECK_MODULES is correct. Happy to create a PR for this if you agree John.

@jcupitt
Copy link
Member

jcupitt commented Mar 23, 2020

I think it's guarded by HAVE_GIO, but I've not actually tried building without gio :( It would actually be tricky to test.

gio is glib 2.15 and later, so perhaps we should bump the minimum version of glib to 2.15 as well. We could remove a few other ifdefs too, which would be a useful cleanup.

@lovell
Copy link
Member

lovell commented Mar 23, 2020

Thanks John, there's an example build failure at https://travis-ci.org/github/google/oss-fuzz/jobs/665815922 that might help demonstrate.

@jcupitt
Copy link
Member

jcupitt commented Mar 23, 2020

vips.pc has gio-2.0 in Requires.private, so I think that ought to work. Is that link line not being generated by pkg-config?

I'm still completely confused about the differences between Libs, Requires, Requires.private and Libs.private :( I think this is the issue that led to the current state:

#196

@lovell
Copy link
Member

lovell commented Mar 23, 2020

The vips.pc file appears to correctly include gio-2.0 in Requires.private.

The build failure occurs when linking tools/vips and tools/vipsedit.

Could commit d4f12a9 have introduced a public "Requires" level dependency on gio similar to commit 366e7e3?

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