skdb icon indicating copy to clipboard operation
skdb copied to clipboard

sh: skargo: command not found

Open niladrix719 opened this issue 11 months ago • 6 comments

when I try to run npm install in main dir

Logs:

❯ npm i npm error code 127 npm error path /Users/niladrisekharadhikary/Documents/skip/skipruntime-ts/addon npm error command failed npm error command sh -c host=$(node -e "const process = require('process');console.log(process.arch + '-' + process.platform)") && mkdir -p dist && skargo build -r --lib --manifest-path=../native/Skargo.toml --out-dir=./dist && mv dist/libskip-runtime-ts.so dist/libskip-runtime-ts-$host.so npm error sh: skargo: command not found npm error A complete log of this run can be found in: /Users/niladrisekharadhikary/.npm/_logs/2025-01-16T10_39_55_315Z-debug-0.log

OS: macos

niladrix719 avatar Jan 16 '25 10:01 niladrix719

Building the packages from source requires the skiplang tool chain (which you can build/install by invoking make && make install in skiplang/compiler, provided you have clang version 15 available). If you simply want to play with skip (and not deal with the build), you can use the available npmjs packages.

beauby avatar Jan 16 '25 10:01 beauby

Also... I needed to run:

git submodule init
git submodule update

Before I could make the compiler.

jimjeffers avatar Jan 17 '25 18:01 jimjeffers

Also... I needed to run:

git submodule init
git submodule update

Before I could make the compiler.

That's correct, submodules need to be initialized before building the skiplang tool chain (so that libbacktrace is available for the runtime).

Note that you can also use one of the provided docker images with a pre-installed skiplang tool chain.

I'll keep this issue open as a reminder to outline the build process in the readme.

beauby avatar Jan 19 '25 12:01 beauby

Which docker images are you referring to? I was using the one in project root but the build failed without installing the submodules locally first. Is there are more complete pre-compiled image I can use just to run the skip example projects?

jimjeffers avatar Jan 19 '25 14:01 jimjeffers

There is https://hub.docker.com/r/skiplabs/skdb-base, which is what the repo's CI jobs pull. To build that image, the submodules, specific version of clang, etc. are needed, but just pulling it without any of that should work.

jberdine avatar Jan 20 '25 11:01 jberdine

That's correct, submodules need to be initialized before building the skiplang tool chain (so that libbacktrace is available for the runtime).

I guess we should suggest people to clone using git clone --recurse-submodules https://github.com/SkipLabs/skip.git.

jberdine avatar Jan 20 '25 12:01 jberdine