buglibiconv - Bugs: bug #38422, Compile with mingw32 error:...


bug #38422: Compile with mingw32 error: reference to relocatable

Submitted by:  Patrick <mail6543210>
Submitted on:  Wed 27 Feb 2013 03:26:22 AM UTC  
Category: BuildSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 19 Nov 2016 02:22:53 PM UTC, comment #1:

Thanks for the report.

I can reproduce it: The "make install" command fails with
libtool: link: i686-w64-mingw32-gcc -g -O2 iconv.o iconv.res -o .libs/iconv.exe -L/usr/local/mingw32/lib ../srclib/libicrt.a /tmp/inst/lib/libiconv.dll.a -L/tmp/inst/lib
../srclib/libicrt.a(progreloc.o): In function `prepare_relocate':
/cygdrive/c/Users/bruno/devel/libiconv-1.14/build-mingw32/srclib/../../srclib/progreloc.c:297: undefined reference to `compute_curr_prefix'
/cygdrive/c/Users/bruno/devel/libiconv-1.14/build-mingw32/srclib/../../srclib/progreloc.c:302: undefined reference to `set_relocation_prefix'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:114: install] Error 1

It was fixed on 2011-08-16 in gnulib:

I verified that in recent libiconv snapshots (which use recent gnulib) the --enable-relocatable option works fine on mingw.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Wed 27 Feb 2013 03:26:22 AM UTC, original submission:

I was compiling libiconv 1.14 under MinGW32/WinXP.

I configured it with "--enable-relocatable" option, when building iconv.exe(after libcharset.dll and libiconvdll were built), it tells "undefined reference to `relocate`, `compute_curr_prefix`, `set_relocation_prefix`".

PS: I'm not sure what does the "relocatable" means.

After navigating the souce code and Makefile, I noticed that when compilling lib/relocatable.c, the Makefile use "-Drelocate=libiconv_relocate","-Dset_relocation_prefix=libiconv_set_relocation_prefix" and (line 166) "#ifdef IN_LIBRARY
#define compute_curr_prefix local_compute_curr_prefix".
Which makes the object code has no correct symbols.

Please fix it, thank you!

Patrick <mail6543210>


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

Attach File(s):

Attached Files
file #29498:  libiconv-1.14-001.txt added by munahid (1KiB - text/plain - patch (after configure), to add relocatable.c to the lib. Allows at least building everything...)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by munahid (Updated the item)
  • -unavailable- added by mail6543210 (Submitted the item)
  • -unavailable- added by mail6543210

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Nov 2016 11:55:36 PM UTChaibleCategoryNone=>Build
    Sat 19 Nov 2016 02:22:53 PM UTChaibleStatusNone=>Fixed
      Assigned toNone=>haible
    Tue 29 Oct 2013 12:07:00 PM UTCmunahidAttached File-=>Added libiconv-1.14-001.txt, #29498
    Wed 27 Feb 2013 03:26:22 AM UTCmail6543210Carbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1