Mantis - libiconv2
Viewing Issue Advanced Details
4726 regular use minor always 2011-03-16 17:44 2011-10-22 19:46
huginn  
dam  
normal  
closed  
fixed  
none    
none  
0004726: build is not thread-safe - errno issues
errno in libiconv latest build is a simple global variable

[amok@border](1)~/$ nm /opt/csw/lib/amd64/libiconv.so | grep errno
[954] | 0| 0|OBJT |GLOB |0 |UNDEF |errno

Programs build with thread-safe errno fail on errno check
when iconv() returns with non zero value and should set errno.

Package from blastwave.org is build with thread-safe errno BTW.

[amok@border](1)~/$ nm /opt/csw/lib/amd64/libiconv.so | grep errno
[1314] | 0| 0|FUNC |GLOB |0 |UNDEF |___errno
amd64 machine with
uname -a
SunOS border.intranet.qed.pl 5.10 Generic_142901-07 i86pc i386 i86pc Solaris
package version: i386/5.10/libiconv-1.13.1,REV=2009.07.31-SunOS5.8-i386-CSW.pkg
Issue History
2011-03-16 17:44 huginn New Issue
2011-03-16 18:48 dam Status new => assigned
2011-03-16 18:48 dam Assigned To => dam
2011-03-16 19:54 dam Note Added: 0008918
2011-03-16 22:47 huginn Note Added: 0008920
2011-03-17 08:09 dam Note Added: 0008921
2011-03-17 08:10 dam Note Edited: 0008921
2011-03-21 14:15 huginn Note Added: 0008939
2011-10-22 19:46 dam Note Added: 0009355
2011-10-22 19:46 dam Status assigned => closed
2011-10-22 19:46 dam Resolution open => fixed

Notes
(0008918)
dam   
2011-03-16 19:54   
Thanks for the report! I have made experimental packages with _REENTRANT set and split according to the current standard available at
  http://buildfarm.opencsw.org/experimental.html#libiconv [^]
Please give them a try and let me know if encounter any issues.

Best regards -- Dago
(0008920)
huginn   
2011-03-16 22:47   
I did try your package, nm shows errno should be thread safe now, thanks!
Unfortunately, my test app crashes at iconv() call
(blastwave version works fine).
It is quite late here so I will look more into it tomorrow to give you more details.

One question BTW, am I doing something wrong or newly build
CSWiconv package is missing symbolic links:

/opt/csw/lib/amd64/libiconv.so
/opt/csw/lib/libiconv.so

are nowhere to be found.

Best regards!
(0008921)
dam   
2011-03-17 08:09   
(edited on: 2011-03-17 08:10)
The symlinks on *.so are deliberately missing as they are useful only when compiling against the library to find the right version. An application linking to it would pick up the SONAME and link against that at runtime. The symlinks are therefore in the development package libiconv_dev.

What are you using as testapp? Something I can reproduce?

Best regards -- Dago

(0008939)
huginn   
2011-03-21 14:15   
Sorry for the noise, the first time I misused pkgutil -t (First time I used this option).
After both updating libiconv and installing libiconv_dev every thing work beautifully on my side.

Many great thanks for you!
(0009355)
dam   
2011-10-22 19:46   
The updated libiconv has been released to current/.