yoshuawuyts / fd-lock

Advisory cross-platform file locks using file descriptors
Apache License 2.0
76 stars 18 forks source link

Solaris build fails with: #49

Open psumbera opened 3 days ago

psumbera commented 3 days ago
   Compiling libc v0.2.166
   Compiling rustix v0.38.41
   Compiling bitflags v2.6.0
   Compiling cfg-if v1.0.0
   Compiling errno v0.3.9
   Compiling fd-lock v4.0.2 (/export/home/test/fd-lock)
error[E0432]: unresolved import `rustix::fs::FlockOperation`
 --> src/sys/unix/read_guard.rs:2:5
  |
2 | use rustix::fs::FlockOperation;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FlockOperation` in `fs`

error[E0432]: unresolved import `rustix::fs::FlockOperation`
 --> src/sys/unix/rw_lock.rs:2:5
  |
2 | use rustix::fs::FlockOperation;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FlockOperation` in `fs`

error[E0432]: unresolved import `rustix::fs::FlockOperation`
 --> src/sys/unix/write_guard.rs:2:5
  |
2 | use rustix::fs::FlockOperation;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FlockOperation` in `fs`

error[E0412]: cannot find type `FlockOperation` in module `fs`
  --> src/sys/unix/mod.rs:13:20
   |
13 |     operation: fs::FlockOperation,
   |                    ^^^^^^^^^^^^^^ not found in `fs`

error[E0425]: cannot find function `fcntl_lock` in module `fs`
  --> src/sys/unix/mod.rs:19:16
   |
19 |     return fs::fcntl_lock(fd, operation);
   |                ^^^^^^^^^^ not found in `fs`

Some errors have detailed explanations: E0412, E0425, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `fd-lock` (lib) due to 5 previous errors
psumbera commented 3 days ago

I think that this is caused by recent libc fixes and following fixes to rustix. The issue is now mainly that fd-lock is required by Rust bootstrap.

psumbera commented 3 days ago

See also https://github.com/bytecodealliance/rustix/pull/1226