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

import issue with crate::fs on i386/debian... #706

Closed
mikeggh opened this issue Jun 26, 2023 · 3 comments · Fixed by #712
Closed

import issue with crate::fs on i386/debian... #706

mikeggh opened this issue Jun 26, 2023 · 3 comments · Fixed by #712

Comments

@mikeggh
Copy link

mikeggh commented Jun 26, 2023

im using a docker image to compile Blightmud on i386/debian for iSH (IOS)...

10040 docker pull i386/debian
10042 d start -it i386/debian /bin/bash

installed rustup using script (os ver was too low).. and downloaded/customized toolchain to i686 unknown linux gnu
git clone --depth 1 https://github.com/Blightmud/Blightmud

"rust build -r" fails at rustix with:
error[E0432]: unresolved import crate::fs
--> /root/.cargo/registry/src/index.crates.io-1cd66030c949c28d/rustix-0.37.19/src/backend/linux_raw/param/auxv.rs:14:12
|
14 | use crate::fs::{Mode, OFlags};
| ^^
| |
| unresolved import
| help: a similar path exists: std::fs

error[E0433]: failed to resolve: unresolved import
--> /root/.cargo/registry/src/index.crates.io-1cd66030c949c28d/rustix-0.37.19/src/backend/linux_raw/param/auxv.rs:140:23
|
140 | let file = crate::fs::openat(
| ^^
| |
| unresolved import
| help: a similar path exists: std::fs

error[E0433]: failed to resolve: unresolved import
--> /root/.cargo/registry/src/index.crates.io-1cd66030c949c28d/rustix-0.37.19/src/backend/linux_raw/param/auxv.rs:141:16
|
141 | crate::fs::cwd(),
| ^^
| |
| unresolved import
| help: a similar path exists: std::fs

I have tried to play around with the import line, but std::fs wasnt presenting Oflags.. etc...

Are there any ways to solve this?

@mikeggh
Copy link
Author

mikeggh commented Jun 28, 2023

I have made a dockerfile to reproduce the issue:
FROM i386/debian:latest as builder
ARG http_proxy
ARG https_proxy
RUN apt-get update
RUN apt-get -y install build-essential libclang-dev pkg-config libssl-dev libasound2-dev git

RUN git clone --depth 1 https://github.com/Blightmud/Blightmud

RUN apt-get -y install wget
RUN wget https://static.rust-lang.org/rustup/dist/i686-unknown-linux-gnu/rustup-init
RUN chmod +x rustup-init
RUN ./rustup-init -y --default-host i686-unknown-linux-gnu

WORKDIR ./Blightmud

RUN /root/.cargo/bin/cargo build -r

CMD ["./target/release/blightmud"]

sunfishcode added a commit that referenced this issue Jun 29, 2023
When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
sunfishcode added a commit that referenced this issue Jun 29, 2023
When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
sunfishcode added a commit that referenced this issue Jun 29, 2023
When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
@sunfishcode
Copy link
Member

Thanks for the report! I've now submittted #712 with a fix, which I'll backport to 0.37.

sunfishcode added a commit that referenced this issue Jun 29, 2023
When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
sunfishcode added a commit that referenced this issue Jun 29, 2023
When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
sunfishcode added a commit that referenced this issue Jun 29, 2023
… (#713)

When building with --no-default-features, the default use-libc-auxv
feature is disabled, and rustix falls back to reading the auxv variables
using /proc/self/auxv. This requires some filesystem functions to do,
so ensure that the filesystem code is enabled in configurations that
need that.

Fixes #706.
@mikeggh
Copy link
Author

mikeggh commented Jun 29, 2023

Thanks so much for the help! have a great day! appreciate your time and effort =]

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

Successfully merging a pull request may close this issue.

2 participants