Closed revelator closed 3 years ago
also make -j1 or things go boom.
Sounds like 32-bit linker, there is no fix for it.
looks like llvm-rc does not like manifests since it looks an awfull lot like an xml parser error.
LLVM RC is still WIP, I think there were many changes to it in LLVM 12 release. You might have to wait until we land it.
Ah ok, well if it is a new feature i can understand if it might still have some bugs. is it possible in the meantime to use the binutils windres or is it incompatible with the llvm compiler ?.
strangely enough the python based manifest code from gtk3 works, but i doubt it would be easy porting it for gtk2 :S
is it possible in the meantime to use the binutils windres or is it incompatible with the llvm compiler ?.
I'm not sure but this might be the only Binutils part compatible with LLVM toolchain.
works :) so we could as a temporary hack point RC or WINDRES towards the mingw* windres, i just successfully compiled gtk2.
sidenote the build error with make greater than -j1 is not linked to the 32 bit problem we had with other sources as it also fails with the 64 bit compile.
tadaa :)
works :) so we could as a temporary hack point RC or WINDRES towards the mingw* windres, i just successfully compiled gtk2.
I'd try with LLVM 12 first, if it doesn't work we would have to build and bundle Bintuils windres...
sidenote the build error with make greater than -j1 is not linked to the 32 bit problem we had with other sources as it also fails with the 64 bit compile.
Was it IO related?
seems to have been caused by the resource compiler manifest, parse error i noticed.
That parse error looks like insufficient memory or addressable space.
indeed it does hmm :/
well after building gtk2 succesfully the dependants seem to build ok, if we end up having to bundle windres we might also have to link it to the static libraries so as to avoid having it depend on msvc runtime dll's. Binutils does not seem to like being built with clang unfortunatly.
Yeah lots of things are failing parsing RC files, including windows-default-manifest. Binutils did build successfully under clang with autobuild, but was removed again because it conflicts with a lot of files from clang.
well if llvm version 12 cannot fix it we only need windres from binutils, not sure if windres can be built standalone ?. graphviz is still a nogo sadly as i cannot build poppler :S even after updating the package to the latest version. The odd thing is that the 32 bit package builds but the 64 bit version crashes while building (most of the time it is the other way around so heh). A few packages also complain about pthreads but i got around that by adding it to LIBS.
Took a stab at gtk2 myself, still producing some interesting nastiness https://gist.github.com/ZachBacon/656cfb45fa81948436b43732b94bf59c
Aye tons and tons of warnings :) especially with the macros. To build it currently you need windres from binutils and make -j1 because of a resource script that llvm-rc does not like overly much. copy out the the old arch-w64-mingw32-windres.exe and windres.exe then copy over the windres.exe from mingw and make a copy named arch-w64-mingw32-windres.exe then put them in clang/bin. Next modify the PKGBUILD find make and add -j1 after make then it will build but there will still be a ton of warnings it does work however.
Pretty sure that isn't a solution.
its a temporary workaround atm for those who wish to build it themself :) it was newer intended as a solution. In time we should be able to come up with something better.
here is what I get right now:
libtool: link: if test DEF = "`/usr/bin/sed -n -e 's/^[ ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' -e q ../../gtk+-2.24.33/gdk/gdk.def`" ; then cp ../../gtk+-2.24.33/gdk/gdk.def .libs/libgdk-win32-2.0-0.dll.def; else echo EXPORTS > .libs/libgdk-win32-2.0-0.dll.def; cat ../../gtk+-2.24.33/gdk/gdk.def >> .libs/libgdk-win32-2.0-0.dll.def; fi
libtool: link: clang -shared .libs/libgdk-win32-2.0-0.dll.def .libs/gdk.o .libs/gdkapplaunchcontext.o .libs/gdkcairo.o .libs/gdkcolor.o .libs/gdkcursor.o .libs/gdkdisplay.o .libs/gdkdisplaymanager.o .libs/gdkdnd.o .libs/gdkdraw.o .libs/gdkevents.o .libs/gdkfont.o .libs/gdkgc.o .libs/gdkglobals.o .libs/gdkimage.o .libs/gdkkeys.o .libs/gdkkeyuni.o .libs/gdkoffscreenwindow.o .libs/gdkpango.o .libs/gdkpixbuf-drawable.o .libs/gdkpixbuf-render.o .libs/gdkpixmap.o .libs/gdkpolyreg-generic.o .libs/gdkrectangle.o .libs/gdkregion-generic.o .libs/gdkrgb.o .libs/gdkscreen.o .libs/gdkselection.o .libs/gdkvisual.o .libs/gdkwindow.o .libs/gdkwindowimpl.o .libs/gdkenumtypes.o .libs/gdkmarshalers.o .libs/gdkkeynames.o -Wl,--whole-archive win32/.libs/libgdk-win32.a -Wl,--no-whole-archive -limm32 -lshell32 -lole32 -LC:/msys64/clang64/lib -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lgdi32 -lmsimg32 -lcairo -lintl -march=x86-64 -mtune=generic -O2 -mms-bitfields -Wl,win32/rc/gdk-win32-res.o -Wl,--dynamicbase -Wl,-luuid -o .libs/libgdk-win32-2.0-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgdk-win32-2.0.dll.a
lld-link: error: <root>: undefined symbol: gdk_test_simulate_button
lld-link: error: <root>: undefined symbol: gdk_test_simulate_key
lld-link: error: <root>: undefined symbol: gdk_test_render_sync
lld-link: error: <root>: undefined symbol: gdk_keyval_convert_case
lld-link: error: <root>: undefined symbol: gdk_keyval_from_name
lld-link: error: <root>: undefined symbol: gdk_keyval_name
lld-link: error: undefined symbol: IA__gdk_display_open
>>> referenced by .libs/gdk.o:(gdk_display_open_default_libgtk_only)
>>> referenced by .libs/gdk.o:(gdk_display_open_default_libgtk_only)
lld-link: error: undefined symbol: IA__gdk_screen_make_display_name
>>> referenced by .libs/gdkapplaunchcontext.o:(gdk_app_launch_context_get_display)
lld-link: error: undefined symbol: IA__gdk_display_get_name
>>> referenced by .libs/gdkapplaunchcontext.o:(gdk_app_launch_context_get_display)
lld-link: error: undefined symbol: IA__gdk_colormap_get_type
>>> referenced by .libs/gdkcolor.o:(gdk_colormap_get_visual)
>>> referenced by .libs/gdkgc.o:(gdk_gc_set_colormap)
>>> referenced by .libs/gdkimage.o:(gdk_image_set_colormap)
>>> referenced 4 more times
lld-link: error: undefined symbol: IA__gdk_colormap_change
>>> referenced by .libs/gdkcolor.o:(gdk_colors_store)
lld-link: error: undefined symbol: IA__gdk_colormap_alloc_colors
>>> referenced by .libs/gdkcolor.o:(gdk_color_white)
>>> referenced by .libs/gdkcolor.o:(gdk_colormap_alloc_color)
>>> referenced by .libs/gdkcolor.o:(gdk_color_black)
>>> referenced 1 more times
lld-link: error: undefined symbol: IA__gdk_screen_get_system_colormap
>>> referenced by .libs/gdkcolor.o:(gdk_colormap_get_system)
>>> referenced by .libs/gdkoffscreenwindow.o:(_gdk_offscreen_window_new)
>>> referenced by .libs/gdkrgb.o:(gdk_rgb_create_info)
>>> referenced 3 more times
lld-link: error: undefined symbol: IA__gdk_cursor_new_for_display
>>> referenced by .libs/gdkcursor.o:(gdk_cursor_new)
lld-link: error: undefined symbol: IA__gdk_display_pointer_ungrab
>>> referenced by .libs/gdkdisplay.o:(gdk_pointer_ungrab)
>>> referenced by .libs/gdkwindow.o:(gdk_window_hide)
lld-link: error: undefined symbol: IA__gdk_display_keyboard_ungrab
>>> referenced by .libs/gdkdisplay.o:(gdk_keyboard_ungrab)
>>> referenced by .libs/gdkwindow.o:(gdk_window_hide)
lld-link: error: undefined symbol: IA__gdk_display_beep
>>> referenced by .libs/gdkdisplay.o:(gdk_beep)
>>> referenced by .libs/gdkwindow.o:(gdk_window_beep)
lld-link: error: undefined symbol: IA__gdk_event_send_client_message_for_display
>>> referenced by .libs/gdkdisplay.o:(gdk_event_send_client_message)
lld-link: error: undefined symbol: IA__gdk_screen_broadcast_client_message
>>> referenced by .libs/gdkdisplay.o:(gdk_event_send_clientmessage_toall)
lld-link: error: undefined symbol: IA__gdk_screen_get_display
>>> referenced by .libs/gdkdisplay.o:(singlehead_default_window_at_pointer)
>>> referenced by .libs/gdkdraw.o:(gdk_drawable_get_display)
>>> referenced by .libs/gdkimage.o:(_gdk_image_get_scratch)
>>> referenced 4 more times
lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [Makefile:1307: libgdk-win32-2.0.la] Error 1
make[4]: Leaving directory '/home/user/M/mingw-w64-gtk2/src/build-x86_64-w64-mingw32/gdk'
make[3]: *** [Makefile:1456: all-recursive] Error 1
make[3]: Leaving directory '/home/user/M/mingw-w64-gtk2/src/build-x86_64-w64-mingw32/gdk'
make[2]: *** [Makefile:1230: all] Error 2
make[2]: Leaving directory '/home/user/M/mingw-w64-gtk2/src/build-x86_64-w64-mingw32/gdk'
make[1]: *** [Makefile:740: all-recursive] Error 1
make[1]: Leaving directory '/home/user/M/mingw-w64-gtk2/src/build-x86_64-w64-mingw32'
make: *** [Makefile:632: all] Error 2
==> ERROR: A failure occurred in build().
try building it with --disable-visibility in the configure flags. not sure why this version needs this but i noticied it tries to use ELF visibility flags by default even on windows.
That got further, to the llvm-rc manifest parsing issue. So I need to get on backporting the fix from #9106
hopefully that takes care of the rest, fingers crossed.
Nope, this wasn't the llvm-rc issue I thought it was. #9130
any idea what might cause this ?