Package Details: mingw-w64-glib2 2.82.3-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
Upstream URL: https://gitlab.gnome.org/GNOME/glib
Keywords: glib2 gnome gtk gtk2 gtk3 mingw mingw-w64
Licenses: LGPL-2.1-or-later
Submitter: brcha
Maintainer: Martchus
Last Packager: Martchus
Votes: 20
Popularity: 0.000000
First Submitted: 2012-06-13 19:15 (UTC)
Last Updated: 2024-12-10 22:33 (UTC)

Latest Comments

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

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?

Martchus commented on 2018-09-02 20:52 (UTC) (edited on 2018-09-02 20:58 (UTC) by Martchus)

Differences:

  • You're using mingw-w64-{gcc,binutils}-bin and I'm using mingw-w64-{gcc,binutils}.
  • You're using mingw-w64-headers-bin-5.0.4-1 and I'm using mingw-w64-headers-5.0.4-2.
  • The step Linking target glib/libglib-2.0-0.dll fails for me. Since it passes for you the exact compiler invocation is not printed so I can't compare it.
  • My log has a lot of messages like i686-w64-mingw32-ar: glib/glib@@glib-2.0@sha/glist.c.obj: plugin needed to handle lto object.

Note that Checking for function "vasprintf" : YES and similar do not differ.


Since you're not able to reproduce I suppose I'll have to investigate the issue myself. But thanks for your help so far.

drakkan commented on 2018-09-02 14:38 (UTC) (edited on 2018-09-02 14:40 (UTC) by drakkan)

here is my full build output including packages installed as deps

https://pastebin.com/DTmdjkXe

can you point me to the differences on your system? thanks!

Martchus commented on 2018-09-02 13:49 (UTC)

Yes, I'm always building in a clean chroot. I can investigate the issue later and also test the autotools version.

drakkan commented on 2018-09-02 13:24 (UTC) (edited on 2018-09-02 13:28 (UTC) by drakkan)

just to be sure, are you building in a clean chroot?

Here you can find a PKGBUILD that use autotools instead of meson

https://pastebin.com/PTbGzTGB

is this one working for you?

Martchus commented on 2018-09-02 12:55 (UTC) (edited on 2018-09-02 12:56 (UTC) by Martchus)

2.58.0 fails to build here:

[358/650] Linking target glib/libglib-2.0-0.dll.
FAILED: glib/libglib-2.0-0.dll
i686-w64-mingw32-gcc  -o glib/libglib-2.0-0.dll glib/glib.o 'glib/glib@@glib-2.0@sha/deprecated_gallocator.c.obj' 'glib/glib@@glib-2.0@sha/deprecated_gcache.c
.obj' 'glib/glib@@glib-2.0@sha/deprecated_gcompletion.c.obj' 'glib/glib@@glib-2.0@sha/deprecated_grel.c.obj' 'glib/glib@@glib-2.0@sha/deprecated_gthread-depre
cated.c.obj' 'glib/glib@@glib-2.0@sha/garcbox.c.obj' 'glib/glib@@glib-2.0@sha/garray.c.obj' 'glib/glib@@glib-2.0@sha/gasyncqueue.c.obj' 'glib/glib@@glib-2.0@s
ha/gatomic.c.obj' 'glib/glib@@glib-2.0@sha/gbacktrace.c.obj' 'glib/glib@@glib-2.0@sha/gbase64.c.obj' 'glib/glib@@glib-2.0@sha/gbitlock.c.obj' 'glib/glib@@glib
-2.0@sha/gbookmarkfile.c.obj' 'glib/glib@@glib-2.0@sha/gbytes.c.obj' 'glib/glib@@glib-2.0@sha/gcharset.c.obj' 'glib/glib@@glib-2.0@sha/gchecksum.c.obj' 'glib/
glib@@glib-2.0@sha/gconvert.c.obj' 'glib/glib@@glib-2.0@sha/gdataset.c.obj' 'glib/glib@@glib-2.0@sha/gdate.c.obj' 'glib/glib@@glib-2.0@sha/gdatetime.c.obj' 'g
lib/glib@@glib-2.0@sha/gdir.c.obj' 'glib/glib@@glib-2.0@sha/genviron.c.obj' 'glib/glib@@glib-2.0@sha/gerror.c.obj' 'glib/glib@@glib-2.0@sha/gfileutils.c.obj' 
'glib/glib@@glib-2.0@sha/ggettext.c.obj' 'glib/glib@@glib-2.0@sha/ghash.c.obj' 'glib/glib@@glib-2.0@sha/ghmac.c.obj' 'glib/glib@@glib-2.0@sha/ghook.c.obj' 'gl
ib/glib@@glib-2.0@sha/ghostutils.c.obj' 'glib/glib@@glib-2.0@sha/giochannel.c.obj' 'glib/glib@@glib-2.0@sha/gkeyfile.c.obj' 'glib/glib@@glib-2.0@sha/glib-init
.c.obj' 'glib/glib@@glib-2.0@sha/glib-private.c.obj' 'glib/glib@@glib-2.0@sha/glist.c.obj' 'glib/glib@@glib-2.0@sha/gmain.c.obj' 'glib/glib@@glib-2.0@sha/gmap
pedfile.c.obj' 'glib/glib@@glib-2.0@sha/gmarkup.c.obj' 'glib/glib@@glib-2.0@sha/gmem.c.obj' 'glib/glib@@glib-2.0@sha/gmessages.c.obj' 'glib/glib@@glib-2.0@sha
/gnode.c.obj' 'glib/glib@@glib-2.0@sha/goption.c.obj' 'glib/glib@@glib-2.0@sha/gpattern.c.obj' 'glib/glib@@glib-2.0@sha/gpoll.c.obj' 'glib/glib@@glib-2.0@sha/
gprimes.c.obj' 'glib/glib@@glib-2.0@sha/gqsort.c.obj' 'glib/glib@@glib-2.0@sha/gquark.c.obj' 'glib/glib@@glib-2.0@sha/gqueue.c.obj' 'glib/glib@@glib-2.0@sha/g
rand.c.obj' 'glib/glib@@glib-2.0@sha/grcbox.c.obj' 'glib/glib@@glib-2.0@sha/grefcount.c.obj' 'glib/glib@@glib-2.0@sha/grefstring.c.obj' 'glib/glib@@glib-2.0@s
ha/gregex.c.obj' 'glib/glib@@glib-2.0@sha/gscanner.c.obj' 'glib/glib@@glib-2.0@sha/gsequence.c.obj' 'glib/glib@@glib-2.0@sha/gshell.c.obj' 'glib/glib@@glib-2.
0@sha/gslice.c.obj' 'glib/glib@@glib-2.0@sha/gslist.c.obj' 'glib/glib@@glib-2.0@sha/gstdio.c.obj' 'glib/glib@@glib-2.0@sha/gstrfuncs.c.obj' 'glib/glib@@glib-2
.0@sha/gstring.c.obj' 'glib/glib@@glib-2.0@sha/gstringchunk.c.obj' 'glib/glib@@glib-2.0@sha/gtestutils.c.obj' 'glib/glib@@glib-2.0@sha/gthread.c.obj' 'glib/gl
ib@@glib-2.0@sha/gthreadpool.c.obj' 'glib/glib@@glib-2.0@sha/gtimer.c.obj' 'glib/glib@@glib-2.0@sha/gtimezone.c.obj' 'glib/glib@@glib-2.0@sha/gtranslit.c.obj'
 'glib/glib@@glib-2.0@sha/gtrashstack.c.obj' 'glib/glib@@glib-2.0@sha/gtree.c.obj' 'glib/glib@@glib-2.0@sha/guniprop.c.obj' 'glib/glib@@glib-2.0@sha/gutf8.c.o
