https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119622
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Bruno Haible from comment #0) > I built gcc version 15-20250323 from source, as usual through ".../configure > ...", "make", "make install". > > Now I can compile a Modula-2 hello-world program, but it references 4 > runtime libraries, which are not present in the installation directories. > They are present in the build tree, though. The question is: Why did "make > install" not install them? > > Details: > > 1) I configured and built this gcc with the commands > > version=15-20250323 > ../gcc-$version/configure --build=x86_64-pc-linux-gnu > --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu > --prefix=/arch/x86_64-linux-gnu/gnu-inst-gcc/$version-all --enable-shared > --enable-nls --enable-threads=posix --enable-__cxa_atexit > --with-multilib-list=m64 > --with-as=/arch/x86_64-linux-gnu/gnu-inst-binutils/2.38/bin/as > --with-ld=/arch/x86_64-linux-gnu/gnu-inst-binutils/2.38/bin/ld > --with-gmp=/arch/x86_64-linux-gnu/gnu-inst-gcc/$version > --with-mpfr=/arch/x86_64-linux-gnu/gnu-inst-gcc/$version > --with-mpc=/arch/x86_64-linux-gnu/gnu-inst-gcc/$version > --with-isl=/arch/x86_64-linux-gnu/gnu-inst-gcc/$version > --enable-languages=c,c++,objc,obj-c++,lto,jit,fortran,go,d,m2 > --enable-host-shared > make > make install > > 2) The program foo.mod: > ====================================================================== > MODULE Hello; > > FROM Terminal IMPORT WriteLn, WriteString; > > BEGIN > > WriteString("Hello, world!"); > WriteLn; > > END Hello. > ====================================================================== > > 3) Compiling it: > $ gm2 foo.mod > $ ldd a.out > linux-vdso.so.1 (0x00007fff4aeb3000) > libm2cor.so.20 => not found > libm2log.so.20 => not found > libm2pim.so.20 => not found > libm2iso.so.20 => not found > libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 > (0x00007b7e3e000000) > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007b7e3e304000) > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > (0x00007b7e3e2d6000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007b7e3dc00000) > /lib64/ld-linux-x86-64.so.2 (0x00007b7e3e413000) I'll note this doesn't find your installed libstdc++.so.6 either but the system one. So you'd need to alter LD_LIBRARY_PATH for the installed lib directory. > $ ./a.out > ./a.out: error while loading shared libraries: libm2cor.so.20: cannot open > shared object file: No such file or directory > > 4) In the installation directory: > $ find /arch/x86_64-linux-gnu/gnu-inst-gcc/15-20250323-all -name 'libm2*' That's odd. The libraries get installed just fine for me.