https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123366

--- Comment #25 from Mark Millard <markmigm at gmail dot com> ---
(In reply to Mark Millard from comment #24)
> (In reply to Mark Millard from comment #23)
> > . . .
> > 
> > # grep -n ld-elf.so.1:
> > /wrkdirs/usr/ports/lang/gcc16-devel/work.*/.build/gcc/config.log | less
> > /wrkdirs/usr/ports/lang/gcc16-devel/work.BAD/.build/gcc/config.log:4920:ld-
> > elf.so.1: Shared object "libstdc++.so.6" not found, required by "conftest"
> > /wrkdirs/usr/ports/lang/gcc16-devel/work.BAD/.build/gcc/config.log:5919:ld-
> > elf.so.1: Shared object "libstdc++.so.6" not found, required by "conftest"
> > /wrkdirs/usr/ports/lang/gcc16-devel/work.BAD/.build/gcc/config.log:6117:ld-
> > elf.so.1: Shared object "libstdc++.so.6" not found, required by "conftest"
> 
> Going through the config.log files in time sequence order,
> looking for the first signficant differences between BAD 
> and GOOD, the above for :4920: looks to be the first such.

And, since it involves:

. . .
-| #include <stdlib.h>
-| int main()
-| {
-|   mbstowcs(0, "", 0);
-|   return 0;
-| }

It likely explains the .build/gcc/auto-host.h :

-/* #undef HAVE_WORKING_MBSTOWCS */
+#define HAVE_WORKING_MBSTOWCS 1

The other 2 likely have a similar status for
the other 2 .build/gcc/auto-host.h differences.

I'm not sure why .build/./prev-gcc/xg++ is in use
for this check, leading to the need for
libstdc++.so.6 being available.


As for why it is found in the GOOD case when gcc15 had
been previously installed, the poudriere jail context
reports:

# ldconfig -r | grep gcc15
        search directories:
/lib:/usr/lib:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/gcc15:/usr/local/lib/perl5/5.42/mach/CORE
        239:-lstdc++.6 => /usr/local/lib/gcc15/libstdc++.so.6
        240:-lubsan.1 => /usr/local/lib/gcc15/libubsan.so.1
        241:-lasan.8 => /usr/local/lib/gcc15/libasan.so.8
        242:-lcc1.0 => /usr/local/lib/gcc15/libcc1.so.0
        243:-lgcc_s.1 => /usr/local/lib/gcc15/libgcc_s.so.1
        244:-latomic.1 => /usr/local/lib/gcc15/libatomic.so.1
        245:-lquadmath.0 => /usr/local/lib/gcc15/libquadmath.so.0
        246:-lgccjit.0 => /usr/local/lib/gcc15/libgccjit.so.0
        247:-lgfortran.5 => /usr/local/lib/gcc15/libgfortran.so.5
        248:-lgomp.1 => /usr/local/lib/gcc15/libgomp.so.1
        249:-litm.1 => /usr/local/lib/gcc15/libitm.so.1

Reply via email to