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

 
 

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

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

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat Nov 19 14:22:53 2016, 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:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=fb6aa6ad7dd950729f4e3349d89d4ad82761af61

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 Feb 27 03:26:22 2013, 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):
   
   
Comment:
   

Attached Files
file #29498:  libiconv-1.14-001.txt added by munahid (1kB - 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 Nov 23 23:55:36 2016haibleCategoryNone=>Build
    Sat Nov 19 14:22:53 2016haibleStatusNone=>Fixed
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed
    Tue Oct 29 12:07:00 2013munahidAttached File-=>Added libiconv-1.14-001.txt, #29498
    Wed Feb 27 03:26:22 2013mail6543210Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup