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

make static-bindgen failed #275

Closed
Colerar opened this issue Aug 1, 2023 · 8 comments
Closed

make static-bindgen failed #275

Colerar opened this issue Aug 1, 2023 · 8 comments

Comments

@Colerar
Copy link
Contributor

Colerar commented Aug 1, 2023

~/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
@filmil
Copy link
Member

filmil commented Aug 1, 2023

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.

@Colerar
Copy link
Contributor Author

Colerar commented Aug 1, 2023

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

@filmil
Copy link
Member

filmil commented Aug 1, 2023

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.

@filmil
Copy link
Member

filmil commented Aug 1, 2023

Mentioned also in #274

@Colerar
Copy link
Contributor Author

Colerar commented Aug 2, 2023

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.

@filmil
Copy link
Member

filmil commented Aug 2, 2023

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.

@filmil
Copy link
Member

filmil commented Aug 7, 2023

This is fixed, and is now guarded by a presubmit check at #279

@filmil filmil closed this as completed Aug 7, 2023
@filmil
Copy link
Member

filmil commented Aug 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants