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
1.5.2 macOS run time failure "Couldn't open libOpenGL.so.0: dlopen(libOpenGL.so.0, 5): image not found" #176
Comments
Honestly we should start by hooking up some macos builders in Travis, and writing some more tests for it. |
The OSX builder on the free Travis instance is permanently backed up, but I can try enabling it. |
@ebassi I think they end up being effectively serialized. I switched xserver's travis to only make one runner for whatever the newest OSX is, and that's usually quick enough. If we wanted more elaborate coverage we could set up the yml to start the full OSX test matrix only on specially named git branches. |
When building on macOS we don't have access to EGL, and GLX support is conditional. We should ensure we're using the appropriate paths depending on the platform, and protect our use of macros to avoid undefined symbols. Closes: anholt#176
@nwnk I've added the osx builder on the Travis CI matrix, and massaged the build script so that it runs; need to run the test suite as well, and check if the build options matrix is working as intended |
When building on macOS we don't have access to EGL, and GLX support is conditional. We should ensure we're using the appropriate paths depending on the platform, and protect our use of macros to avoid undefined symbols. Closes: anholt#176
@ilovezfs Could you have a look at #178 and check if that fixes the build for you? Additionally, it would be great to have a small test case we can add to the suite, so that we can run it on macOS and ensure we're not regressing at run time. To be fair, though, it seems that the errors you're seeing when building your test code are actually coming from macOS; it's hard to find some documentation that is not hopelessly outdated on how to build OpenGL code with C and Carbon. |
#178 looks good. See https://gist.github.com/ilovezfs/9a1619a0d47d51277427c4af3b59cff0 Those warnings seem to be caused by a missing
So something is still a bit off with our test. |
The test is from the original formula added in Homebrew/legacy-homebrew#34345 From the comments, the test was written by @scoopr. |
Yup, your revised test runs without warnings or errors:
|
In terms of licensing, it's all BSD 2-clause "Simplified" License. See https://github.com/Homebrew/homebrew-core/#license |
@ilovezfs Brilliant, thanks! |
You're welcome! |
Regressed by #170
The test block runs
The problem is that although OPENGL_LIB gets defined for
__APPLE__
atlibepoxy/src/dispatch_common.c
Line 178 in 791b28c
it then gets redefined generically in the else at
libepoxy/src/dispatch_common.c
Line 199 in 791b28c
As a workaround in the Homebrew formula, I can
A proper fix will probably involve guarding the generic
#define OPENGL_LIB "libOpenGL.so.0"
with an ifndef, or reorganizing the directives a bit.Ref: Homebrew/homebrew-core#28037
CC @ebassi @nwnk
The text was updated successfully, but these errors were encountered: