raylibr icon indicating copy to clipboard operation
raylibr copied to clipboard

Can't install on Linux

Open ramiromagno opened this issue 1 year ago • 7 comments

> remotes::install_github("jeroenjanssens/raylibr")
Downloading GitHub repo jeroenjanssens/raylibr@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpvHoidc/remotesb5a67e2f297b/jeroenjanssens-raylibr-9a2f3af/DESCRIPTION’ ...
─  preparing ‘raylibr’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts (357ms)
─  checking for empty or unneeded directories
─  building ‘raylibr_4.0.0.9001.tar.gz’
   
Installing package into ‘/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package ‘raylibr’ ...
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c all.cpp -o all.o
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c rcolors.cpp -o rcolors.o
(cd ../inst; tar -xf raylib-4.0.0-modified.tar.gz)
(cd ../inst/raylib-4.0.0-modified/src; make PLATFORM=PLATFORM_DESKTOP)
make[1]: Entering directory '/tmp/RtmpOdlbGB/R.INSTALLb6c15a27094/raylibr/inst/raylib-4.0.0-modified/src'
gcc -c rcore.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
rcore.c:114:10: fatal error: R_ext/Error.h: No such file or directory
  114 | #include "R_ext/Error.h" // For Rf_error() which replaces abort()
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:553: rcore.o] Error 1
make[1]: Leaving directory '/tmp/RtmpOdlbGB/R.INSTALLb6c15a27094/raylibr/inst/raylib-4.0.0-modified/src'
make: *** [Makevars:17: raylib] Error 2
ERROR: compilation failed for package ‘raylibr’
* removing ‘/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/raylibr’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpvHoidc/fileb5a620d20a01/raylibr_4.0.0.9001.tar.gz’ had non-zero exit status

ramiromagno avatar Dec 24 '22 00:12 ramiromagno

Hi @ramiromagno, thanks for reporting this. Could you provide a bit more information about your system, linux distro, R version, and R package versions? Thanks.

jeroenjanssens avatar Dec 24 '22 10:12 jeroenjanssens

Hi Jeroen,

Great Lego table , btw!

Here it is my session info:

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

Matrix products: default
BLAS:   /usr/lib/libopenblasp-r0.3.21.so
LAPACK: /usr/lib/liblapack.so.3.10.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_DK.utf8        
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1   

I do have a Error.h file in my system: /usr/include/R/R_ext/Error.h. I am not sure why rcore.c from the source of raylib uses

 #include "R_ext/Error.h"

instead of

#include <R/R_ext/Error.h>

which I think would work.

ramiromagno avatar Dec 24 '22 12:12 ramiromagno

Thanks for the additional information, @ramiromagno. I cannot easily verify this. Have you had any luck in the mean time?

jeroenjanssens avatar Mar 21 '23 12:03 jeroenjanssens

Thanks for coming back on this. Unfortunately not...

Installation attempt

remotes::install_github("jeroenjanssens/raylibr")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo jeroenjanssens/raylibr@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpBcx5Lk/remotes1ba8dae19ff09/jeroenjanssens-raylibr-9a2f3af/DESCRIPTION’ ...
─  preparing ‘raylibr’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘raylibr_4.0.0.9001.tar.gz’
   
Installing package into ‘/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package ‘raylibr’ ...
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c all.cpp -o all.o
g++ -std=gnu++14 -I"/usr/include/R/" -DNDEBUG -I../inst/include -I'/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c rcolors.cpp -o rcolors.o
(cd ../inst; tar -xf raylib-4.0.0-modified.tar.gz)
(cd ../inst/raylib-4.0.0-modified/src; make PLATFORM=PLATFORM_DESKTOP)
make[1]: Entering directory '/tmp/RtmpoHGdbN/R.INSTALL1ba9a73ffdd33d/raylibr/inst/raylib-4.0.0-modified/src'
gcc -c rcore.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
gcc -c rshapes.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
gcc -c rtextures.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
gcc -c rtext.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
gcc -c utils.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP
gcc  -c rglfw.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
gcc -c rmodels.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -fPIC -s -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/lib64/R/include -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33
rcore.c:114:10: fatal error: R_ext/Error.h: No such file or directory
  114 | #include "R_ext/Error.h" // For Rf_error() which replaces abort()
      |          ^~~~~~~~~~~~~~~
