bugManeage - Bugs: bug #56702, Undefined libiconv symbols in...


You are not allowed to post comments on this tracker with your current authentication level.

bug #56702: Undefined libiconv symbols in libstdc++

Submitted by:  Mohammad Akhlaghi <makhlaghi>
Submitted on:  Wed 31 Jul 2019 03:48:47 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Wed 31 Jul 2019 04:14:56 PM UTC, comment #1: 

This bug has been fixed (through the brute-force/ugly solution!) and pushed to the main branch.

If we can later find a better solution, we should remove this inelegant solution.

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Wed 31 Jul 2019 03:48:47 PM UTC, original submission:  

After adding the libiconv library to the template, the C++ library uses three of its functions (`libiconv', `libiconv_open' and `libiconv_close'):

$ nm .local/lib/libstdc++.so | grep iconv
                 U libiconv
                 U libiconv_close
                 U libiconv_open

However, it will not include an internal link to our installed libiconv:

$ ldd .local/lib/libstdc++.so
        linux-vdso.so.1 (0x00007ffdd0950000)
        libm.so.6 => /usr/lib/libm.so.6
        libc.so.6 => /usr/lib/libc.so.6
        libgcc_s.so.1 => /PROJECTLIBDIR/libgcc_s.so.1

I tried by exporting `LIBS=-liconv' before the GCC configure script but it crashed as soon as it went on to the second GCC building stage (because this environment variable was no longer present there). I also tried adding the C++ configure option of `--enable-cstdio' to the GCC configure options (so it doesn't use iconv according to the manual), but it made no change.

As a brute-force solution, I am now trying to use `patchelf --add-needed' to manually add libiconv inside the `libstdc++' shared library.

This bug was found by Roberto Baena Galle while trying to load Matplotlib (which needed the C++ library).

Mohammad Akhlaghi <makhlaghi>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-31 makhlaghi StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2019-07-31 makhlaghi Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.9