Coder Social home page Coder Social logo

Comments (10)

madebr avatar madebr commented on September 26, 2024

The ci failure mode(s) have also been changed since GitHub macos runners switched to arm64:
Before, there were errors about surface mismatches.
Now, IMG_Init(IMG_INIT_JXL) fails because it cannot find libjxl.0.10.dylib.
There is also an issue with libwebpdemux.2.dylib

from sdl_image.

sezero avatar sezero commented on September 26, 2024

Now, IMG_Init(IMG_INIT_JXL) fails because it cannot find libjxl.0.10.dylib. There is also an issue with libwebpdemux.2.dylib

Ouch. How is that happening? Something wrong with brew (e.g. not adding to dyld cache or something)?

from sdl_image.

madebr avatar madebr commented on September 26, 2024

Ouch. How is that happening? Something wrong with brew (e.g. not adding to dyld cache or something)?

I don't know how macOS dyld works but it seems like no homebrew library can be loaded at all.
All libraries provided by homebrew cannot be found: libavif, libjxl, and libwebp. (I removed installation of libjpeg, libpng, and libtiff)

The macOS job now uploads CMake logs that hint homebrew installs to /opt/homebrew (e.g. the CMake cache contains libjxl_LIBRARY:FILEPATH=/opt/homebrew/lib/libjxl.dylib).
But the IMG_Init error message is:

Initialization should succeed (Failed loading libjxl.0.10.dylib: dlopen(libjxl.0.10.dylib, 0x0006): tried: 'libjxl.0.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibjxl.0.10.dylib' (no such file), '/Users/runner/work/SDL_image/SDL_image/build/libjxl.0.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/SDL_image/SDL_image/build/libjxl.0.10.dylib' (no such file), '/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/setupsdl/66c57facf1111a4ec08d3d1abdf3c87f3062ffbea8d9eb4c9c412e9b5e7f59b7/package/lib/libjxl.0.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/setupsdl/66c57facf1111a4ec08d3d1abdf3c87f3062ffbea8d9eb4c9c412e9b5e7f59b7/package/lib/libjxl.0.10.dylib' (no such file), '/usr/lib/libjxl.0.10.dylib' (no such file, not in dyld cache), 'libjxl.0.10.dylib' (no such file))

There is no /opt/homebrew/lib path in the error message.

from sdl_image.

sezero avatar sezero commented on September 26, 2024

Looks like macos >= 13 has the issue. Changing the runner to macos-12, we get the old surface mismatch

There is no /opt/homebrew/lib path in the error message.

I guess the path is on macos libs path, because cmake can found them, yes?
Is it possible that macos-13 (arm64?) versions somehow quarantine those libs
and dlopen fails because of it?

from sdl_image.

madebr avatar madebr commented on September 26, 2024

Looks like CMake hardcodes /opt/homebrew.
This is also the default homebrew installation path.
This homebrew discussion is related.
The shellenv suggestion might work for our purposes.

from sdl_image.

sezero avatar sezero commented on September 26, 2024

Yes, looks like we'll need to add homebrew lib directory to dyld path somehow in our workflows

from sdl_image.

madebr avatar madebr commented on September 26, 2024

When I add the homebrew library path to DYLD_LIBRARY_PATH, the test fails with a BUS error.
https://github.com/madebr/SDL_image/actions/runs/8927177439/job/24519945832#step:13:152

It fails during the BMP test, after successfully completing the avif test.
Or at least, that is what it appears like because the logs might be incomplete.
When doing a search for "bus error DYLD_LIBRARY_PATH`, it looks like these errors are not uncommon.

Adding /opt/homebrew/lib to SDL_image's rpath won't fix the issue: it must be added to SDL3 (dlopen happens there)

from sdl_image.

sezero avatar sezero commented on September 26, 2024

When I add the homebrew library path to DYLD_LIBRARY_PATH, the test fails with a BUS error. https://github.com/madebr/SDL_image/actions/runs/8927177439/job/24519945832#step:13:152

It fails during the BMP test, after successfully completing the avif test. Or at least, that is what it appears like because the logs might be incomplete. When doing a search for "bus error DYLD_LIBRARY_PATH`, it looks like these errors are not uncommon.

Misalinged stack or something? I wonder whether or not it happens in SDL2 too.

from sdl_image.

sezero avatar sezero commented on September 26, 2024

Looks like msys started installing libjxl 0.10.2 and our tests started failing there too: https://github.com/libsdl-org/SDL_image/actions/runs/9005679096/job/24741542312

from sdl_image.

sezero avatar sezero commented on September 26, 2024

Can we not raise this issue in libjxl bug tracker somehow?

from sdl_image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.