bj' 'glib/glib@@glib-2.0@sha/gunibreak.c.obj' 'glib/glib@@glib-2.0@sha/gunicollate.c.obj' 'glib/glib@@glib-2.0@sha/gunidecomp.c.obj' 'glib/glib@@glib-2.0@sha/
gurifuncs.c.obj' 'glib/glib@@glib-2.0@sha/gutils.c.obj' 'glib/glib@@glib-2.0@sha/guuid.c.obj' 'glib/glib@@glib-2.0@sha/gvariant.c.obj' 'glib/glib@@glib-2.0@sh
a/gvariant-core.c.obj' 'glib/glib@@glib-2.0@sha/gvariant-parser.c.obj' 'glib/glib@@glib-2.0@sha/gvariant-serialiser.c.obj' 'glib/glib@@glib-2.0@sha/gvariantty
peinfo.c.obj' 'glib/glib@@glib-2.0@sha/gvarianttype.c.obj' 'glib/glib@@glib-2.0@sha/gversion.c.obj' 'glib/glib@@glib-2.0@sha/gwakeup.c.obj' 'glib/glib@@glib-2
.0@sha/gprintf.c.obj' 'glib/glib@@glib-2.0@sha/gwin32.c.obj' 'glib/glib@@glib-2.0@sha/gspawn-win32.c.obj' 'glib/glib@@glib-2.0@sha/giowin32.c.obj' 'glib/glib@
@glib-2.0@sha/gthread-win32.c.obj' -flto -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -Wl,--start-group -Wl,--out-implib=glib/libglib-2.0.dll.a glib/lib
charset/libcharset.a glib/gnulib/libgnulib.a -Wl,-Bsymbolic-functions -lws2_32 -lole32 -lwinmm -lshlwapi /usr/i686-w64-mingw32/lib/libpcre.dll.a -lintl -lws2_
32 -lwinmm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x2940): undefined reference to `_
g_gnulib_vasprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x6b51): undefined reference to `_g_gnulib_sprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x6b8d): undefined reference to `_g_gnulib_sprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x6bd2): undefined reference to `_g_gnulib_sprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x6c05): undefined reference to `_g_gnulib_sprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x6c2a): undefined reference to `_g_gnulib_sprintf'
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccNiHBY6.ltrans0.ltrans.o:<artificial>:(.text+0x29f9): undefined reference to `_g_gnulib_vsnprintf'
...