Open mattsains opened 5 years ago
I discovered that this error is coming from running cmake on raylib, here: https://github.com/raysan5/raylib/blob/4d8b9e595a62e094b840a15efc1d7710128aa1f4/src/external/glfw/CMakeLists.txt#L159
I think this implies that the cmake script in this package isn't finding my raylib install here: https://github.com/RobLoach/node-raylib/blob/master/CMakeLists.txt#L12
I don't know how this is looking for the library, since it's definitely installed - I can run ld -lraylib
and it returns "ld: warning: cannot find entry symbol _start; defaulting to 00010034"
I read https://github.com/raysan5/raylib/issues/813 and it looks like I might be missing a cmake library that was supposed to be copied to my system during make install
of raylib.
I'm not sure where this is supposed to be located though.
I think it's possible that the instructions I followed to install cmake on my Raspberry Pi might be incomplete, but I'm not sure how https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi#user-content-compiling-raylib-source-code
One thing that isn't listed there that I did was running make install
afterward.
Thanks for checking it out... Interesting. I'm not quite sure how to switch how raylib would compile.
https://www.npmjs.com/package/cmake-js
There's some opts in there we could inject.
I have been trying to accomplish this myself for the past few days. @RobLoach is there some way I could edit the repo's root CmakeList.txt
? I have successfully compiled on my machine with: make PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_21
.
For sure! Would love to make the build a bit more dynamic in it's compilation.
I meant to ask you how to do this. I don't know much about cmake. I just know that the default raylib repo compiles without any error with those args given to make. Not sure how to adjust that for cmake in this repo.
I'm sure Node.js is available for raspberry pi, but I'm unsure how exactly. It should be something in the "cmake-js"
options...
{
"name": "ta-taram-taram",
"description": "pa-param-pam-pam",
"version": "1.0.0",
"main": "app.js",
"cmake-js": {
"runtime": "node",
"runtimeVersion": "0.12.0",
"arch": "arm"
}
}
cmake-js compile --CDPLATFORM="PLATFORM_RPI"
Something like that?
For systems that don't have an x11 installation, the raylib library supports the "OpenGL ES 2.0 in native mode":
make PLATFORM=PLATFORM_RPI && make install
However, running
npm install raylib
doesn't work if you don't have an x11 install:It would be nice if the cmake file could use the lack of x11 to infer that raylib needs to be built without x11 support.
As an alternative, I have already installed the raylib binaries, so maybe the node library could look for the raylib library (eg., by calling
ld -lraylib
) and just use the existing on present in the system.