-
Notifications
You must be signed in to change notification settings - Fork 372
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
bindgen seems to don't work inside cross containers #257
Comments
@siscia this sounds a bit like a problem with your PATH variable. I'm guessing you might be using two different shells when using the container. I think by default docker uses the Dash shell, and you (or Maybe in both cases, try adding the following to the procedure, and see if your outputs are different? # print the current shell, one of these should work
echo $0
echo $SHELL
# print the current path variable
echo $PATH |
Sorry, I wrote very badly. So, if I execute
The build process start but it broke as soon as it need the libclang libraries. While if I run the same container, the I git clone the repo, and finally I use the standard I am not quite sure how to print the SHELL and the PATH variable while executing cross. I agree that it may be the problem though... |
Sorry, it seems that everything is just fixed using a different docker image. |
Hi @siscia Just for reference: which Docker image were you using that worked? If you remember, I know it was some times ago 😃 |
Sorry guys, really no idea at all... :( |
For future reference: we created a new
|
Very late to the party, but: some images (in my case, In these cases, it seems the latest version of Clang available on Ubuntu's official repositories is still 3.8, which is incompatible with current versions of FROM rustembedded/cross:arm-unknown-linux-gnueabi-0.2.1
RUN dpkg --add-architecture arm && \
apt-get update && \
apt-get install -y apt-transport-https wget && \
(wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -) && \
printf "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main\ndeb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main" > /etc/apt/sources.list.d/backports.list && \
apt-get update && \
apt-get install -y llvm-3.9-dev libclang-3.9-dev clang-3.9 && \
apt-get purge -y apt-transport-https wget |
To get bindgen working, all I did was use this docker image:
Just libclang-3.9-dev is enough. |
This is now extensively documented on the wiki. |
Hi,
I am trying to use cross to build a project which requires bindgen.
If I build the process directly from cross, bindgen is not able to find the needed library (namely libclang.so), however, if I start the same container and clone the repo inside, everything works just fine.
What can be the causes?
Open similar issue on bindgen: rust-lang/rust-bindgen#1411 (comment)
The text was updated successfully, but these errors were encountered: