Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update request: wasm-pack 0.12.1 → 0.13.0 #328228

Closed
1 task done
danilopedraza opened this issue Jul 18, 2024 · 1 comment · Fixed by #338513
Closed
1 task done

Update request: wasm-pack 0.12.1 → 0.13.0 #328228

danilopedraza opened this issue Jul 18, 2024 · 1 comment · Fixed by #338513
Labels
9.needs: package (update) This needs a package to be updated

Comments

@danilopedraza
Copy link
Contributor

danilopedraza commented Jul 18, 2024

  • Package name: wasm-pack
  • Latest released version: 0.13.0
  • Current version on the unstable channel: 0.12.1
  • Current version on the stable/release channel: 0.12.1

Notify maintainers

@dhl


Note for maintainers: Please tag this issue in your PR.


I just tried to make a PR with the change, but I got this error when I tried to build (while compiling libz-ng-sys v1.1.15), and nixpkgs-review rev HEAD used all of my RAM while running (it did not finish). I'm using a x86-64 machine with Debian.

@danilopedraza danilopedraza added the 9.needs: package (update) This needs a package to be updated label Jul 18, 2024
@BaerLKR
Copy link
Contributor

BaerLKR commented Aug 27, 2024

I encountered that error too. After reading this comment I tried this:

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
, cmake
, pkg-config
}:

rustPlatform.buildRustPackage rec {
  pname = "wasm-pack";
  version = "0.13.0";

  src = fetchFromGitHub {
    owner = "rustwasm";
    repo = "wasm-pack";
    rev = "refs/tags/v${version}";
    hash = "sha256-NEujk4ZPQ2xHWBCVjBCD7H6f58P4KrwCNoDHKa0d5JE=";
  };

  cargoHash = "sha256-pFKGQcWW1/GaIIWMyWBzts4w1hMu27hTG/uUMjkfDMo=";

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;

  env = {
    ZSTD_SYS_USE_PKG_CONFIG = true;
    CMAKE = cmake;
  };

  # Most tests rely on external resources and build artifacts.
  # Disabling check here to work with build sandboxing.
  doCheck = false;

  meta = with lib; {
    description = "Utility that builds rust-generated WebAssembly package";
    mainProgram = "wasm-pack";
    homepage = "https://github.com/rustwasm/wasm-pack";
    license = with licenses; [ asl20 /* or */ mit ];
    maintainers = [ maintainers.dhkl ];
  };
}

That resulted in a new error log. I don't know what to do but I thought I'll leave it here in the case that I could be useful to someone else

error: failed to run custom build command for `zstd-sys v2.0.11+zstd.1.5.6`

Caused by:
  process didn't exit successfully: `/build/source/target/release/build/zstd-sys-325d920fbecfc55a/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ZSTD_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=LIBZSTD_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at /build/wasm-pack-0.13.0-vendor.tar.gz/zstd-sys/build.rs:47:10:
  Can't probe for zstd in pkg-config: 
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --static --libs --cflags libzstd

  The system library `libzstd` required by crate `zstd-sys` was not found.
  The file `libzstd.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `libzstd.pc`.

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `libz-ng-sys v1.1.15`

Caused by:
  process didn't exit successfully: `/build/source/target/release/build/libz-ng-sys-250914224e413f59/build-script-build_zng` (exit stat>
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = Some("/nix/store/sa1yjb7xxrzcbd1bysj3r561vidfxxvb-cmake-3.29.6")
  running: cd "/build/source/target/x86_64-unknown-linux-gnu/release/build/libz-ng-sys-0dd18e8ff7b0abbc/out/build" && CMAKE_PREFIX_PATH>

  --- stderr
  thread 'main' panicked at /build/wasm-pack-0.13.0-vendor.tar.gz/cmake/src/lib.rs:1098:5:

  failed to execute command: Permission denied (os error 13)

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.needs: package (update) This needs a package to be updated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants