Martchus / PKGBUILDs

PKGBUILDs for creating various Arch Linux packages (including lots of mingw-w64 cross compiler packages)
https://martchus.dyn.f3l.de/repo/arch/ownstuff
GNU General Public License v2.0
118 stars 46 forks source link

Everything prior to CRT 12.0.0 should be rebuilt as mingw-w64 12.0.0 is using UCRT #190

Closed Aerocatia closed 3 months ago

Aerocatia commented 3 months ago

Affected package (name and version): Anything built before the upgrade to the mingw-w64 12.0.0 CRT Used mirror: ftp.f3l.de

Brief description of the problem: mingw-w64 12.0.0 defaults to UCRT, this is fine, if not great to finally have a Linux disto use it, but now the binary repos are in a mixed state where some packages are built against MSVCRT and newer ones are build against UCRT. This is causing linker errors when static linking that go away when you rebuild the affected packages (libtiff, zstd, ...more) Even beyond static linking, mixing C runtimes introduces ABI incompatibilities if certain things are shared across DLL boundaries.

Martchus commented 3 months ago

I was not really aware of this to be honest. I only noticed that some symbols are different and that some packages needed to be rebuilt. But you're right, the official changelog states that UCRT is now the default and my package (based on the Arch Linux package) doesn't explicitly specify --with-default-msvcrt=msvcrt (like the MSYS2 package does).

Normally I wouldn't have made the switch to UCRT. However, according to https://www.msys2.org/docs/environments it is probably the better option. According to https://learn.microsoft.com/en-us/cpp/windows/universal-crt-deployment it can even be deployed on very old Windows versions and normally Windows updates are covering it anyway. So I guess we can actually stick to that change.

That means I will have to rebuild everything, indeed. (Mixing the CRTs is really nothing we should do. I thought this would have a much worse impact, though.) Now it is too late to use my normal/proper staging workflow for this so I guess newly built packages should go one-by-one directly to ownstuff (and not ownstuff-staging).

