Bug 825555 - The icu-config included in mingw-icu does not correspond with library names
Summary: The icu-config included in mingw-icu does not correspond with library names
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw-icu
Version: 17
Hardware: noarch
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paweł Forysiuk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-27 18:44 UTC by greg.hellings
Modified: 2013-08-01 18:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 18:10:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description greg.hellings 2012-05-27 18:44:37 UTC
Description of problem:
The icu-config file included in the package looks for libraries with names ending in 48.dll in the bin/ folder, then outputs the proper linker arguments to use (--ldflags) including switches with the '48' on the name. Thus it gives the following arguments:
 -lpthread -lm   -L/usr/i686-w64-mingw32/sys-root/mingw/lib -licui18n48 -licuuc48 -licudata48  -lpthread -lm

The actual static stub files are named
libicuuc.dll.a, libicudata.dll.a, libicui18n.dll.a
and thus linking against the above switches fails.

Version-Release number of selected component (if applicable):
4.8.1.1-5


How reproducible:
Always

Steps to Reproduce:
1. Install mingw32-icu
2. Attempt to build a package that depends on ICU.
3. At link-time include the output of $(/usr/i686-w64-mingw32/sys-root/mingw/bin/icu-config --ldflags)
  
Actual results:
Linker is unable to find the link library stubs with the version number 48 appended to them.

Expected results:
Linking happens properly.

Additional info:
http://dl.thehellings.com/mingw32/icu/mingw-icu.spec
http://dl.thehellings.com/mingw32/icu/mingw-icu-4.8.1.1-5.1.fc17.src.rpm

The above files are fixed to solve this problem by renaming the .dll.a libraries. Alternatively this could be fixed natively in the build process and the results upstreamed to the ICU team, but the above has been verified to work.

Comment 1 Erik van Pienbroek 2012-05-30 06:12:04 UTC
I agree this is a packaging bug. The pkg-config files point to the correct import libraries:

$ cat /usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/*icu* | grep Libs
Libs: -licui18n
Libs: -licuio
Libs: -licule
Libs: -liculx
Libs: -L${libdir} -licuuc -licudata
Libs.private: ${baselibs}

So if the package maintainer decides to rename the import libraries so they contain the '48' suffix then the pkgconfig files need to be updated as well.

A more proper solution would be to fix the icu-config script so that it shows the correct libs. The icu-config script currently produces this output:

$ /usr/i686-w64-mingw32/sys-root/mingw/bin/icu-config --ldflags
 -lm   -L/usr/i686-w64-mingw32/sys-root/mingw/lib -licui18n48 -licuuc48 -licudata48  -lm   

Instead of renaming the import libraries this could be changed so that it doesn't contain the '48' suffix any more.

Which one of these solutions to use is a choice I'll leave up to the package maintainer: Paweł Forysiuk

Comment 2 greg.hellings 2012-06-04 12:53:44 UTC
I've expended time on a few occasions trying to unravel the icu-config script. Patching it is tricky since it's cobbled together from a number of other files, but I can take another look at doing so.

Comment 3 Joel Uckelman 2013-06-05 10:41:07 UTC
I'm running into the same problem. Is there any chance of getting this resolved? 

I thought the icu-config script was built as part of building ICU, so the way to fix this would not be to patch icu-config, but rather to adjust one of the variables which is used for building icu-config.

It seems like it could be fixed with a one-line change to source/config/mh-mingw in ICU:

  SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)

should become:

  SO_TARGET_VERSION_SUFFIX =

I believe that would do the job.

Comment 4 Fedora End Of Life 2013-07-04 06:35:10 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Joel Uckelman 2013-07-04 20:43:56 UTC
This should bug is still present in Fedora 18, so the version should be updated to reflect that, rather than closing it.

Comment 6 Fedora End Of Life 2013-08-01 18:10:33 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.