[Bug libstdc++/93602] Missing reference to libiconv in 9.x libstdc++
zvr+gcc at zvr dot gr
gcc-bugzilla@gcc.gnu.org
Sun Sep 27 21:27:20 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93602
Alexios Zavras (zvr) <zvr+gcc at zvr dot gr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zvr+gcc at zvr dot gr
--- Comment #14 from Alexios Zavras (zvr) <zvr+gcc at zvr dot gr> ---
I can confirm this bug also in gcc-9.3.0, gcc-10.1.0 and gcc-10.2.0.
To recap: if the system has a libiconv installed, the generated and installed
libstdc++.so depends on it.
However the compiler, when using it when compiling a C++ program, does not link
libiconv, resulting in an error:
$ g++ foo.cc
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv'
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv_close'
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv_open'
collect2: error: ld returned 1 exit status
More information about the Gcc-bugs
mailing list