janet-lang / jaylib

Janet bindings to Raylib
MIT License
146 stars 37 forks source link

Error building git repository dependency #22

Open jgarte opened 3 years ago

jgarte commented 3 years ago

Hi, this might be a simple error.

Do you happen to know why it fails to build?

Any help or advice is greatly appreciated.

I installed raylib with nix package manager and janet with xbps on void linux.

doas jpm install https://github.com/janet-lang/jaylib.git
From https://github.com/janet-lang/jaylib
 * branch            master     -> FETCH_HEAD
Already up to date.
no dependencies found
compiling src/main.c to build/src___main.o...
Error building git repository dependency: ( "cc"
  "-c"
  "src/main.c"
  "-D_POSIX_C_SOURCE=200809L"
  "-DPLATFORM_DESKTOP"
  "-std=c99"
  "-Wall"
  "-Wextra"
  "-Iraylib/src"
  "-I/usr/include/janet"
  "-I/usr/lib64/janet"
  "-O2"
  "-fPIC"
  "-o"
  "build/src___main.o"): No such file or directory
error: ( "cc"
  "-c"
  "src/main.c"
  "-D_POSIX_C_SOURCE=200809L"
  "-DPLATFORM_DESKTOP"
  "-std=c99"
  "-Wall"
  "-Wextra"
  "-Iraylib/src"
  "-I/usr/include/janet"
  "-I/usr/lib64/janet"
  "-O2"
  "-fPIC"
  "-o"
  "build/src___main.o"): No such file or directory
  in os/execute
  in shell [/bin/jpm] (tailcall) on line 154, column 3
  in do-rule [/bin/jpm] on line 273, column 26
  in do-rule [/bin/jpm] on line 269, column 44
  in do-rule [/bin/jpm] on line 269, column 44
  in <anonymous> [/bin/jpm] on line 864, column 7
  in <anonymous> [/bin/jpm] on line 850, column 5
  in install-git [/bin/jpm] on line 866, column 71
  in install [/bin/jpm] (tailcall) on line 1308, column 20
  in _thunk [/bin/jpm] on line -1, column -1
  in cli-main [boot.janet] on line 3559, column 39
bakpakin commented 3 years ago

Jaylib comes bundled with it's own version of raylib by default. Looks likes perhaps a c compiler is not available to jpm?

bakpakin commented 3 years ago

Also could be a permission error, no idea how your jpm and Janet is set up.

jgarte commented 3 years ago

Jaylib comes bundled with it's own version of raylib by default. Looks likes perhaps a c compiler is not available to jpm?

Yup, I didn't have gcc installed :)

Also could be a permission error, no idea how your jpm and Janet is set up.

I installed janet with xi on void-linux (not from inside a void-packages checkout).

These are the current errors I get after installing glfw-devel and janet-devel:

[jaylib]$ janet
Janet 1.16.1-meson linux/x64 - '(doc)' for help
repl:1:> (use jaylib)
@{_ @{:value <cycle 0>} audio-device-ready? @{:private true} audio-stream-playing? @{:private true} audio-stream-processed? @{:private true} begin-drawing @{:private true} begin-mode-2d @{:private true} begin-mode-3d @{:private true} begin-texture-mode @{:private true} camera-2d @{:private true} camera-3d @{:private true} check-collision-recs @{:private true} clear-background @{:private true} clear-dropped-files @{:private true} clear-window-state @{:private true} close-audio-device @{:private true} close-audio-stream @{:private true} close-window @{:private true} cursor-hidden? @{:private true} disable-cursor @{:private true} draw-circle @{:private true} draw-circle-3d @{:private true} draw-circle-gradient @{:private true} draw-circle-lines @{:private true} draw-circle-sector @{:private true} draw-circle-sector-lines @{:private true} draw-circle-v @{:private true} draw-cube @{:private true} draw-cube-texture @{:private true} draw-cube-v @{:private true} draw-cube-wires @{:private true} ...}
repl:2:> (init-window 100 100 "Test Game")
INFO: Initializing raylib 3.7
WARNING: GLFW: Error: 65542 Description: GLX: GLX extension not found
WARNING: GLFW: Failed to initialize Window
nil

I had also done the following before getting the above error:

git clone https://github.com/janet-lang/jaylib cd jaylib git submodule update --init --recursive doas jpm build doas jpm install