-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 build without dlfcn.h #4351
Conversation
I can't reproduce the issue: I hand-edited |
To get the error, you have to build sdl with a toolchain that don't have |
Thanks for your feedback, I updated the PR to use |
Looks a bit saner, but our configury and cmake'ry must really be updated to
That makes sense to me. |
Fix the following build failures when dlfcn.h is not available on the toolchain (e.g. uclibc toolchain configured without dynamic library support): sdl2-2.0.14/src/dynapi/SDL_dynapi.c:234:10: fatal error: dlfcn.h: No such file or directory 234 | #include <dlfcn.h> | ^~~~~~~~~ sdl2-2.0.14/src/thread/pthread/SDL_systhread.c:45:10: fatal error: dlfcn.h: No such file or directory 45 | #include <dlfcn.h> | ^~~~~~~~~ Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Here is something more intrusive, but should do the job properly -I hope- |
OK, I created #4356 for this |
I think this is at least part of the problem... #4367 |
Is this pull request taken care of by #4356? |
That was my intention, but #4356 has been taking more time than it should Maybe you can apply this one as a temporary band-aid for @ffontaine's issue? |
- cmake, configure (CheckDLOPEN): --enable-sdl-dlopen is now history.. detach the dl api discovery from SDL_LOADSO_DLOPEN functionality. define HAVE_DLOPEN. also define DYNAPI_NEEDS_DLOPEN (CheckDLOPEN is called only for relevant platforms.) - update SDL_config.in and SDL_config.cmake accordingly. - SDL_dynapi.h: set SDL_DYNAMIC_API to 0 if DYNAPI_NEEDS_DLOPEN is defined, but HAVE_DLOPEN is not. - pthread/SDL_systhread.c: conditionalize dl api use to HAVE_DLOPEN - SDL_x11opengl.c, SDL_DirectFB_opengl.c, SDL_naclopengles.c: rely on HAVE_DLOPEN, not SDL_LOADSO_DLOPEN. - SDL_config_android.h, SDL_config_iphoneos.h, SDL_config_macosx.h, SDL_config_pandora.h, and SDL_config_wiz.h: define HAVE_DLOPEN. Closes: #4351
Fix the following build failures when
dlfcn.h
is not available on the toolchain (e.g. uclibc toolchain configured without dynamic library support):Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com