`make static-bindgen` failed
Colerar opened this issue · 8 comments
~/Developer/rust_icu
❯ make static-bindgen
mkdir -p /tmp/rust_icu-col-target
echo top_dir: /Users/col/Developer/rust_icu
top_dir: /Users/col/Developer/rust_icu
echo pwd: /Users/col/Developer/rust_icu
pwd: /Users/col/Developer/rust_icu
docker run --tty --interactive \
--user=502:20 \
--volume=/Users/col/Developer/rust_icu:/src/rust_icu \
--volume=/Users/col/.cargo:/usr/local/cargo \
--env="RUST_ICU_MAJOR_VERSION_NUMBER=63" \
--entrypoint="/bin/bash" \
filipfilmar/rust_icu_testenv-63:1.73.0 \
"-c" "env OUTPUT_DIR=./rust_icu/rust_icu_sys/bindgen \
./rust_icu/rust_icu_sys/bindgen/run_bindgen.sh"
The generator requires bindgen to be in PATH; see README.md
make: *** [static-bindgen-63.stamp] Error 1
The immediate workaround for you is to have bindgen
in your $PATH
as the error message indicates.
You can do that right now without any input from this end.
A more fundamental issue is that we rely on the presence of bindgen
on the system. This should probably be fixed to remove dev annoyance.
The immediate workaround for you is to have
bindgen
in your$PATH
as the error message indicates.
Yes, I already have bindgen
in my $PATH
, and the error still occurs:
❯ where bindgen
/Users/col/.cargo/bin/bindgen
❯ bindgen --version
bindgen 0.59.2
Is this a Mac-specific thing perhaps?
I don't have a Mac so don't know why the script would not honor your $PATH
. I would think that it should.
A more fundamental issue is that we rely on the presence of
bindgen
on the system. This should probably be fixed to remove dev annoyance.
may be related: rust-lang/cargo#9096
currently it's a unstable feature for cargo.
OK, so this should work in a container (and does on my end!).
Perhaps it could be fixed by referring to the binary's absolute path since the buildenv containers are known and fixed.
To wit, the issue was that make static-bindgen
mounted cargo's bin
directory from the host into the container, and there is a library version mismatch between most hosts and the rust:1.70
container, where the container's required glibc is way newer than that of the host.
This is now fixed, by not mounting the host's cargo bin into the containers when make static-bindgen
runs.