-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
I'm trying to build catfs on raspberry pi 2 (arm 32bits) and I've got the following errors:
error[E0308]: mismatched types
--> src/catfs/mod.rs:195:21
|
195 | st.f_blocks,
| ^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
195 | st.f_blocks.into(),
| ^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/mod.rs:196:21
|
196 | st.f_bfree,
| ^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
196 | st.f_bfree.into(),
| ^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/mod.rs:197:21
|
197 | st.f_bavail,
| ^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
197 | st.f_bavail.into(),
| ^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/mod.rs:198:21
|
198 | st.f_files,
| ^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
198 | st.f_files.into(),
| ^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/mod.rs:199:21
|
199 | st.f_ffree,
| ^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
199 | st.f_ffree.into(),
| ^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:95:28
|
95 | libc::seekdir(dir, loc);
| ^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:137:16
|
137 | return self.en.d_ino;
| ^^^^^^^^^^^^^ expected u64, found u32
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:140:16
|
140 | return self.en.d_off;
| ^^^^^^^^^^^^^ expected i64, found i32
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:353:21
|
353 | tv_sec: atime.sec,
| ^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:354:22
|
354 | tv_nsec: atime.nsec as i64,
| ^^^^^^^^^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:357:21
|
357 | tv_sec: mtime.sec,
| ^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:358:22
|
358 | tv_nsec: mtime.nsec as i64,
| ^^^^^^^^^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:446:53
|
446 | let res = unsafe { libc::ftruncate(self.fd, size as i64) };
| ^^^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:455:59
|
455 | let res = unsafe { libc::posix_fallocate(self.fd, offset as i64, len as i64) };
| ^^^^^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:455:74
|
455 | let res = unsafe { libc::posix_fallocate(self.fd, offset as i64, len as i64) };
| ^^^^^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:489:76
|
489 | unsafe { libc::pread(self.fd, as_mut_void_ptr(buf), buf.len(), offset) };
| ^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/rlibc.rs:498:82
|
498 | let nbytes = unsafe { libc::pwrite(self.fd, as_void_ptr(buf), buf.len(), offset) };
| ^^^^^^ expected i32, found i64
error[E0308]: mismatched types
--> src/catfs/inode.rs:112:18
|
112 | ino: st.st_ino,
| ^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
112 | ino: st.st_ino.into(),
| ^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/inode.rs:116:22
|
116 | sec: st.st_atime,
| ^^^^^^^^^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
116 | sec: st.st_atime.into(),
| ^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/inode.rs:120:22
|
120 | sec: st.st_mtime,
| ^^^^^^^^^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
120 | sec: st.st_mtime.into(),
| ^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/inode.rs:124:22
|
124 | sec: st.st_ctime,
| ^^^^^^^^^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
124 | sec: st.st_ctime.into(),
| ^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/catfs/inode.rs:128:22
|
128 | sec: st.st_ctime,
| ^^^^^^^^^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
128 | sec: st.st_ctime.into(),
| ^^^^^^^^^^^^^^^^^^
error: aborting due to 22 previous errors
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `catfs`.
To create a 32 bits chroot:
DIR=ubuntu32
RELEASE=bionic
mkdir $DIR
sudo debootstrap --arch i386 $RELEASE $DIR http://archive.ubuntu.com/ubuntu/
sudo mount -t proc proc $DIR/proc
sudo mount -t devtmpfs dev $DIR/dev
sudo mkdur $DIR/src
sudo mount --bind $(pwd) $DIR/src
sudo setarch i386 chroot $DIR /bin/bash
apt-get install curl build-essential libfuse-dev pkg-config
curl -sSf https://static.rust-lang.org/rustup.sh | sh
cd /src
cargo build
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels