Undefined reference to posix_spawn_file_actions_init

I'm trying to cross compile my application targeting OpenWRT using rustc 1.47 but I get errors.
The target toolchain I'm using is armv7-unknown-linux-gnuaebi.
I've been searching for some solutions but can't find anything related to this. Anyone that could help me solve these?

I'm getting following error message:

= note: /usr/local/sdk/staging_dir/target/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
/root/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabi/lib/libstd-181c805f8d9e0e79.rlib(std-181c805f8d9e0e79.std.cev4n6xw-cgu.0.rcgu.o): In function core::ptr::drop_in_place::h11af887572a17210': /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:335: undefined reference to posix_spawnattr_destroy'
/root/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabi/lib/libstd-181c805f8d9e0e79.rlib(std-181c805f8d9e0e79.std.cev4n6xw-cgu.0.rcgu.o): In function core::ptr::drop_in_place::h6a3a5f4c941f6d88': /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:325: undefined reference to posix_spawn_file_actions_destroy'
/root/.rustup/toolchains/1.47.0-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabi/lib/libstd-181c805f8d9e0e79.rlib(std-181c805f8d9e0e79.std.cev4n6xw-cgu.0.rcgu.o): In function std::sys::unix::process::process_inner::_$LT$impl$u20$std..sys..unix..process..process_common..Command$GT$::posix_spawn::h51b1946509f7dc28': /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:344: undefined reference to posix_spawnattr_init'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:345: undefined reference to posix_spawn_file_actions_init' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:348: undefined reference to posix_spawn_file_actions_adddup2'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:355: undefined reference to posix_spawn_file_actions_adddup2' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:362: undefined reference to posix_spawn_file_actions_adddup2'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:374: undefined reference to posix_spawnattr_setsigmask' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:376: undefined reference to posix_spawnattr_setsigdefault'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:379: undefined reference to posix_spawnattr_setflags' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:384: undefined reference to posix_spawnp'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:335: undefined reference to posix_spawnattr_destroy' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:325: undefined reference to posix_spawn_file_actions_destroy'
/rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:335: undefined reference to posix_spawnattr_destroy' /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39//library/std/src/sys/unix/process/process_unix.rs:325: undefined reference to posix_spawn_file_actions_destroy'
collect2: ld returned 1 exit status

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.