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

 
 

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

Submitter:  Patrick <mail6543210>
Submitted:  Wed 27 Feb 2013 03:26:22 AM UTC
   
 
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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:
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>
Group administrator
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 Files:
   
   
Comment:
   

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
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by munahid (Updated the item)
  • -email is unavailable- added by mail6543210 (Submitted the item)
  • -email is unavailable- added by mail6543210
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-23 haible CategoryNone Build
    2016-11-19 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2013-10-29 munahid Attached File- Added libiconv-1.14-001.txt, #29498
    2013-02-27 mail6543210 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code