node-raylib
node-raylib copied to clipboard
Can't install on raspberry pi without X11
Following instructions from this.
Board: RPI Zero W OS: Raspbian Buster Lite CMake Version: 3.20.2 Node Version: 10.16.3 NPM Version: 6.9.0
pi@raspberrypi:~/node-raylib $ npm it
> [email protected] postinstall /home/pi/node-raylib
> cmake-js compile
[ '/usr/local/bin/node',
'/home/pi/node-raylib/node_modules/.bin/cmake-js',
'compile' ]
info TOOL Using Unix Makefiles generator.
info CMD BUILD
info RUN cmake --build "/home/pi/node-raylib/build" --config Release
make: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'. Stop.
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/home/pi/node-raylib/build"
info CMD CONFIGURE
info RUN cmake "/home/pi/node-raylib" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/node-raylib/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v10.16.3/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="10.16.3" -DNODE_ARCH="arm"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:24 (find_package):
By not providing "Findraylib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "raylib", but
CMake did not find one.
Could not find a package configuration file provided by "raylib" (requested
version 3.5.0) with any of the following names:
raylibConfig.cmake
raylib-config.cmake
Add the installation prefix of "raylib" to CMAKE_PREFIX_PATH or set
"raylib_DIR" to a directory containing one of the above files. If "raylib"
provides a separate development package or SDK, be sure it has been
installed.
-- Performing Test COMPILER_HAS_THOSE_TOGGLES
-- Performing Test COMPILER_HAS_THOSE_TOGGLES - Success
-- Testing if -Werror=pointer-arith can be used -- compiles
-- Testing if -Werror=implicit-function-declaration can be used -- compiles
-- Testing if -fno-strict-aliasing can be used -- compiles
-- Using raylib's GLFW
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using X11 for window creation
CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.20/Modules/FindX11.cmake:457 (find_package_handle_standard_args)
vendor/raylib/src/external/glfw/CMakeLists.txt:204 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/pi/node-raylib/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/node-raylib/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-05-22T05_58_25_217Z-debug.log
Any ideas what I'm doing wrong? Thanks.
I've found that the PLATFORM
variable is Desktop
for some reason in vendor/raylib/src/CMakeLists.txt
instead of Raspberry Pi
. For now I've manually edited the CMakeLists.txt
to force it to run the code in the Raspberry Pi
elseif block, and it seems to have mostly worked. It passes all tests except for cli 1) should execute on a script
and 2) should display the help
.
Surprised that platform gets messed up. Good find :+1:
There have been some changes in the cmake since 3.5.0, so this is due for an upgrade to raylib 3.7
This could possibly be related to https://github.com/RobLoach/node-raylib/issues/87#issuecomment-849488475.