-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gtk2 clang build nastiness #8493
Comments
Technically clang32... may or may not happen on clang64 (probably does if it's what I think) Are you by chance piping output into something (such as |
not while building gtk2 no :) though i do use the logging from time to time to make it easier to see where in the code it happens. |
btw it also happens in clang64 so it is not 32 bit related. |
i know clang chokes on -fPIC but i noticed a -DPIC in the compile does clang handle this ? |
that's just a normal C preprocessor define. No problem. |
oki then :) heres the output from the 64 bit compile, warning wall of text incomming :S Click here for the log
|
it does look like the issue I ran into with piping through |
well i just used MINGW_ARCH=clang64 makepkg-mingw -c --skippgp --nocheck so i assumed theres no piping ? |
no there shouldn't be... are you using mintty or something else that might be using cygwin ptys? I use windows terminal so start in 'normal' windows console mode. maybe try running from a normal windows console for a test? |
yah i use mintty, ok ill try that. |
there was an MSYS2 report lately about flaky pipes, and the pty code in cygwin dll is a hot mess |
might be it lets see building via cmd this time. |
sadly made no difference same error :S |
I'm stumped then.... @mati865 ? |
me2... looks like it is choking on some of the macro calls in glib to me though. |
looking forward to building graphviz now oh joy :P |
Seems like preprocessor has crashed because it could not allocate more memory. Can you observe memory usage during build with 64-bit clang or tell how to reproduce it (is it enough to run makepkg)? |
just running makepkg is enough, |
May need more dependencies than official repos have gotten through though |
not seing anything out of the ordinary with memory usage so far not really sure how to proceed ? |
on a hunch i tried several older versions as well they all crash in the exact same spot, so it might actually be a gtk2 bug that noone has caught before. |
I am actually not quite sure how you managed to get as far as attempting to build gtk2 so fast 😮 |
persistence and a good deal of patching :) mostly removing -rpath and -fPIC from dependencies that were to stubborn to build. |
would make it easier going forward if the offending flags were just ignored by the llvm toolset, one thing though --version-script needs a real fix as it is used to make linker map files and is supported even by msvc and pretty much any windows compiler out there. it does work for unix and apple though is named differently in those. -Bsymbolic might also need a real fix. |
-Wl,-exported_symbols_list was the name for -Wl,--version-script but it does not work on windows unfortunatly. |
Click here to see the list
list of packages i managed to build, some might be a little lobotomized like magnum-integrations and plugins plus vala though i had to disable valadoc as i couldnt build all the dependencies. |
Msvc doesn't support it, it uses |
it is called /MAP on msvc so yes it does https://docs.microsoft.com/en-us/cpp/build/reference/map-generate-mapfile?view=msvc-160 |
on unix it also seems to do other stuff but on windows ld basically emulates the msvc option :) |
try using ``` to block off your code https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks |
Yeah sometimes the code blocks need more ``` i noticed :S well the above code piece did not fix gtk2 but it did allow me to filter out where it goes wrong, in the ifs code in clang it crashes when trying to create stubs. |
well this is kinda odd add -Wno-expansion-to-defined to the preprocessor flags and gtk2 gets a lot farther.
|
also make -j1 or things go boom. looks like llvm-rc does not like manifests since it looks an awfull lot like an xml parser error. |
Sounds like 32-bit linker, there is no fix for it.
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. |
strangely enough the python based manifest code from gtk3 works, but i doubt it would be easy porting it for gtk2 :S |
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. |
I'd try with LLVM 12 first, if it doesn't work we would have to build and bundle Bintuils windres...
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 ?. |
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. |
here is what I get right now:
|
try building it with --disable-visibility in the configure flags. |
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 ?
The text was updated successfully, but these errors were encountered: