public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc++.so.0.29 contains undefined reference to libiconv
@ 2022-04-07  2:37 Yubin Ruan
  2022-04-07  2:42 ` Yubin Ruan
  2022-04-07  9:02 ` Jonathan Wakely
  0 siblings, 2 replies; 8+ messages in thread
From: Yubin Ruan @ 2022-04-07  2:37 UTC (permalink / raw)
  To: libstdc++

Hi,

I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
"/usr/local/mygcc/lib64/") but this shared lib contains undefined
reference to libiconv_*.

When I compile a hello world program using gcc11.2, I get the following error:

> /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
/usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv'
/usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv_close'
/usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
undefined reference to `libiconv_open'
collect2: error: ld returned 1 exit status

Adding a "-liconv" flag will help this program compile.

From ldd's output, the libstdc++.so does not has any dynamic reference
to libiconv;

  > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
          linux-vdso.so.1 =>  (0x00007ffce1fea000)
          libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
          libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
          /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
          libgcc_s.so.1 =>
/usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)

But from nm 's output, there are indeed undefined reference to libiconv*

  > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
                   U libiconv
                   U libiconv_close
                   U libiconv_open

I already have libiconv installed under /usr/local when compiling
GCC11.2, but this does not seems to help;
And by the way, libiconv seems to only provide dynamic lib; there is
no libiconv.a;


Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
also contains undefined ref to libiconv*

  > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
                   U libiconv
                   U libiconv_close
                   U libiconv_open

but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".

So, is there anything that I missed when compiling GCC11.2 which can
remove unnecessary dependency of libiconv ?

Thanks,
Yubin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07  2:37 libstdc++.so.0.29 contains undefined reference to libiconv Yubin Ruan
@ 2022-04-07  2:42 ` Yubin Ruan
  2022-04-07  9:02 ` Jonathan Wakely
  1 sibling, 0 replies; 8+ messages in thread
From: Yubin Ruan @ 2022-04-07  2:42 UTC (permalink / raw)
  To: libstdc++

FYI, I compile GCC11.2 with

    > ../src/gcc-%{VERSION}/configure --enable-languages=c,c++
--disable-multilib --prefix=/usr/local/mygcc

on a CentOS7.2 with intel x64

On Thu, Apr 7, 2022 at 10:37 AM Yubin Ruan <ablacktshirt@gmail.com> wrote:
>
> Hi,
>
> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
> reference to libiconv_*.
>
> When I compile a hello world program using gcc11.2, I get the following error:
>
> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv'
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv_close'
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv_open'
> collect2: error: ld returned 1 exit status
>
> Adding a "-liconv" flag will help this program compile.
>
> From ldd's output, the libstdc++.so does not has any dynamic reference
> to libiconv;
>
>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
>           libgcc_s.so.1 =>
> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
>
> But from nm 's output, there are indeed undefined reference to libiconv*
>
>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
>                    U libiconv
>                    U libiconv_close
>                    U libiconv_open
>
> I already have libiconv installed under /usr/local when compiling
> GCC11.2, but this does not seems to help;
> And by the way, libiconv seems to only provide dynamic lib; there is
> no libiconv.a;
>
>
> Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
> also contains undefined ref to libiconv*
>
>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
>                    U libiconv
>                    U libiconv_close
>                    U libiconv_open
>
> but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".
>
> So, is there anything that I missed when compiling GCC11.2 which can
> remove unnecessary dependency of libiconv ?
>
> Thanks,
> Yubin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07  2:37 libstdc++.so.0.29 contains undefined reference to libiconv Yubin Ruan
  2022-04-07  2:42 ` Yubin Ruan
@ 2022-04-07  9:02 ` Jonathan Wakely
  2022-04-07  9:03   ` Jonathan Wakely
  2022-04-07 13:21   ` Yubin Ruan
  1 sibling, 2 replies; 8+ messages in thread
From: Jonathan Wakely @ 2022-04-07  9:02 UTC (permalink / raw)
  To: Yubin Ruan; +Cc: libstdc++

On Thu, 7 Apr 2022, 03:38 Yubin Ruan via Libstdc++, <libstdc++@gcc.gnu.org>
wrote:

> Hi,
>
> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
> reference to libiconv_*.
>
> When I compile a hello world program using gcc11.2, I get the following
> error:
>
> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv'
>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv_close'
>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> undefined reference to `libiconv_open'
> collect2: error: ld returned 1 exit status
>
> Adding a "-liconv" flag will help this program compile.
>
> From ldd's output, the libstdc++.so does not has any dynamic reference
> to libiconv;
>
>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
>           libgcc_s.so.1 =>
> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
>
> But from nm 's output, there are indeed undefined reference to libiconv*
>
>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
>                    U libiconv
>                    U libiconv_close
>                    U libiconv_open
>
> I already have libiconv installed under /usr/local when compiling
> GCC11.2, but this does not seems to help;
>

It doesn't help because that is the cause of the problem.

Glibc defines the iconv routines that libstdc++ needs, and so you should
not use libiconv on Linux systems using Glibc.




And by the way, libiconv seems to only provide dynamic lib; there is
> no libiconv.a;
>
>
> Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
> also contains undefined ref to libiconv*
>
>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
>                    U libiconv
>                    U libiconv_close
>                    U libiconv_open
>
> but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".
>
> So, is there anything that I missed when compiling GCC11.2 which can
> remove unnecessary dependency of libiconv ?
>
> Thanks,
> Yubin
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07  9:02 ` Jonathan Wakely
@ 2022-04-07  9:03   ` Jonathan Wakely
  2022-04-07 13:21     ` Yubin Ruan
  2022-04-07 13:21   ` Yubin Ruan
  1 sibling, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2022-04-07  9:03 UTC (permalink / raw)
  To: Yubin Ruan; +Cc: libstdc++

On Thu, 7 Apr 2022, 10:02 Jonathan Wakely, <jwakely.gcc@gmail.com> wrote:

>
>
> On Thu, 7 Apr 2022, 03:38 Yubin Ruan via Libstdc++, <libstdc++@gcc.gnu.org>
> wrote:
>
>> Hi,
>>
>> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
>> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
>> reference to libiconv_*.
>>
>> When I compile a hello world program using gcc11.2, I get the following
>> error:
>>
>> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
>>
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv'
>>
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv_close'
>>
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv_open'
>> collect2: error: ld returned 1 exit status
>>
>> Adding a "-liconv" flag will help this program compile.
>>
>> From ldd's output, the libstdc++.so does not has any dynamic reference
>> to libiconv;
>>
>>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
>>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
>>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
>>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
>>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
>>           libgcc_s.so.1 =>
>> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
>>
>> But from nm 's output, there are indeed undefined reference to libiconv*
>>
>>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
>>                    U libiconv
>>                    U libiconv_close
>>                    U libiconv_open
>>
>> I already have libiconv installed under /usr/local when compiling
>> GCC11.2, but this does not seems to help;
>>
>
> It doesn't help because that is the cause of the problem.
>
> Glibc defines the iconv routines that libstdc++ needs, and so you should
> not use libiconv on Linux systems using Glibc.
>


There is an existing bug in bugzilla about this case.




>
>
> And by the way, libiconv seems to only provide dynamic lib; there is
>> no libiconv.a;
>>
>>
>> Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
>> also contains undefined ref to libiconv*
>>
>>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
>>                    U libiconv
>>                    U libiconv_close
>>                    U libiconv_open
>>
>> but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".
>>
>> So, is there anything that I missed when compiling GCC11.2 which can
>> remove unnecessary dependency of libiconv ?
>>
>> Thanks,
>> Yubin
>>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07  9:02 ` Jonathan Wakely
  2022-04-07  9:03   ` Jonathan Wakely
@ 2022-04-07 13:21   ` Yubin Ruan
  2022-04-07 14:04     ` Jonathan Wakely
  1 sibling, 1 reply; 8+ messages in thread
From: Yubin Ruan @ 2022-04-07 13:21 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++

On Thu, Apr 7, 2022 at 5:02 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
>
>
> On Thu, 7 Apr 2022, 03:38 Yubin Ruan via Libstdc++, <libstdc++@gcc.gnu.org> wrote:
>>
>> Hi,
>>
>> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
>> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
>> reference to libiconv_*.
>>
>> When I compile a hello world program using gcc11.2, I get the following error:
>>
>> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv'
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv_close'
>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>> undefined reference to `libiconv_open'
>> collect2: error: ld returned 1 exit status
>>
>> Adding a "-liconv" flag will help this program compile.
>>
>> From ldd's output, the libstdc++.so does not has any dynamic reference
>> to libiconv;
>>
>>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
>>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
>>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
>>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
>>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
>>           libgcc_s.so.1 =>
>> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
>>
>> But from nm 's output, there are indeed undefined reference to libiconv*
>>
>>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
>>                    U libiconv
>>                    U libiconv_close
>>                    U libiconv_open
>>
>> I already have libiconv installed under /usr/local when compiling
>> GCC11.2, but this does not seems to help;
>
>
> It doesn't help because that is the cause of the problem.
>
> Glibc defines the iconv routines that libstdc++ needs, and so you should not use libiconv on Linux systems using Glibc.


So remove all libiconv libs and headers, and recompile GCC will be
fine? Does it require any more configuration?

How do I make sure that the configuration is correct?


>> And by the way, libiconv seems to only provide dynamic lib; there is
>> no libiconv.a;
>>
>>
>> Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
>> also contains undefined ref to libiconv*
>>
>>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
>>                    U libiconv
>>                    U libiconv_close
>>                    U libiconv_open
>>
>> but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".
>>
>> So, is there anything that I missed when compiling GCC11.2 which can
>> remove unnecessary dependency of libiconv ?
>>
>> Thanks,
>> Yubin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07  9:03   ` Jonathan Wakely
@ 2022-04-07 13:21     ` Yubin Ruan
  2022-04-11 12:20       ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Yubin Ruan @ 2022-04-07 13:21 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++

On Thu, Apr 7, 2022 at 5:03 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
>
>
> On Thu, 7 Apr 2022, 10:02 Jonathan Wakely, <jwakely.gcc@gmail.com> wrote:
>>
>>
>>
>> On Thu, 7 Apr 2022, 03:38 Yubin Ruan via Libstdc++, <libstdc++@gcc.gnu.org> wrote:
>>>
>>> Hi,
>>>
>>> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
>>> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
>>> reference to libiconv_*.
>>>
>>> When I compile a hello world program using gcc11.2, I get the following error:
>>>
>>> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
>>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>>> undefined reference to `libiconv'
>>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>>> undefined reference to `libiconv_close'
>>> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
>>> undefined reference to `libiconv_open'
>>> collect2: error: ld returned 1 exit status
>>>
>>> Adding a "-liconv" flag will help this program compile.
>>>
>>> From ldd's output, the libstdc++.so does not has any dynamic reference
>>> to libiconv;
>>>
>>>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
>>>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
>>>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
>>>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
>>>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
>>>           libgcc_s.so.1 =>
>>> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
>>>
>>> But from nm 's output, there are indeed undefined reference to libiconv*
>>>
>>>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
>>>                    U libiconv
>>>                    U libiconv_close
>>>                    U libiconv_open
>>>
>>> I already have libiconv installed under /usr/local when compiling
>>> GCC11.2, but this does not seems to help;
>>
>>
>> It doesn't help because that is the cause of the problem.
>>
>> Glibc defines the iconv routines that libstdc++ needs, and so you should not use libiconv on Linux systems using Glibc.
>
>
>
> There is an existing bug in bugzilla about this case.

Can you provide the bugzilla URL ?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07 13:21   ` Yubin Ruan
@ 2022-04-07 14:04     ` Jonathan Wakely
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Wakely @ 2022-04-07 14:04 UTC (permalink / raw)
  To: Yubin Ruan; +Cc: libstdc++

On Thu, 7 Apr 2022, 14:21 Yubin Ruan, <ablacktshirt@gmail.com> wrote:

> On Thu, Apr 7, 2022 at 5:02 PM Jonathan Wakely <jwakely.gcc@gmail.com>
> wrote:
> >
> >
> >
> > On Thu, 7 Apr 2022, 03:38 Yubin Ruan via Libstdc++, <
> libstdc++@gcc.gnu.org> wrote:
> >>
> >> Hi,
> >>
> >> I compile GCC 11.2 and get a libstdc++.so.6.0.29 (installed in
> >> "/usr/local/mygcc/lib64/") but this shared lib contains undefined
> >> reference to libiconv_*.
> >>
> >> When I compile a hello world program using gcc11.2, I get the following
> error:
> >>
> >> > /usr/local/mygcc/bin/g++ -Wall -std=c++17 hw.cc -o hw
> >>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> >> undefined reference to `libiconv'
> >>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> >> undefined reference to `libiconv_close'
> >>
> /usr/local/mygcc/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so:
> >> undefined reference to `libiconv_open'
> >> collect2: error: ld returned 1 exit status
> >>
> >> Adding a "-liconv" flag will help this program compile.
> >>
> >> From ldd's output, the libstdc++.so does not has any dynamic reference
> >> to libiconv;
> >>
> >>   > ldd /usr/local/mygcc/lib64/libstdc++.so.6.0.29
> >>           linux-vdso.so.1 =>  (0x00007ffce1fea000)
> >>           libm.so.6 => /lib64/libm.so.6 (0x00007fefc74b8000)
> >>           libc.so.6 => /lib64/libc.so.6 (0x00007fefc70e9000)
> >>           /lib64/ld-linux-x86-64.so.2 (0x00007fefc7bd1000)
> >>           libgcc_s.so.1 =>
> >> /usr/local/$INSTALL_PREFX/lib64/libgcc_s.so.1 (0x00007fefc6ed1000)
> >>
> >> But from nm 's output, there are indeed undefined reference to libiconv*
> >>
> >>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.29 |grep -i iconv
> >>                    U libiconv
> >>                    U libiconv_close
> >>                    U libiconv_open
> >>
> >> I already have libiconv installed under /usr/local when compiling
> >> GCC11.2, but this does not seems to help;
> >
> >
> > It doesn't help because that is the cause of the problem.
> >
> > Glibc defines the iconv routines that libstdc++ needs, and so you should
> not use libiconv on Linux systems using Glibc.
>
>
> So remove all libiconv libs and headers, and recompile GCC will be
> fine?


Yes.

Does it require any more configuration?
>

No.



> How do I make sure that the configuration is correct?
>

Check the config.log in the $TARGET/libstdc++-v3 build directory, it think
it should say where iconv is found.




>
> >> And by the way, libiconv seems to only provide dynamic lib; there is
> >> no libiconv.a;
> >>
> >>
> >> Previously I have GCC10.2 compiled & installed. The libstdc++.so.0.28
> >> also contains undefined ref to libiconv*
> >>
> >>   > nm -D /usr/local/mygcc/lib64/libstdc++.so.6.0.28 |grep -i iconv
> >>                    U libiconv
> >>                    U libiconv_close
> >>                    U libiconv_open
> >>
> >> but compiling with libstdc++.so.6.0.28 does NOT require "-liconv".
> >>
> >> So, is there anything that I missed when compiling GCC11.2 which can
> >> remove unnecessary dependency of libiconv ?
> >>
> >> Thanks,
> >> Yubin
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.0.29 contains undefined reference to libiconv
  2022-04-07 13:21     ` Yubin Ruan
@ 2022-04-11 12:20       ` Jonathan Wakely
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Wakely @ 2022-04-11 12:20 UTC (permalink / raw)
  To: Yubin Ruan; +Cc: libstdc++

On Thu, 7 Apr 2022 at 14:22, Yubin Ruan wrote:
> Can you provide the bugzilla URL ?

It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93602

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-11 12:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  2:37 libstdc++.so.0.29 contains undefined reference to libiconv Yubin Ruan
2022-04-07  2:42 ` Yubin Ruan
2022-04-07  9:02 ` Jonathan Wakely
2022-04-07  9:03   ` Jonathan Wakely
2022-04-07 13:21     ` Yubin Ruan
2022-04-11 12:20       ` Jonathan Wakely
2022-04-07 13:21   ` Yubin Ruan
2022-04-07 14:04     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).