Re: git: d549de769055 - main - libc: Remove readdir_r(3) [This broke building rust 1.88]

From: Alan Somers <asomers_at_freebsd.org>
Date: Thu, 11 Sep 2025 13:44:11 UTC
On Thu, Sep 11, 2025 at 4:49 AM Dag-Erling Smørgrav <des@freebsd.org> wrote:

> Mark Millard <marklmi@yahoo.com> writes:
> > Example error message text from the log file for the
> > rust build via poudriere-devel:
> >
> >
> >   = note: ld: error: undefined symbol: readdir_r
> >           >>> referenced by std.d8968a002452916e-cgu.07
> >           >>>
>  std-de94806a57729acc.std.d8968a002452916e-cgu.07.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hbe1160129d2c5f7c)
> >           >>> in archive /wrkdirs/usr/ports/lan
> >
> g/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-de94806a57729acc.rlib
> >           >>> did you mean: readdir_r@FBSD_1.5
> >           >>> defined in: /lib/libc.so.7
> >           cc: error: linker command failed with exit code 1 (use -v to
> see invocation)
>
> Tell that to the Rust developers.  They have been repeatedly warned
> against using readdir_r(3) for years, as far back as 2016.
>

Have they? Looking at rust's github page, I see discussions about using
readdir_r on Fuchsia and Linux, but nothing about BSD.  But even if they
have been "warned", that's not really relevant.  We shouldn't cavalierly
break the build for such important software.  I'm guessing that you didn't
do an exp-run for this change, so there is probably other software in ports
that is broken, too.  I request that this change be reverted.  And I
request that it remain reverted until such a time as an exp-run passes,
possibly with the aid of installing misc/compat14x as a dependency for some
ports.