compilation terminated.
utils.c:32:10: fatal error: R_ext/Print.h: No such file or directory
   32 | #include "R_ext/Print.h" // For replacing vprintf() with Rvprintf()
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:553: rcore.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:573: utils.o] Error 1
In file included from rmodels.c:64:
external/tinyobj_loader_c.h:27:10: fatal error: R_ext/Print.h: No such file or directory
   27 | #include "R_ext/Print.h" // For Changing fprintf(stderr) to REprintf()
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:577: rmodels.o] Error 1
In file included from rtext.c:71:
external/stb_truetype.h:4962:15: warning: ‘stbtt_CompareUTF8toUTF16_bigendian’ defined but not used [-Wunused-function]
 4962 | STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4957:15: warning: ‘stbtt_FindMatchingFont’ defined but not used [-Wunused-function]
 4957 | STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags)
      |               ^~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4947:15: warning: ‘stbtt_GetNumberOfFonts’ defined but not used [-Wunused-function]
 4947 | STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data)
      |               ^~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4935:15: warning: ‘stbtt_BakeFontBitmap’ defined but not used [-Wunused-function]
 4935 | STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,
      |               ^~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4822:23: warning: ‘stbtt_GetFontNameString’ defined but not used [-Wunused-function]
 4822 | STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID)
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4765:16: warning: ‘stbtt_FreeSDF’ defined but not used [-Wunused-function]
 4765 | STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)
      |                ^~~~~~~~~~~~~
external/stb_truetype.h:4363:16: warning: ‘stbtt_GetPackedQuad’ defined but not used [-Wunused-function]
 4363 | STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer)
      |                ^~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4350:16: warning: ‘stbtt_GetScaledFontVMetrics’ defined but not used [-Wunused-function]
 4350 | STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4338:15: warning: ‘stbtt_PackFontRange’ defined but not used [-Wunused-function]
 4338 | STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size,
      |               ^~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:4005:16: warning: ‘stbtt_PackSetSkipMissingCodepoints’ defined but not used [-Wunused-function]
 4005 | STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3995:16: warning: ‘stbtt_PackSetOversampling’ defined but not used [-Wunused-function]
 3995 | STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3989:16: warning: ‘stbtt_PackEnd’ defined but not used [-Wunused-function]
 3989 | STBTT_DEF void stbtt_PackEnd  (stbtt_pack_context *spc)
      |                ^~~~~~~~~~~~~
external/stb_truetype.h:3957:15: warning: ‘stbtt_PackBegin’ defined but not used [-Wunused-function]
 3957 | STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int pw, int ph, int stride_in_bytes, int padding, void *alloc_context)
      |               ^~~~~~~~~~~~~~~
external/stb_truetype.h:3859:16: warning: ‘stbtt_GetBakedQuad’ defined but not used [-Wunused-function]
 3859 | STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule)
      |                ^~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3802:16: warning: ‘stbtt_MakeCodepointBitmap’ defined but not used [-Wunused-function]
 3802 | STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3787:16: warning: ‘stbtt_MakeCodepointBitmapSubpixelPrefilter’ defined but not used [-Wunused-function]
 3787 | STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3753:26: warning: ‘stbtt_GetGlyphBitmap’ defined but not used [-Wunused-function]
 3753 | STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff)
      |                          ^~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:3708:16: warning: ‘stbtt_FreeBitmap’ defined but not used [-Wunused-function]
 3708 | STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata)
      |                ^~~~~~~~~~~~~~~~
external/stb_truetype.h:2749:16: warning: ‘stbtt_GetCodepointBitmapBox’ defined but not used [-Wunused-function]
 2749 | STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2711:15: warning: ‘stbtt_GetCodepointSVG’ defined but not used [-Wunused-function]
 2711 | STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg)
      |               ^~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2672:16: warning: ‘stbtt_FreeShape’ defined but not used [-Wunused-function]
 2672 | STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
      |                ^~~~~~~~~~~~~~~
external/stb_truetype.h:2652:16: warning: ‘stbtt_GetFontBoundingBox’ defined but not used [-Wunused-function]
 2652 | STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2641:16: warning: ‘stbtt_GetFontVMetricsOS2’ defined but not used [-Wunused-function]
 2641 | STBTT_DEF int  stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2622:16: warning: ‘stbtt_GetCodepointKernAdvance’ defined but not used [-Wunused-function]
 2622 | STBTT_DEF int  stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2332:15: warning: ‘stbtt_GetKerningTable’ defined but not used [-Wunused-function]
 2332 | STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length)
      |               ^~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:2317:16: warning: ‘stbtt_GetKerningTableLength’ defined but not used [-Wunused-function]
 2317 | STBTT_DEF int  stbtt_GetKerningTableLength(const stbtt_fontinfo *info)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:1646:15: warning: ‘stbtt_IsGlyphEmpty’ defined but not used [-Wunused-function]
 1646 | STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index)
      |               ^~~~~~~~~~~~~~~~~~
