handlebars_misc_helpers
handlebars_misc_helpers copied to clipboard
build error in github CI build for x86_64-unknown-linux-musl
Hello,I build my project with use handlebars_misc_helpers
for x86_64-unknown-linux-musl
, got error
The following warnings were emitted during compilation:
warning: [email protected]: jsonnet/core/desugarer.cpp:17:10: fatal error: 'cassert' file not found
warning: [email protected]: 17 | #include <cassert>
warning: [email protected]: | ^~~~~~~~~
warning: [email protected]: 1 error generated.
error: failed to run custom build command for `jsonnet-sys v0.17.0`
Caused by:
process didn't exit successfully: `/build/target/release/build/jsonnet-sys-555cb151ec06b241/build-script-build` (exit status: 1)
--- stdout
embedding: "jsonnet/stdlib/std.jsonnet" -> "/build/target/x86_64-unknown-linux-musl/release/build/jsonnet-sys-1b73a5d3b9653a8f/out/include/std.jsonnet.h"
TARGET = Some("x86_64-unknown-linux-musl")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-musl")
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-musl
CXX_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_musl
CXX_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = Some("clang++")
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-musl
CXXFLAGS_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_musl
CXXFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-musl
CXX_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_musl
CXX_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = Some("clang++")
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-musl
CXXFLAGS_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_musl
CXXFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-musl" "-I" "/build/target/x86_64-unknown-linux-musl/release/build/jsonnet-sys-1b73a5d3b9653a8f/out/include" "-I" "jsonnet/include" "-I" "jsonnet/third_party/md5" "-I" "jsonnet/third_party/json" "-Wall" "-Wextra" "-o" "/build/target/x86_64-unknown-linux-musl/release/build/jsonnet-sys-1b73a5d3b9653a8f/out/jsonnet/core/desugarer.o" "-c" "jsonnet/core/desugarer.cpp"
cargo:warning=jsonnet/core/desugarer.cpp:17:10: fatal error: 'cassert' file not found
cargo:warning= 17 | #include <cassert>
cargo:warning= | ^~~~~~~~~
cargo:warning=1 error generated.
exit status: 1
--- stderr
fatal: not a git repository (or any of the parent directories): .git
error occurred: Command "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-musl" "-I" "/build/target/x86_64-unknown-linux-musl/release/build/jsonnet-sys-1b73a5d3b9653a8f/out/include" "-I" "jsonnet/include" "-I" "jsonnet/third_party/md5" "-I" "jsonnet/third_party/json" "-Wall" "-Wextra" "-o" "/build/target/x86_64-unknown-linux-musl/release/build/jsonnet-sys-1b73a5d3b9653a8f/out/jsonnet/core/desugarer.o" "-c" "jsonnet/core/desugarer.cpp" with args "clang++" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
Internal Error: Build failed with exit code 101
at ChildProcess.<anonymous> (file:///build/node_modules/.pnpm/registry.npmjs.org+@[email protected]/node_modules/@napi-rs/cli/dist/api/build.js:110:28)
at Object.onceWrapper (node:events:632:26)
at ChildProcess.emit (node:events:529:35)
at ChildProcess._handle.onexit (node:internal/child_process:[292](https://github.com/NervJS/taro/actions/runs/7408369696/job/20156430338#step:9:293):12)
/build/crates/native_binding:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @tarojs/[email protected] build: `napi build --platform --release --no-js --dts binding.d.ts`
Exit status 1
ELIFECYCLE Command failed with exit code 1.
It looks like the compilation error of the jsonnet-sys
package on Musl
caused it to fail.
Some issue related
- https://github.com/napi-rs/napi-rs/issues/1890
- https://github.com/google/jsonnet/issues/908
@davidB Hello,how about this question? If this is a problem, is there a fix plan?
no fix plan, As you mention it's an issue with the underking jsonnet (a go or C lib), a workaround is to disable jsonnet features on this target platform.