Before building everything, I am removing packages that are not maintained anymore (or don't build anymore) from the repository:

mingw-w64-karchive mingw-w64-kcodecs mingw-w64-kconfig mingw-w64-kdbusaddons mingw-w64-kguiaddons mingw-w64-kitemviews mingw-w64-kvazaar mingw-w64-kwidgetsaddons mingw-w64-kwindowsystem mingw-w64-threadweaver mingw-w64-attica mingw-w64-solid mingw-w64-sonnet mingw-w64-kcompletion mingw-w64-kimageformats mingw-w64-kunitconversion mingw-w64-kcoreaddons mingw-w64-kauth mingw-w64-kcrash mingw-w64-kjobwidgets mingw-w64-kconfigwidgets mingw-w64-kglobalaccel mingw-w64-kservice mingw-w64-kiconthemes mingw-w64-ktextwidgets mingw-w64-kxmlgui mingw-w64-kbookmarks mingw-w64-wxmsw mingw-w64-ki18n

I'll probably remove more packages later if they don't build anymore. (This is a good opportunity to do some cleanup.)

I'm now going to rebuild the following packages:

mingw-w64-bzip2, mingw-w64-coin-or-coinmetis, mingw-w64-dcadec, mingw-w64-graphite, mingw-w64-ilmbase, mingw-w64-intel-tbb, mingw-w64-l-smash, mingw-w64-libmodplug, mingw-w64-libsoxr, mingw-w64-lua51, mingw-w64-lzo, mingw-w64-speexdsp, mingw-w64-termcap, mingw-w64-xvidcore, mingw-w64-openssl-1.0, mingw-w64-schroedinger, mingw-w64-sdl, mingw-w64-speex, mingw-w64-geocoordinatecalculator, mingw-w64-openjpeg, mingw-w64-atk, mingw-w64-libcroco, mingw-w64-libsystre, mingw-w64-netcdf-cxx, mingw-w64-netcdf-cxx-legacy, mingw-w64-videodownloader, mingw-w64-xerces-c, mingw-w64-enca, mingw-w64-gl2ps, mingw-w64-libmng, mingw-w64-kdreports-git, mingw-w64-aspell, mingw-w64-glpk, mingw-w64-libdatrie, mingw-w64-pegtl, mingw-w64-libbacktrace-git, mingw-w64-libgnurx, mingw-w64-tk, mingw-w64-pcre, mingw-w64-eigen, mingw-w64-fftw, mingw-w64-libvisual, mingw-w64-gtest, mingw-w64-libdvdcss, mingw-w64-nlopt, mingw-w64-tcl, mingw-w64-libthai, mingw-w64-jsoncpp, mingw-w64-libepoxy, mingw-w64-cppunit, mingw-w64-libiconv, mingw-w64-libidn, mingw-w64-libkate, mingw-w64-vo-aacenc, mingw-w64-mpdecimal, mingw-w64-tzdata, mingw-w64-lame, mingw-w64-opencore-amr, mingw-w64-gsm, mingw-w64-graphene, mingw-w64-libogg, mingw-w64-libtheora, mingw-w64-kdsoap, mingw-w64-libtasn1, mingw-w64-librtmp0, mingw-w64-mariadb-connector-c, mingw-w64-libbluray, mingw-w64-physfs, mingw-w64-gdk-pixbuf2, mingw-w64-lz4, mingw-w64-hunspell, mingw-w64-ftgl, mingw-w64-cmake, mingw-w64-netcdf, mingw-w64-sdl2_image, mingw-w64-libgpg-error, mingw-w64-nauty, mingw-w64-double-conversion, mingw-w64-cmocka, mingw-w64-portaudio, mingw-w64-recode, mingw-w64-vid.stab, mingw-w64-flac, mingw-w64-libssh2, mingw-w64-openal, mingw-w64-zimg, mingw-w64-avisynthplus, mingw-w64-xxhash, mingw-w64-pcre2, mingw-w64-openssl-1.1, mingw-w64-gmp, mingw-w64-libbs2b, mingw-w64-sfml, mingw-w64-freeglut, mingw-w64-mpfr, mingw-w64-tbb, mingw-w64-libarchive, mingw-w64-libtre-git, mingw-w64-srt, mingw-w64-libtiff, mingw-w64-libharu, mingw-w64-coin-or-clp, mingw-w64-coin-or-cgl, mingw-w64-coin-or-cbc, mingw-w64-glew, mingw-w64-libvorbis, mingw-w64-cairo, mingw-w64-x264, mingw-w64-lua, mingw-w64-coin-or-asl, mingw-w64-libgcrypt, mingw-w64-pdcurses, mingw-w64-fontconfig, mingw-w64-lcms2, mingw-w64-libfdk-aac, mingw-w64-spirv-tools, mingw-w64-libsndfile, mingw-w64-libaec, mingw-w64-brotli, mingw-w64-libpsl, mingw-w64-zlib, mingw-w64-minizip, mingw-w64-gnutls, mingw-w64-sdl2_ttf, mingw-w64-dlfcn, mingw-w64-libusb, mingw-w64-libssh, mingw-w64-readline, mingw-w64-fltk, mingw-w64-jasper, mingw-w64-cppwinrt, mingw-w64-libffi, mingw-w64-libidn2, mingw-w64-openh264, mingw-w64-qtforkawesome, mingw-w64-imath, mingw-w64-libunistring, mingw-w64-proj, mingw-w64-cgns, mingw-w64-giflib, mingw-w64-libsrtp, mingw-w64-expat, mingw-w64-gettext, mingw-w64-pixman, mingw-w64-libnice, mingw-w64-highway, mingw-w64-suitesparse, mingw-w64-openjpeg2, mingw-w64-gtk3, mingw-w64-gtk4, mingw-w64-coin-or-coinutils, mingw-w64-coin-or-osi, mingw-w64-libwebp, mingw-w64-mpg123, mingw-w64-opus, mingw-w64-icu, mingw-w64-postgresql, mingw-w64-ncurses, mingw-w64-hdf5, mingw-w64-blas, mingw-w64-cblas, mingw-w64-lapack, mingw-w64-lapacke, mingw-w64-libunibreak, mingw-w64-qtforkawesome-qt6, mingw-w64-coin-or-coinmumps, mingw-w64-vulkan-icd-loader, mingw-w64-sqlite, mingw-w64-gklib, mingw-w64-metis, mingw-w64-cminpack, mingw-w64-fribidi, mingw-w64-libsodium, mingw-w64-libjpeg-turbo, mingw-w64-libnghttp2, mingw-w64-nettle, mingw-w64-curl, mingw-w64-gstreamer, mingw-w64-gst-plugins-base, mingw-w64-zstd, mingw-w64-aom, mingw-w64-libvpx, mingw-w64-rav1e, mingw-w64-gavl, mingw-w64-spirv-cross, mingw-w64-vmaf, mingw-w64-assimp, mingw-w64-snappy, mingw-w64-protobuf, mingw-w64-libxslt, mingw-w64-harfbuzz, mingw-w64-harfbuzz-icu, mingw-w64-opencv, mingw-w64-p11-kit, mingw-w64-libdeflate, mingw-w64-openexr, mingw-w64-poppler, mingw-w64-pango, mingw-w64-gst-plugins-bad, mingw-w64-frei0r-plugins, mingw-w64-x265, mingw-w64-fluidsynth

This list doesn't include Qt packages yet but I have already rebuilt the most important ones and will look into updating the PKGBUILDs first.

Martchus commented 3 months ago

I removed the following packages because they don't build anymore:

mingw-w64-hdf5 mingw-w64-cgns mingw-w64-netcdf mingw-w64-nauty mingw-w64-atk mingw-w64-gtk3 mingw-w64-gtk4, mingw-w64-gst-plugins-base mingw-w64-gst-plugins-bad

The following packages don't build anymore (or a dependency of them). Some I might also just remove but some should probably better be fixed:

mingw-w64-libsystre mingw-w64-enca mingw-w64-aspell mingw-w64-docbook-wrapper mingw-w64-pcre mingw-w64-libvisual mingw-w64-libidn mingw-w64-lame mingw-w64-gsm mingw-w64-kdsoap mingw-w64-hunspell mingw-w64-libgpg-error mingw-w64-recode mingw-w64-pcre2 mingw-w64-libbs2b mingw-w64-sfml mingw-w64-libarchive mingw-w64-libtre-git mingw-w64-fluidsynth mingw-w64-coin-or-cbc mingw-w64-cairo mingw-w64-libgcrypt mingw-w64-spirv-tools mingw-w64-libsndfile mingw-w64-gnutls mingw-w64-proj mingw-w64-libnice mingw-w64-icu mingw-w64-postgresql mingw-w64-ncurses mingw-w64-coin-or-coinmumps mingw-w64-sqlite mingw-w64-qca-qt5 mingw-w64-qca-qt6 mingw-w64-gklib mingw-w64-metis mingw-w64-libxslt mingw-w64-harfbuzz mingw-w64-p11-kit mingw-w64-openexr mingw-w64-poppler mingw-w64-pango mingw-w64-frei0r-plugins

I have already fixed some packages (or at least worked around some build failures), see https://github.com/Martchus/PKGBUILDs/commit/ba4e3098675ea376d1255aea17b2c78a1601b586. Those changed should probably be taken over by the relevant AUR maintainers. (The AUR workflow is really not good for changes/mass-rebuilds that affect many packages. It would take too long to wait for AUR maintainers to react so I'm importing the packages here as necessary.)

Aerocatia commented 3 months ago

I pushed an update to mingw-w64-libarchive, I don't know if that changes anything. Maybe mingw-w64-libsystre should be dropped, it is not even on the AUR anymore.

mingw-w64-libarchive depends on mingw-w64-regex that is met by mingw-w64-libgnurx

EDIT: I am not even sure what the point of the virtual package is if mingw-w64-libsystre is gone.

Martchus commented 3 months ago

mingw-w64-libsystre was itself not built because a dependency was failing. But I'll switch to mingw-w64-libgnurx anyway.

Note that I also couldn't find mingw-w64-libsystre on the AUR anymore. My buildservice could however retrieve the PKGBUILD (judging by the logs/artefacts of https://martchus.dyn.f3l.de/buildservice/#build-action-details-section?911). Supposedly the tar archive is still available for one's who know the URL. By the way, those are the logs from my public buildservice instance (https://martchus.dyn.f3l.de/buildservice/#build-action-details-section?897). (I also ran a build job concurrently on my workstation yesterday because it is much faster than the server. Hence those logs don't cover all the packages that were rebuilt.)

Martchus commented 3 months ago

The next round of rebuild attempts has finished: https://martchus.dyn.f3l.de/buildservice/#build-action-details-section?853

I removed the following packages as they failed to build and are not required by myself:

mingw-w64-coin-or-cbc mingw-w64-hunspell mingw-w64-recode mingw-w64-enca mingw-w64-libvisual mingw-w64-spirv-tools

This leaves only:

mingw-w64-gnutls, mingw-w64-postgresql, mingw-w64-libnice, mingw-w64-kdsoap, mingw-w64-cairo, mingw-w64-harfbuzz, mingw-w64-poppler, mingw-w64-pango, mingw-w64-frei0r-plugins, mingw-w64-icu

(And mingw-w64-openexr which will build with --nocheck.)

Martchus commented 3 months ago

@xantares Some of the removed packages mentioned in my previous comments are maintained by you and for some of them you asked me in the past explicitly to add them to the repository. If I should re-add them the build errors need to be fixed first. Often it helps to treat certain errors as warnings again. Other cases might be more tricky.

Martchus commented 3 months ago

All packages containing DLLs or static libraries have been rebuilt or removed. I wrote comments on certain problematic AUR packages. If the problems are resolved I can re-add packages (or update packages again from AUR instead of relying on my own copy of the PKGBUILD in this repo).