external/stb_truetype.h:1641:15: warning: ‘stbtt_GetCodepointBox’ defined but not used [-Wunused-function]
 1641 | STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1)
      |               ^~~~~~~~~~~~~~~~~~~~~
external/stb_truetype.h:1589:15: warning: ‘stbtt_GetCodepointShape’ defined but not used [-Wunused-function]
 1589 | STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices)
      |               ^~~~~~~~~~~~~~~~~~~~~~~
In file included from rglfw.c:97:
external/glfw/src/posix_time.c:30: warning: "_POSIX_C_SOURCE" redefined
   30 | #define _POSIX_C_SOURCE 199309L
      | 
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/include/stdint.h:9,
                 from external/glfw/src/../include/GLFW/glfw3.h:108,
                 from external/glfw/src/internal.h:49,
                 from external/glfw/src/context.c:30,
                 from rglfw.c:61:
/usr/include/features.h:291: note: this is the location of the previous definition
  291 | # define _POSIX_C_SOURCE        200809L
      | 
make[1]: Leaving directory '/tmp/RtmpoHGdbN/R.INSTALL1ba9a73ffdd33d/raylibr/inst/raylib-4.0.0-modified/src'
make: *** [Makevars:17: raylib] Error 2
make: *** Waiting for unfinished jobs....
ERROR: compilation failed for package ‘raylibr’
* removing ‘/home/rmagno/R/x86_64-pc-linux-gnu-library/4.2/raylibr’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpBcx5Lk/file1ba8da3efdf63c/raylibr_4.0.0.9001.tar.gz’ had non-zero exit status

Session info

R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.11.0
LAPACK: /usr/lib/liblapack.so.3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] processx_3.8.0    compiler_4.2.2    R6_2.5.1          rprojroot_2.0.3   cli_3.6.0         prettyunits_1.1.1
 [7] tools_4.2.2       withr_2.5.0       rstudioapi_0.14   curl_5.0.0        crayon_1.5.2      remotes_2.4.2    
[13] desc_1.4.2        callr_3.7.3       ps_1.7.2          pkgbuild_1.4.0   

ramiromagno avatar Mar 21 '23 12:03 ramiromagno

I am on Arch Linux too. The problem with compilation is the "R_HOME" variable in the modified raylib's Makefile which does not work for default Arch, since in our distro the includes don't live in R_HOME but under /usr/include/R.

To compile the package, clone the repo, unpack the inst/raylib-4.0.0-modified.tar.gz, and change the following line in inst/raylib-4.0.0-modified/src/Makefile : INCLUDE_PATHS = -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I$(R_HOME)/include to: INCLUDE_PATHS = -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -I/usr/include/R Then you can issue make in this directory, followed by a R CMD INSTALL raylibr from the dir where you cloned the package.

Another workaround could probably be to symlink the actual R includes (/usr/include/R/) from /usr/lib64/R, but I did not test it as I don't want to mess up the R installation.

There are for sure ways to make the Makefile distro-independent, but at the moment I don't know...

deluciaatgfz avatar Jun 02 '23 11:06 deluciaatgfz

Hello, the same problem occured here (Linux Xubuntu, lattest R to this day -- 2024-02-17). I downloaded this raylibr to a zip file, unzipped it, then I unzipped inst/raylib-4...tar.gz, in Makefile there, I added -I/usr/share/R/include (may be different in your installation) to that file (among flags, line number 379). I re-zipped that raylib-4[...].tar.gz file, then I re-zipped this raylibr folder into raylibr-main.tar.gz. And then I went to R to install it (locally in my case) with install.packages("raylibr-main.tar.gz",repo=NULL). These are the screenshots of the final test.

alesovi1 alesovi2 alesovi3 alesovi4 alesovi5 alesovi6 alesovi7

I believe this wrap should be (and hope it will be one day) included in the CRAN repository. I haven't found it for the first time and I believed there is not wrap of raylib in R at all.

Cheers! Pavel

malipivo avatar Feb 17 '24 07:02 malipivo

This was working for me too. To my ~/.bashrc file, I added: export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/share/R/include

malipivo avatar Feb 17 '24 07:02 malipivo