After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780399 - static compilation: Add "-DGLIB_STATIC_COMPILATION"
static compilation: Add "-DGLIB_STATIC_COMPILATION"
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-22 13:54 UTC by sameeh
Modified: 2018-05-24 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sameeh 2017-03-22 13:54:18 UTC
I am trying to compile qemu-ga for Windows statically using the following commands:

./configure --disable-docs --target-list=x86_64-softmmu --cross-prefix=x86_64-w64-mingw32- --static --enable-guest-agent-msi --with-vss-sdk=/path/to/VSSSDK72

make -j8 qemu-ga

And I keep getting this error:
/home/sameeh/Builds/q/stubs/error-printf.c:7: undefined reference to `__imp_g_test_config_vars'
collect2: error: ld returned 1 exit status
Makefile:444: recipe for target 'qemu-ga.exe' failed
make: *** [qemu-ga.exe] Error 1

Notes to consider:
* without --static I can compile it successfully
* Build machine is running Fedora 25
* I have upgraded all of the tools to their latest version
* If I comment out the function which is causing the issue (g_test_initialized()), qemu ga compiles statically and runs successfully without the need of any dlls.
Comment 1 sameeh 2017-03-22 13:56:52 UTC
The issue was resolved by manually adding "-DGLIB_STATIC_COMPILATION", but I think this should be done automatically by pkg-config.
Comment 2 GNOME Infrastructure Team 2018-05-24 19:27:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1252.