Package Details: mingw-w64-glib2 2.80.0-1

Git Clone URL: https://aur.archlinux.org/mingw-w64-glib2.git (read-only, click to copy)
Package Base: mingw-w64-glib2
Description: Low level core library (mingw-w64)
Upstream URL: https://wiki.gnome.org/Projects/GLib
Keywords: glib2 gnome gtk gtk2 gtk3 mingw mingw-w64
Licenses: LGPL2.1
Submitter: brcha
Maintainer: drakkan
Last Packager: drakkan
Votes: 20
Popularity: 0.000000
First Submitted: 2012-06-13 19:15 (UTC)
Last Updated: 2024-03-28 08:23 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 Next › Last »

drakkan commented on 2018-09-23 07:34 (UTC) (edited on 2018-09-23 07:36 (UTC) by drakkan)

@Martchus

this is a meson bug

https://github.com/mesonbuild/meson/pull/3939

for now probably we need to use the same hack and remove -lcharset and -lgiowin32 too. I have no time to test today, I'll check this during the next week, thanks for reporting and sorry for the annoyance

Martchus commented on 2018-09-21 09:06 (UTC)

Unfortunately there's another issue. The pkg-config file contains -lgnulib which is not correct since in our configuration that library is not used.

See grep -R gnulib /usr/{i686,x86_64}-w64-mingw32/lib/pkgconfig:

/usr/i686-w64-mingw32/lib/pkgconfig/glib-2.0.pc:Libs.private: -L${libdir} -lcharset -lgnulib -lws2_32 -lwinmm -lws2_32 -lole32 -lwinmm -lshlwapi
/usr/x86_64-w64-mingw32/lib/pkgconfig/glib-2.0.pc:Libs.private: -L${libdir} -lcharset -lgnulib -lws2_32 -lwinmm -lws2_32 -lole32 -lwinmm -lshlwapi

It leads to the error reported here: https://aur.archlinux.org/packages/mingw-w64-qt5-declarative

drakkan commented on 2018-09-06 21:41 (UTC)

reported upstream

https://github.com/mesonbuild/meson/issues/4138

thanks for testing the updated version and sorry for the annoyance

Martchus commented on 2018-09-06 21:16 (UTC)

Thanks for your help, too! Just running ranlib after the build is a workaround indeed. But I'd also say meson should take care of it.

I also tested it. My statically linked Qt Widgets app compiles and runs again :-)

drakkan commented on 2018-09-06 21:00 (UTC)

can you please manually run ranlib or try the latest PKGBUILD?

If it works for you I'll report upstream since it seems a meson issue, thanks for your patience

Martchus commented on 2018-09-06 19:41 (UTC) (edited on 2018-09-06 19:46 (UTC) by Martchus)

Now I tried to link a Qt application against the static library but it fails with /usr/lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld: /usr/x86_64-w64-mingw32/lib/libglib-2.0.a: error adding symbols: archive has no index; run ranlib to add one.

Note that I've picked up your changes in mingw-w64-meson to use $_arch-gcc-ranlib as well and rebuilt this package using it. I also didn't get any suspicious error messages during the build anymore.

However, it strips the library: Stripping target 'glib/libglib-2.0.a' - This shouldn't be a problem, but using the wrong strip (eg. version from native binutils) could actually lead to archive has no index.

Any ideas? You said that you were able to link against the static library so maybe I'm doing something wrong. But which packages using the static lib did you build? Just because I don't think there are no such packages in the AUR. (The package I'm testing with is https://github.com/Martchus/PKGBUILDs/blob/master/passwordmanager/mingw-w64-static/PKGBUILD.)

drakkan commented on 2018-09-03 16:09 (UTC) (edited on 2018-09-03 16:12 (UTC) by drakkan)

I noted the static libraries size increase, it should be normal when using link time optimizations. Anyway I builded several packages that statically link glib and they compile fine. Anyway if the size is a big concern I can remove lto from meson, I'm open to discussion, lto is used in the meson linux PKGBUILD too.

Thanks for your investigations!

Martchus commented on 2018-09-03 15:21 (UTC)

Seems like enabling LTO causes the static libraries to be very big. Additionally, I hope using those static libraries later on won't be problematic.

Martchus commented on 2018-09-03 09:29 (UTC) (edited on 2018-09-03 09:32 (UTC) by Martchus)

Does the autotools version work for you?

Yes

In meson wrapper there is the option -D b_lto=true

I can test that later. Maybe LTO is the cause. The warnings i686-w64-mingw32-ar: glib/glib@@glib-2.0@sha/glist.c.obj: plugin needed to handle lto object are also pointing in that direction. Likely I just have to pass the path of the plugin to ar. Do you know how to add additional flags for the ar tool in meson?

Or maybe I should use i686-w64-mingw32-gcc-ar instead of i686-w64-mingw32-ar. Not sure what the difference is but it could make a difference.

drakkan commented on 2018-09-02 21:34 (UTC) (edited on 2018-09-02 21:41 (UTC) by drakkan)

I'll try to use mingw-w64-{gcc,binutils} too.

Does the autotools version work for you?

In meson wrapper there is the option -D b_lto=true

https://aur.archlinux.org/cgit/aur.git/tree/meson-mingw-wrapper?h=mingw-w64-meson#n34

does something change if you remove this option?