Skip to content

FreeBSD support and execvpe

Compilation on FreeBSD fails as execvpe doesn't exist on that platform (and is not a POSIX standard). It looks like a workaround was applied in utils.rs for macos. Maybe this can be extended to include freebsd as well.

   Compiling pager v0.16.0
error[E0425]: cannot find function `execvpe` in crate `libc`
   --> /home/xxxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/pager-0.16.0/src/utils.rs:69:15
    |
69  |           libc::execvpe(args[0], args.as_ptr(), envs.as_ptr())
    |                 ^^^^^^^ help: a function with a similar name exists: `execve`
    |
   ::: /home/xxxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.80/src/unix/mod.rs:909:5
    |
909 | /     pub fn execve(
910 | |         prog: *const c_char,
911 | |         argv: *const *const c_char,
912 | |         envp: *const *const c_char,
913 | |     ) -> ::c_int;
    | |_________________- similarly named function `execve` defined here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `pager`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `pijul v1.0.0-alpha.10`, intermediate artifacts can be found at `/tmp/cargo-installwI9bUx`