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

Compilation against glib >= 2.67.3 fails due to C vs C++ linkage #1987

Closed
lovell opened this issue Feb 8, 2021 · 4 comments
Closed

Compilation against glib >= 2.67.3 fails due to C vs C++ linkage #1987

lovell opened this issue Feb 8, 2021 · 4 comments

Comments

@lovell
Copy link
Member

lovell commented Feb 8, 2021

Compilation of the C++ files in libvips v8.10.5 is failing against the latest glib v2.67.3, which is triggered by the change in https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715

In file included from /target/include/glib-2.0/glib/gmacros.h:241,
                 from /target/lib/glib-2.0/include/glibconfig.h:9,
                 from /target/include/glib-2.0/glib/gtypes.h:32,
                 from /target/include/glib-2.0/glib/galloca.h:32,
                 from /target/include/glib-2.0/glib.h:30,
                 from ../../libvips/include/vips/vips.h:87,
                 from reducev.cpp:68:
/opt/rh/devtoolset-9/root/usr/include/c++/9/type_traits:2282:3: error: template with C linkage
 2282 |   template<typename _MemPtr, typename _Arg, typename... _Args>
      |   ^~~~~~~~

There's a proposed follow-up change to "fix" this at https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1935 but this does mean there's now at least one version of glib out in the wild that libvips cannot be compiled against, so perhaps we need to fix this too.

@jcupitt
Copy link
Member

jcupitt commented Feb 9, 2021

OK, I think I've fixed it.

@jcupitt jcupitt closed this as completed Feb 9, 2021
@lovell
Copy link
Member Author

lovell commented Feb 9, 2021

Thanks, does this need backporting to 8.10?

The upstream "fix" https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1935 was closed as invalid so there will probably be all manner of broken packages when Homebrew picks up the latest glib.

@jcupitt
Copy link
Member

jcupitt commented Feb 9, 2021

Ah argh, you're right. I'll patch 8.10 too.

@jcupitt
Copy link
Member

jcupitt commented Feb 9, 2021

OK, I merged your librsvg fix to master as well and updated the changelog too.

clayne pushed a commit to clayne/libvips that referenced this issue Feb 9, 2021
clayne pushed a commit to clayne/libvips that referenced this issue Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants