You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to do a qt6-static build of a (non-trivial) Qt application that builds fine with qt5-static (after #21612 has been fixed) and dynamically with qt5 and 6.
Expected behavior
Compiles and links successfully.
Actual behavior
Link step fails with unresolved externals:
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/qt6-static/share/qt6/plugins/networkinformation/libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x9b): undefined reference to `__imp_VariantInit'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/qt6-static/share/qt6/plugins/networkinformation/libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0xb1): undefined reference to `__imp_VariantClear'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/qt6-static/share/qt6/plugins/networkinformation/libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x209): undefined reference to `__imp_VariantClear'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/qt6-static/share/qt6/plugins/networkinformation/libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x27b): undefined reference to `__imp_VariantClear'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x18c): undefined reference to `gr_make_face_with_ops'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x226): undefined reference to `gr_face_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x386): undefined reference to `gr_face_featureval_for_lang'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x3a6): undefined reference to `gr_face_find_fref'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x3ba): undefined reference to `gr_fref_set_feature_value'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x45a): undefined reference to `gr_make_seg'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x472): undefined reference to `gr_seg_n_slots'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x5c7): undefined reference to `gr_seg_first_slot'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x617): undefined reference to `gr_slot_before'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x621): undefined reference to `gr_slot_after'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x62d): undefined reference to `gr_slot_gid'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x688): undefined reference to `gr_slot_can_insert_before'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x6ee): undefined reference to `gr_slot_origin_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x774): undefined reference to `gr_slot_next_in_segment'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x847): undefined reference to `gr_seg_first_slot'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x881): undefined reference to `gr_slot_advance_Y'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x89b): undefined reference to `gr_slot_next_in_segment'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x8af): undefined reference to `gr_slot_origin_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x8d2): undefined reference to `gr_slot_origin_Y'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x966): undefined reference to `gr_seg_advance_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0x9d6): undefined reference to `gr_slot_origin_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xa04): undefined reference to `gr_featureval_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xa0e): undefined reference to `gr_seg_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xacf): undefined reference to `gr_seg_advance_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xae3): undefined reference to `gr_seg_first_slot'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xb21): undefined reference to `gr_slot_advance_Y'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xb3b): undefined reference to `gr_slot_origin_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xb78): undefined reference to `gr_slot_origin_Y'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xb9b): undefined reference to `gr_slot_next_in_segment'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc19): undefined reference to `gr_featureval_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc31): undefined reference to `gr_featureval_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc3b): undefined reference to `gr_seg_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc55): undefined reference to `gr_seg_first_slot'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc5d): undefined reference to `gr_slot_origin_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc72): undefined reference to `gr_seg_advance_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xc94): undefined reference to `gr_seg_first_slot'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xcd0): undefined reference to `gr_featureval_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xcda): undefined reference to `gr_seg_destroy'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-graphite2.cc.obj):(.text+0xcf0): undefined reference to `gr_seg_advance_X'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libharfbuzz.a(hb-uniscribe.cc.obj):(.text+0x79d): undefined reference to `__imp_UuidCreate'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x6c): undefined reference to `BZ2_bzDecompressEnd'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x11d): undefined reference to `BZ2_bzDecompress'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x32a): undefined reference to `BZ2_bzDecompressEnd'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x380): undefined reference to `BZ2_bzDecompressInit'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x5fe): undefined reference to `BZ2_bzDecompressInit'
collect2.exe: error: ld returned 1 exit status
The project links fine if you add "QMAKE_LFLAGS += -Wl,--start-group" (except for the "missing --end-group;" warning)
I have only tested this on MINGW64, but it's possibly the same for the other subsystems.
Description / Steps to reproduce the issue
Try to do a qt6-static build of a (non-trivial) Qt application that builds fine with qt5-static (after #21612 has been fixed) and dynamically with qt5 and 6.
Expected behavior
Compiles and links successfully.
Actual behavior
Link step fails with unresolved externals:
The project links fine if you add "QMAKE_LFLAGS += -Wl,--start-group" (except for the "missing --end-group;" warning)
I have only tested this on MINGW64, but it's possibly the same for the other subsystems.
Verification
Windows Version
MINGW64_NT-10.0-19045
MINGW environments affected
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: