electronstudio / raylib-python-cffi

Python CFFI bindings for Raylib
http://electronstudio.github.io/raylib-python-cffi
Eclipse Public License 2.0
142 stars 29 forks source link

sudo make install on pi zero doesn't get past glfwGetProcAddress #31

Closed techmaticsnz closed 3 years ago

techmaticsnz commented 3 years ago

is this a typo?

it recommends changing it to eglGetProcAddress

[  0%] Building C object raylib/CMakeFiles/raylib.dir/core.c.o
/home/pi/raylib-python-cffi/raylib-c/src/core.c: In function ‘InitGraphicsDevice’:
/home/pi/raylib-python-cffi/raylib-c/src/core.c:4357:22: error: ‘glfwGetProcAddress’ undeclared (first use in this function); did you mean ‘eglGetProcAddress’?
     rlLoadExtensions(glfwGetProcAddress);
                      ^~~~~~~~~~~~~~~~~~
                      eglGetProcAddress
/home/pi/raylib-python-cffi/raylib-c/src/core.c:4357:22: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [raylib/CMakeFiles/raylib.dir/build.make:63: raylib/CMakeFiles/raylib.dir/core.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:345: raylib/CMakeFiles/raylib.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
electronstudio commented 3 years ago

This looks like an issue with the original C library, Raylib, rather than the Raylib Python CFFI bindings so suggest you report it to Raylib's GitHub and/or Discord.

techmaticsnz commented 3 years ago

Got it. thanks!

electronstudio commented 3 years ago

https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi#compiling-raylib-source-code Might be useful

techmaticsnz commented 3 years ago

I am going through instructions for building library for pi zero... sudo make install doesn't work. cannot patch header. this line patch -p0 <raylib_modified.h.patch cannot find this file. this error comes up when running (from raylib-python-cffi folder) `python3 raylib/static/build.py BUILDING FOR RASPBERRY PI /home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py:154: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing. warnings.warn("String literal found in cdef() or type source. " Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py", line 336, in _parse ast = _get_parser().parse(fullcsource) File "/home/pi/.local/lib/python3.7/site-packages/pycparser/c_parser.py", line 152, in parse debug=debuglevel) File "/home/pi/.local/lib/python3.7/site-packages/pycparser/ply/yacc.py", line 331, in parse return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) File "/home/pi/.local/lib/python3.7/site-packages/pycparser/ply/yacc.py", line 1118, in parseopt_notrack p.callable(pslice) File "/home/pi/.local/lib/python3.7/site-packages/pycparser/c_parser.py", line 565, in p_pp_directive self._token_coord(p, 1)) File "/home/pi/.local/lib/python3.7/site-packages/pycparser/plyparser.py", line 67, in _parse_error raise ParseError("%s: %s" % (coord, msg)) pycparser.plyparser.ParseError: :79:1: Directives not supported yet

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "raylib/static/build.py", line 82, in build_rpi_nox() File "raylib/static/build.py", line 59, in build_rpi_nox ffibuilder.cdef(open("raylib/raylib_modified.h").read().replace('RLAPI ', '')) File "/home/pi/.local/lib/python3.7/site-packages/cffi/api.py", line 112, in cdef self._cdef(csource, override=override, packed=packed, pack=pack) File "/home/pi/.local/lib/python3.7/site-packages/cffi/api.py", line 126, in _cdef self._parser.parse(csource, override=override, **options) File "/home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py", line 389, in parse self._internal_parse(csource) File "/home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py", line 394, in _internal_parse ast, macros, csource = self._parse(csource) File "/home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py", line 338, in _parse self.convert_pycparser_error(e, csource) File "/home/pi/.local/lib/python3.7/site-packages/cffi/cparser.py", line 367, in convert_pycparser_error raise CDefError(msg) cffi.CDefError: cannot parse "#ifndef RAYLIB_H"

:79:1: Directives not supported yet ` I've placed a compiled library libraylib.a file in /usr/local/lib as per the build file
electronstudio commented 3 years ago

The build error is caused by the patch failing, which is due to the file being missing. I have added the missing file if you do a git pull.

electronstudio commented 3 years ago

The /usr/local/lib/libraylib.a file should be installed when you compile and install Raylib, you shouldn't have to put it there yourself. If you haven't compiled and installed Raylib yourself you may hit other issues.

electronstudio commented 3 years ago

btw once you get it to build, if you send me the dist/raylib*.whl file I will put it on pypi so other Pi users dont need to go through the hassle of building.

electronstudio commented 3 years ago

I haven't ever used Raylib on Pi, only @simonchatts has reported it works. I have an old RPi3, I will give it a go on that.

electronstudio commented 3 years ago

before you build Raylib you have to do:

sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
electronstudio commented 3 years ago

I think the reason you're not getting the librarylib.a file is that the BUILD_SHARED_LIBS flag prevents the static libs from being built. I'm sure it used to build both. I will remove that flag. We don't need the shared libs with raylib.static anyway, they are only for raylib.dynamic

electronstudio commented 3 years ago

and there's an error in my RPI build script, my fault, now fixed

electronstudio commented 3 years ago

OK, instructions have been updated, bug has been fixed, (thanks for reporting) and it works on my RPi3.

Here is the wheel file. raylib-rpi3.tar.gz You can install it with:

tar xvfz raylib-rpi3.tar.gz
pip3 install raylib-rpi3/raylib-3.7.0-cp35-cp35m-linux_armv7l.whl

(I also had to upgrade my version of pip to get this to run)

Now the question is, is this binary likely to work on other RPi3 installs, and is it likely to work on other models?

techmaticsnz commented 3 years ago

Thank you very much! trying the wheel now

techmaticsnz commented 3 years ago

The wheel file didn't run on pi 0

techmaticsnz commented 3 years ago

now im getting this patch -p0 <raylib_modified.h.patch File raylib.h is not a regular file -- refusing to patch 7 out of 7 hunks ignored -- saving rejects to file raylib.h.rej

I had to git pull on raylib-c in order to get the build to work.

electronstudio commented 3 years ago

looks like there's something wrong with the patch file, i will fix it later.

the patch step is actually optional and not required. could you try:

  1. delete everything
  2. checkout from github again
  3. follow instructions again but skip the 2 steps i have now marked 'optional'.
electronstudio commented 3 years ago

the patch file should be fixed now, but still easier just not to do patching at all, since it isn't required unless you update to a newer than 3.7 raylib.

techmaticsnz commented 3 years ago

Hello I've odne the instructions you've given, here's the result:

BUILDING FOR RASPBERRY PI
generating ./raylib/static/_raylib_cffi.c
the current directory is '/home/pi/raylib-python-cffi'
running build_ext
building 'raylib.static._raylib_cffi' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c raylib/static/_raylib_cffi.c -o ./raylib/static/_raylib_cffi.o
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_CheckCollisionRayBox’:
raylib/static/_raylib_cffi.c:4624:10: warning: implicit declaration of function ‘CheckCollisionRayBox’; did you mean ‘CheckCollisionBoxes’? [-Wimplicit-function-declaration]
   return CheckCollisionRayBox(x0, x1);
          ^~~~~~~~~~~~~~~~~~~~
          CheckCollisionBoxes
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_CheckCollisionRaySphere’:
raylib/static/_raylib_cffi.c:4667:10: warning: implicit declaration of function ‘CheckCollisionRaySphere’; did you mean ‘CheckCollisionBoxSphere’? [-Wimplicit-function-declaration]
   return CheckCollisionRaySphere(x0, x1, x2);
          ^~~~~~~~~~~~~~~~~~~~~~~
          CheckCollisionBoxSphere
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_CheckCollisionRaySphereEx’:
raylib/static/_raylib_cffi.c:4716:10: warning: implicit declaration of function ‘CheckCollisionRaySphereEx’; did you mean ‘CheckCollisionBoxSphere’? [-Wimplicit-function-declaration]
   return CheckCollisionRaySphereEx(x0, x1, x2, x3);
          ^~~~~~~~~~~~~~~~~~~~~~~~~
          CheckCollisionBoxSphere
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_CloseAudioStream’:
raylib/static/_raylib_cffi.c:5007:3: warning: implicit declaration of function ‘CloseAudioStream’; did you mean ‘PauseAudioStream’? [-Wimplicit-function-declaration]
   CloseAudioStream(x0);
   ^~~~~~~~~~~~~~~~
   PauseAudioStream
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_DrawBillboardRec’:
raylib/static/_raylib_cffi.c:5611:36: error: incompatible type for argument 5 of ‘DrawBillboardRec’
   DrawBillboardRec(x0, x1, x2, x3, x4, x5);
                                    ^~
In file included from raylib/static/_raylib_cffi.c:570:
raylib/static/../../raylib/raylib.h:1457:107: note: expected ‘Vector2’ {aka ‘struct Vector2’} but argument is of type ‘float’
 RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
                                                                                                   ~~~~~~~~^~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_DrawBillboardRec’:
raylib/static/_raylib_cffi.c:5654:38: error: incompatible type for argument 5 of ‘DrawBillboardRec’
   { DrawBillboardRec(x0, x1, x2, x3, x4, x5); }
                                      ^~
In file included from raylib/static/_raylib_cffi.c:570:
raylib/static/../../raylib/raylib.h:1457:107: note: expected ‘Vector2’ {aka ‘struct Vector2’} but argument is of type ‘float’
 RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
                                                                                                   ~~~~~~~~^~~~
raylib/static/_raylib_cffi.c: At top level:
raylib/static/_raylib_cffi.c:11548:8: error: unknown type name ‘RayHitInfo’
 static RayHitInfo _cffi_d_GetCollisionRayGround(Ray x0, float x1)
        ^~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_GetCollisionRayGround’:
raylib/static/_raylib_cffi.c:11550:10: warning: implicit declaration of function ‘GetCollisionRayGround’; did you mean ‘_cffi_d_GetCollisionRayGround’? [-Wimplicit-function-declaration]
   return GetCollisionRayGround(x0, x1);
          ^~~~~~~~~~~~~~~~~~~~~
          _cffi_d_GetCollisionRayGround
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_GetCollisionRayGround’:
raylib/static/_raylib_cffi.c:11558:3: error: unknown type name ‘RayHitInfo’
   RayHitInfo result;
   ^~~~~~~~~~
raylib/static/_raylib_cffi.c: At top level:
raylib/static/_raylib_cffi.c:11590:8: error: unknown type name ‘RayHitInfo’
 static RayHitInfo _cffi_d_GetCollisionRayMesh(Ray x0, Mesh x1, Matrix x2)
        ^~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_GetCollisionRayMesh’:
raylib/static/_raylib_cffi.c:11592:10: warning: implicit declaration of function ‘GetCollisionRayMesh’; did you mean ‘GetCollisionRec’? [-Wimplicit-function-declaration]
   return GetCollisionRayMesh(x0, x1, x2);
          ^~~~~~~~~~~~~~~~~~~
          GetCollisionRec
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_GetCollisionRayMesh’:
raylib/static/_raylib_cffi.c:11601:3: error: unknown type name ‘RayHitInfo’
   RayHitInfo result;
   ^~~~~~~~~~
raylib/static/_raylib_cffi.c: At top level:
raylib/static/_raylib_cffi.c:11636:8: error: unknown type name ‘RayHitInfo’
 static RayHitInfo _cffi_d_GetCollisionRayModel(Ray x0, Model x1)
        ^~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_GetCollisionRayModel’:
raylib/static/_raylib_cffi.c:11638:10: warning: implicit declaration of function ‘GetCollisionRayModel’; did you mean ‘GetRayCollisionModel’? [-Wimplicit-function-declaration]
   return GetCollisionRayModel(x0, x1);
          ^~~~~~~~~~~~~~~~~~~~
          GetRayCollisionModel
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_GetCollisionRayModel’:
raylib/static/_raylib_cffi.c:11646:3: error: unknown type name ‘RayHitInfo’
   RayHitInfo result;
   ^~~~~~~~~~
raylib/static/_raylib_cffi.c: At top level:
raylib/static/_raylib_cffi.c:11677:8: error: unknown type name ‘RayHitInfo’
 static RayHitInfo _cffi_d_GetCollisionRayTriangle(Ray x0, Vector3 x1, Vector3 x2, Vector3 x3)
        ^~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_GetCollisionRayTriangle’:
raylib/static/_raylib_cffi.c:11679:10: warning: implicit declaration of function ‘GetCollisionRayTriangle’; did you mean ‘GetRayCollisionTriangle’? [-Wimplicit-function-declaration]
   return GetCollisionRayTriangle(x0, x1, x2, x3);
          ^~~~~~~~~~~~~~~~~~~~~~~
          GetRayCollisionTriangle
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_GetCollisionRayTriangle’:
raylib/static/_raylib_cffi.c:11689:3: error: unknown type name ‘RayHitInfo’
   RayHitInfo result;
   ^~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_InitAudioStream’:
raylib/static/_raylib_cffi.c:16075:10: warning: implicit declaration of function ‘InitAudioStream’; did you mean ‘StopAudioStream’? [-Wimplicit-function-declaration]
   return InitAudioStream(x0, x1, x2);
          ^~~~~~~~~~~~~~~
          StopAudioStream
raylib/static/_raylib_cffi.c:16075:10: error: incompatible types when returning type ‘int’ but ‘AudioStream’ {aka ‘struct AudioStream’} was expected
   return InitAudioStream(x0, x1, x2);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_InitAudioStream’:
raylib/static/_raylib_cffi.c:16107:12: error: incompatible types when assigning to type ‘AudioStream’ {aka ‘struct AudioStream’} from type ‘int’
   { result = InitAudioStream(x0, x1, x2); }
            ^
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_IsMusicPlaying’:
raylib/static/_raylib_cffi.c:16952:10: warning: implicit declaration of function ‘IsMusicPlaying’; did you mean ‘IsSoundPlaying’? [-Wimplicit-function-declaration]
   return IsMusicPlaying(x0);
          ^~~~~~~~~~~~~~
          IsSoundPlaying
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_MeshBinormals’:
raylib/static/_raylib_cffi.c:19062:3: warning: implicit declaration of function ‘MeshBinormals’; did you mean ‘GenMeshBinormals’? [-Wimplicit-function-declaration]
   MeshBinormals(x0);
   ^~~~~~~~~~~~~
   GenMeshBinormals
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_MeshBoundingBox’:
raylib/static/_raylib_cffi.c:19098:10: warning: implicit declaration of function ‘MeshBoundingBox’; did you mean ‘GetMeshBoundingBox’? [-Wimplicit-function-declaration]
   return MeshBoundingBox(x0);
          ^~~~~~~~~~~~~~~
          GetMeshBoundingBox
raylib/static/_raylib_cffi.c:19098:10: error: incompatible types when returning type ‘int’ but ‘BoundingBox’ {aka ‘struct BoundingBox’} was expected
   return MeshBoundingBox(x0);
          ^~~~~~~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_MeshBoundingBox’:
raylib/static/_raylib_cffi.c:19113:12: error: incompatible types when assigning to type ‘BoundingBox’ {aka ‘struct BoundingBox’} from type ‘int’
   { result = MeshBoundingBox(x0); }
            ^
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_MeshTangents’:
raylib/static/_raylib_cffi.c:19130:3: warning: implicit declaration of function ‘MeshTangents’; did you mean ‘GenMeshTangents’? [-Wimplicit-function-declaration]
   MeshTangents(x0);
   ^~~~~~~~~~~~
   GenMeshTangents
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_UnloadFileText’:
raylib/static/_raylib_cffi.c:22269:18: warning: pointer targets in passing argument 1 of ‘UnloadFileText’ differ in signedness [-Wpointer-sign]
   UnloadFileText(x0);
                  ^~
In file included from raylib/static/_raylib_cffi.c:570:
raylib/static/../../raylib/raylib.h:1054:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
 RLAPI void UnloadFileText(char *text);                            // Unload file text data allocated by LoadFileText()
            ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_f_UnloadFileText’:
raylib/static/_raylib_cffi.c:22290:20: warning: pointer targets in passing argument 1 of ‘UnloadFileText’ differ in signedness [-Wpointer-sign]
   { UnloadFileText(x0); }
                    ^~
In file included from raylib/static/_raylib_cffi.c:570:
raylib/static/../../raylib/raylib.h:1054:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
 RLAPI void UnloadFileText(char *text);                            // Unload file text data allocated by LoadFileText()
            ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c: At top level:
raylib/static/_raylib_cffi.c:23804:40: error: unknown type name ‘RayHitInfo’
 static void _cffi_checkfld__RayHitInfo(RayHitInfo *p)
                                        ^~~~~~~~~~
raylib/static/_raylib_cffi.c:23813:42: error: unknown type name ‘RayHitInfo’
 struct _cffi_align__RayHitInfo { char x; RayHitInfo y; };
                                          ^~~~~~~~~~
In file included from raylib/static/_raylib_cffi.c:61:
raylib/static/_raylib_cffi.c:25017:21: error: unknown type name ‘RayHitInfo’
   { "hit", offsetof(RayHitInfo, hit),
                     ^~~~~~~~~~
raylib/static/_raylib_cffi.c:25018:21: error: ‘RayHitInfo’ undeclared here (not in a function)
            sizeof(((RayHitInfo *)0)->hit),
                     ^~~~~~~~~~
raylib/static/_raylib_cffi.c:25018:33: error: expected expression before ‘)’ token
            sizeof(((RayHitInfo *)0)->hit),
                                 ^
In file included from raylib/static/_raylib_cffi.c:61:
raylib/static/_raylib_cffi.c:25020:26: error: expected specifier-qualifier-list before ‘RayHitInfo’
   { "distance", offsetof(RayHitInfo, distance),
                          ^~~~~~~~~~
raylib/static/_raylib_cffi.c:25021:38: error: expected expression before ‘)’ token
                 sizeof(((RayHitInfo *)0)->distance),
                                      ^
In file included from raylib/static/_raylib_cffi.c:61:
raylib/static/_raylib_cffi.c:25023:26: error: expected specifier-qualifier-list before ‘RayHitInfo’
   { "position", offsetof(RayHitInfo, position),
                          ^~~~~~~~~~
raylib/static/_raylib_cffi.c:25024:38: error: expected expression before ‘)’ token
                 sizeof(((RayHitInfo *)0)->position),
                                      ^
In file included from raylib/static/_raylib_cffi.c:61:
raylib/static/_raylib_cffi.c:25026:24: error: expected specifier-qualifier-list before ‘RayHitInfo’
   { "normal", offsetof(RayHitInfo, normal),
                        ^~~~~~~~~~
raylib/static/_raylib_cffi.c:25027:36: error: expected expression before ‘)’ token
               sizeof(((RayHitInfo *)0)->normal),
                                    ^
raylib/static/_raylib_cffi.c:25222:5: warning: initialization of ‘unsigned int’ from ‘const struct _cffi_field_s *’ makes integer from pointer without a cast [-Wint-conversion]
     sizeof(RayHitInfo), offsetof(struct _cffi_align__RayHitInfo, y), 100, 4 },
     ^~~~~~
raylib/static/_raylib_cffi.c:25222:5: note: (near initialization for ‘_cffi_struct_unions[18].size’)
raylib/static/_raylib_cffi.c:25222:5: error: initializer element is not constant
raylib/static/_raylib_cffi.c:25222:5: note: (near initialization for ‘_cffi_struct_unions[18].size’)
raylib/static/_raylib_cffi.c:25268:46: error: ‘Gestures’ undeclared here (not in a function); did you mean ‘Gesture’?
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                                              ^~~~~~~~
raylib/static/_raylib_cffi.c:541:7: note: in definition of macro ‘_cffi_prim_int’
     ((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8  : _CFFI_PRIM_UINT8)  :    \
       ^~~~
raylib/static/_raylib_cffi.c:541:13: warning: comparison between pointer and integer
     ((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8  : _CFFI_PRIM_UINT8)  :    \
             ^~
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c:542:13: warning: comparison between pointer and integer
      (size) == 2 ? ((sign) ? _CFFI_PRIM_INT16 : _CFFI_PRIM_UINT16) :    \
             ^~
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c:543:13: warning: comparison between pointer and integer
      (size) == 4 ? ((sign) ? _CFFI_PRIM_INT32 : _CFFI_PRIM_UINT32) :    \
             ^~
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c:544:13: warning: comparison between pointer and integer
      (size) == 8 ? ((sign) ? _CFFI_PRIM_INT64 : _CFFI_PRIM_UINT64) :    \
             ^~
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c:541:5: error: initializer element is not constant
     ((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8  : _CFFI_PRIM_UINT8)  :    \
     ^
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c:541:5: note: (near initialization for ‘_cffi_enums[8].type_prim’)
     ((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8  : _CFFI_PRIM_UINT8)  :    \
     ^
raylib/static/_raylib_cffi.c:25268:24: note: in expansion of macro ‘_cffi_prim_int’
   { "$Gestures", 1327, _cffi_prim_int(sizeof(Gestures), ((Gestures)-1) <= 0),
                        ^~~~~~~~~~~~~~
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_MeshBoundingBox’:
raylib/static/_raylib_cffi.c:19099:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
raylib/static/_raylib_cffi.c: In function ‘_cffi_d_InitAudioStream’:
raylib/static/_raylib_cffi.c:16076:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Traceback (most recent call last):
  File "/usr/lib/python3.7/distutils/unixccompiler.py", line 118, in _compile
    extra_postargs)
  File "/usr/lib/python3.7/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/usr/lib/python3.7/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/usr/lib/python3.7/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
    depends=ext.depends)
  File "/usr/lib/python3.7/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/usr/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "raylib/static/build.py", line 82, in <module>
    build_rpi_nox()
  File "raylib/static/build.py", line 72, in build_rpi_nox
    ffibuilder.compile(verbose=True)
  File "/home/pi/.local/lib/python3.7/site-packages/cffi/api.py", line 727, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/pi/.local/lib/python3.7/site-packages/cffi/recompiler.py", line 1565, in recompile
    compiler_verbose, debug)
  File "/home/pi/.local/lib/python3.7/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/pi/.local/lib/python3.7/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: CompileError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
electronstudio commented 3 years ago

That’s very strange. I would guess it’s some kind of version mismatch. We are expecting Raylib version 3.7 - that’s what you will find in the raylib-c sub folder after checkout. But your raylib.h looks like a different version, possibly the latest version from GitHub. Did you replace Raylib 3.7 with a different version?

electronstudio commented 3 years ago

Maybe you did a git pull on Raylib and updated it to a newer version?

could you try deleting everything and following the instructions again from the beginning?

electronstudio commented 3 years ago

Please reopen if you are still having issue.