Skip to content
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

Fix mingw CI #1482

Merged
merged 3 commits into from
Mar 3, 2025
Merged

Fix mingw CI #1482

merged 3 commits into from
Mar 3, 2025

Conversation

kleisauke
Copy link
Contributor

@kleisauke kleisauke commented Mar 3, 2025

No description provided.

farindk added a commit that referenced this pull request Mar 3, 2025
@farindk
Copy link
Contributor

farindk commented Mar 3, 2025

Yes, I tried something like that (see mingw-ci-test branch). I gave up on the cmake errors...

@kleisauke kleisauke force-pushed the fix-mingw-ci branch 2 times, most recently from 7a6987f to ba51fa8 Compare March 3, 2025 12:57
@farindk
Copy link
Contributor

farindk commented Mar 3, 2025

We might need -mconsole to build a console-only Windows application.

@kmilos
Copy link
Contributor

kmilos commented Mar 3, 2025

May I suggest again switching the MinGW CI to "native" MSYS2 instead of cross-building like this? There are almost no extra codecs packaged on Linux for MinGW, so this job is not really covering most of the libheif code and features, and IMHO its added value is thus questionable...

=== Summary of compiled codecs ===
libde265 HEVC decoder           : - not found
FFMPEG HEVC decoder (HW acc)    : - not found
x265 HEVC encoder               : - not found
Kvazaar HEVC encoder            : - not found
AOM AV1 decoder                 : - not found
AOM AV1 encoder                 : - not found
Dav1d AV1 decoder               : - not found
SVT AV1 encoder                 : - not found
Rav1e AV1 encoder               : - not found
JPEG decoder                    : - not found
JPEG encoder                    : - not found
OpenH264 decoder                : - not found
OpenJPEG J2K decoder            : - not found
OpenJPEG J2K encoder            : - not found
OpenJPH HT-J2K encoder          : - not found
uvg266 VVC enc. (experimental)  : - disabled
vvenc VVC enc. (experimental)   : - not found
vvdec VVC dec. (experimental)   : - not found

@farindk
Copy link
Contributor

farindk commented Mar 3, 2025

@kmilos Yes, the mingw build has always been a PITA and I also don't see the use of it. Having an msys2 build would definitely be more useful, but I don't know enough about it to set it up. If you have a script for that, it would be much appreciated.

BTW: Also many other CI checks look very outdated. In my view, we should do on each architecture a release build, a test build, once with plugins and once without.

@kleisauke
Copy link
Contributor Author

FWIW, the Wine error happened because two GCC threading libraries (POSIX and Win32) were mixed. 😅

This PR was just to make the tree green again, I'm fine with removing it in favor of an MSYS2-based variant.

@kleisauke kleisauke marked this pull request as ready for review March 3, 2025 15:17
@farindk
Copy link
Contributor

farindk commented Mar 3, 2025

Incredible, I would never have found that... Thanks a lot.

@farindk farindk merged commit 96aa6e0 into strukturag:master Mar 3, 2025
34 of 35 checks passed
sudo apt-get update
sudo apt-get install -y --allow-downgrades libgd3:i386/jammy libpcre2-8-0:i386/jammy libpcre2-16-0:i386/jammy libpcre2-32-0:i386/jammy libpcre2-posix3/jammy
sudo apt-get purge -y libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
INSTALL_PACKAGES="$INSTALL_PACKAGES \
binutils-mingw-w64-i686 \
g++-mingw-w64-i686 \
Copy link
Contributor

@kmilos kmilos Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could potentially add "libz-mingw-w64" (i686 and x86-64 below) as the only other pre-built package available on Ubuntu, for e.g. testing the header compression in addition...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to add the libz-mingw-w64(-dev) packages 0589ee3
But libz did not get picked up (https://github.com/strukturag/libheif/actions/runs/13634673899/job/38110364111). Any idea why?

Copy link
Contributor

@kmilos kmilos Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I was hoping it'd work OOTB... Maybe needs explicit setting of export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig (and similarly for x86_64)? In any case, more trouble than gain as we established at this point...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to cherry-pick commit kleisauke@66826a2 for that. :)

Copy link
Contributor

@kmilos kmilos Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And instead of setting all of these variables/options (CC, CXX, CMAKE_SYSTEM_NAME, CMAKE_FIND_ROOT_PATH) manually in each script, a cross toolchain file should really be used w/ CMake if building from Linux, e.g. https://www.mingw-w64.org/build-systems/cmake/#cross-compiling-on-linux

All of this of course is irrelevant if/when switching to MSYS2, which is native.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kleisauke Thanks again. I've cherry-picked it.

@kleisauke kleisauke deleted the fix-mingw-ci branch March 3, 2025 16:07
@farindk farindk mentioned this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants