Comments (1)
I also happen to be trying to compile SDL using the simple2d.sh script on a raspberry pi and have encountered the same error. I have determined that the installation is failing because SDL fails to compile during the installation process due to a compile error.
/tmp/SDL2-2.0.10/src/video/SDL_egl.c: In function 'SDL_EGL_LoadLibrary':
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:26: warning: implicit declaration of function 'access'; did you mean 'Success'? [-Wimplicit-function-declaration]
268 | SDL_bool vc4 = (0 == access("/sys/module/vc4/", F_OK));
| ^~~~~~
| Success
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:53: error: 'F_OK' undeclared (first use in this function)
268 | SDL_bool vc4 = (0 == access("/sys/module/vc4/", F_OK));
| ^~~~
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:53: note: each undeclared identifier is reported only
once for each function it appears in
make: *** [Makefile:530: build/SDL_egl.lo] Error 1
==> Installing
/bin/bash build-scripts/updaterev.sh
CC build/SDL_egl.lo
/tmp/SDL2-2.0.10/src/video/SDL_egl.c: In function 'SDL_EGL_LoadLibrary':
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:26: warning: implicit declaration of function 'access'; did you mean 'Success'? [-Wimplicit-function-declaration]
268 | SDL_bool vc4 = (0 == access("/sys/module/vc4/", F_OK));
| ^~~~~~
| Success
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:53: error: 'F_OK' undeclared (first use in this function)
268 | SDL_bool vc4 = (0 == access("/sys/module/vc4/", F_OK));
| ^~~~
/tmp/SDL2-2.0.10/src/video/SDL_egl.c:268:53: note: each undeclared identifier is reported only
once for each function it appears in
make: *** [Makefile:530: build/SDL_egl.lo] Error 1
There is a bug tracking thread where others are having a similar issue when trying to compile SDL for the raspberry pi.
This issue on Github claims to have fixed the issue by including unistd.h
in SDL_egl.c
, because unistd.h
includes the definitions of access
and F_OK
.
Perhaps the simplest way to resolve this is to compile a more recent version of SDL that includes the patches made from both of the previous links. Any SDL release after November of 2021 should suffice.
I used the most recent version 2.0.22 by changing one line in the simple2d.sh script:
sdl_fname="SDL2-2.0.22"
sdl_url="${libsdl_url}/release/${sdl_fname}.tar.gz"
This change compiled SDL successfully without the previous error.
SDL_Mixer also does not compile with the error.
music.c:43:10: fatal error: native_midi/native_midi.h: No such file or directory
43 | #include "native_midi/native_midi.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:149: build/music.lo] Error 1
I changed to a more recent SDL_Mixer version to solve this one as there was no documentation of others having this issue. The simple2d.sh script pulls all SDL releases from https://www.libsdl.org, but new releases for SDL_Mixer are no longer posted there, so I pulled from the Github repository instead.
If libsdl.org is no longer including the most recent releases, perhaps it is time to use the Github releases for the script.
from simple2d.
Related Issues (20)
- Anti-aliasing for S2D_DrawLine()?
- C++ build command is incorrect HOT 1
- Touch Support?
- simple2d on Mac HOT 6
- [QUESTION]: The possibility of a GUI API and file menu handling HOT 1
- How to keep previously rendered shapes? HOT 1
- 2d graphic app in C++
- libGL error / X Error of failed request: GLXBadContext
- [Problem]: OpenTTF stops opening font after 30 seconds. HOT 4
- [Support] Cmake package config support HOT 2
- issues compiling in XCode on macos m1
- building simple.c first code example in VC 2019 troubles HOT 2
- Export Simple2d Functions into DLL HOT 1
- text not working on MacOS HOT 3
- compiling in codeblocks 20.03 the test auto.c returns these errors
- Image Load from a memory buffer HOT 1
- Header Guards
- Context parameters for update and render functions
- Corrupt text rendering HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple2d.