Skip to content

Compilation fails on OpenBSD #249

Open
@igor-petruk

Description

@igor-petruk

Hi,

Compiling pprof on OpenBSD gives this error, same as under FreeBSD under #151

error[E0425]: cannot find value `addr` in this scope
   --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pprof-0.13.0/src/profiler.rs:344:44
    |
344 |                 if profiler.is_blocklisted(addr) {
    |                                            ^^^^ not found in this scope

error[E0425]: cannot find function `create_pipe` in this scope
  --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pprof-0.13.0/src/addr_validate.rs:58:31
   |
58 |     let (read_fd, write_fd) = create_pipe()?;
   |                               ^^^^^^^^^^^ not found in this scope

error[E0308]: mismatched types
   --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pprof-0.13.0/src/profiler.rs:235:9
    |
235 | /         unsafe {
236 | |             #[cfg(target_os = "android")]
237 | |             {
238 | |                 let errno = *libc::__errno();
...   |
250 | |             }
251 | |         }
    | |_________^ expected `ErrnoProtector`, found `()`

Some errors have detailed explanations: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `pprof` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

OpenBSD is 7.5 (unrelease, snapshots), but it probably does not work on stable too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions