.pablowww
.pablowww•16mo ago

I want to contribute to deno without disturbing my libs in linux . Is there a way?

Noob alert I have been trying to contribute to deno . So i followed these instructions https://deno.land/manual@v1.36.4/references/contributing/building_from_source and dowloaded the git repo Now , i don't wanna install dependency globally on my system . So i ended up using dev containers but when i try to build it , it gives the following error:
running: cd "/workspaces/deno/target/debug/build/libz-ng-sys-8b30a51ed8da1c7e/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libz-ng-sys-1.1.12/src/zlib-ng" "-DBUILD_SHARED_LIBS=OFF" "-DZLIB_COMPAT=OFF" "-DZLIB_ENABLE_TESTS=OFF" "-DWITH_GZFILEOP=ON" "-DCMAKE_INSTALL_PREFIX=/workspaces/deno/target/debug/build/libz-ng-sys-8b30a51ed8da1c7e/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"

--- stderr
thread 'main' panicked at '
failed to execute command: No such file or directory (os error 2)
is `cmake` not installed?

build script failed, must exit now', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
running: cd "/workspaces/deno/target/debug/build/libz-ng-sys-8b30a51ed8da1c7e/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libz-ng-sys-1.1.12/src/zlib-ng" "-DBUILD_SHARED_LIBS=OFF" "-DZLIB_COMPAT=OFF" "-DZLIB_ENABLE_TESTS=OFF" "-DWITH_GZFILEOP=ON" "-DCMAKE_INSTALL_PREFIX=/workspaces/deno/target/debug/build/libz-ng-sys-8b30a51ed8da1c7e/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"

--- stderr
thread 'main' panicked at '
failed to execute command: No such file or directory (os error 2)
is `cmake` not installed?

build script failed, must exit now', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
TLDR : I tried dev container but it doesn't have cmake and other libs , how do i work with containers while not disturbing my system defaults . I am using fedora 38
Deno
Building from Source | Manual | Deno
Below are instructions on how to build Deno from source. If you just want to use Deno you can download a prebuilt executable (more information in the [Getting Started](../../getting_started/install
7 Replies
Deno AI Helper
Deno AI Helper•16mo ago
It seems like you're trying to build Deno from source in a development container, but you're encountering an error because cmake and possibly other dependencies are not installed in the container. The error message suggests that cmake is not installed, which is a required dependency for building Deno from source. To resolve this issue, you need to install the necessary dependencies inside your development container. According to the documentation, the required dependencies for Linux are clang-16, lld-16, cmake, and libglib2.0-dev. You can install these dependencies in your container by running the following command:
apt install --install-recommends -y clang-16 lld-16 cmake libglib2.0-dev
apt install --install-recommends -y clang-16 lld-16 cmake libglib2.0-dev
Please note that you might need to adjust the command based on the Linux distribution used in your container. The command above is for Debian-based distributions. For Fedora, you would use the dnf package manager instead of apt. After installing the dependencies, you should be able to build Deno from source in your container without affecting your host system's libraries. If you continue to encounter issues, please let me know! 🦕
.pablowww
.pablowwwOP•16mo ago
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
MrKleeblatt
MrKleeblatt•16mo ago
Apt needs to be run as root (with sudo in front of the command) if that's the problem
jeff.hykin
jeff.hykin•16mo ago
do you have a repo/code you're using for the container? Sadly building/developing in a container isn't the easiest thing (in general not just deno) I'd highly recommend getting familiar with the process, like being able to start an Ubuntu container, install cmake, curl, gcc and other basics in the container, and once you're comfortable with that come back here and contribute. It's unfortunate, and people are working on making it easier, but currently that's the kind of knowledge/experience required to do it.
.pablowww
.pablowwwOP•16mo ago
okk so i got it working now problem was the apt repos didn't have these packages so i had to add those repolist of these packages to the container and install them
mmastrac
mmastrac•16mo ago
I believe we just had a PR to update the devcontainer with the new deps
.pablowww
.pablowwwOP•16mo ago
That's nice , one less thing to figure out 😂