Issue Details (XML | Word | Printable)

Key: STDCXX-357
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Invalid
Priority: Minor Minor
Assignee: Eric Lemings
Reporter: Eric Lemings
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[gcc/Mac OS X] link utilities with the iconv library

Created: 14/Mar/07 04:05 PM   Updated: 03/Jun/08 08:25 PM
Return to search
Component/s: Utilities
Affects Version/s: 4.1.2, 4.1.3
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 2h
Original Estimate - 2h
Remaining Estimate: 0h
Time Spent - 2h
Time Spent: 2h
Time Spent - 2h

Environment: Darwin host.local 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386

Patch Info: Patch Available
Resolved: 31/Mar/08 11:13 PM
Resolution Date: 03/Jun/08 08:25 PM


 Description  « Hide
Some executables (esp. locale-specific utilities) need to link with the iconv library. Patch listed below. (Don't think it will matter that the link flag is given for all link commands.)
Index: etc/config/gcc.config
===================================================================
--- etc/config/gcc.config       (revision 517771)
+++ etc/config/gcc.config       (working copy)
@@ -127,7 +129,7 @@
   ifeq ($(OSNAME),Darwin)
     # link with gcc_eh to resolve the _Unwind_xxx functions
     # (shouldn't we link with it on all platforms?)
-    LDLIBS += -lgcc_eh
+    LDLIBS += -liconv -lgcc_eh
   endif
 endif   # gcc > 2



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor made changes - 10/Oct/07 07:28 PM
Field Original Value New Value
Assignee Martin Sebor [ sebor ]
Martin Sebor added a comment - 10/Oct/07 07:35 PM
I have successfully built the locale utilities with gcc 4.01 on Darwin 8.10.1 w/o iconv (with _RWSTD_NO_ICONV #defined in the config header), probably as a result of http://svn.apache.org/viewvc?view=rev&revision=579018. We should revisit this in the future to see if linking with libiconv provides additional functionality that we might be missing out on now.

Martin Sebor added a comment - 10/Oct/07 07:37 PM
Changed Issue Type to Improvement, Component(s) to Utilities, set Priority to Minor, and scheduled for 4.2.1.

Martin Sebor made changes - 10/Oct/07 07:37 PM
Component/s Utilities [ 12310147 ]
Component/s Build [ 12310141 ]
Priority Major [ 3 ] Minor [ 4 ]
Summary [gcc/Mac OS X 10.4.8 Tiger] Some executables need to link with the iconv library. [gcc/Mac OS X] link utilities with the iconv library
Fix Version/s 4.2 [ 12311945 ]
Fix Version/s 4.2.1 [ 12312690 ]
Issue Type Bug [ 1 ] Improvement [ 4 ]
Martin Sebor made changes - 21/Jan/08 06:32 PM
Original Estimate 2h [ 7200 ]
Remaining Estimate 2h [ 7200 ]
Martin Sebor added a comment - 12/Mar/08 03:41 AM
Disabled formatting. Patch is available inline.

Martin Sebor made changes - 12/Mar/08 03:41 AM
Description Some executables (esp. locale-specific utilities) need to link with the iconv library. Patch listed below. (Don't think it will matter that the link flag is given for all link commands.)

Index: etc/config/gcc.config
===================================================================
--- etc/config/gcc.config (revision 517771)
+++ etc/config/gcc.config (working copy)
@@ -127,7 +129,7 @@
   ifeq ($(OSNAME),Darwin)
     # link with gcc_eh to resolve the _Unwind_xxx functions
     # (shouldn't we link with it on all platforms?)
- LDLIBS += -lgcc_eh
+ LDLIBS += -liconv -lgcc_eh
   endif
 endif # gcc > 2

Some executables (esp. locale-specific utilities) need to link with the iconv library. Patch listed below. (Don't think it will matter that the link flag is given for all link commands.)
{noformat}
Index: etc/config/gcc.config
===================================================================
--- etc/config/gcc.config (revision 517771)
+++ etc/config/gcc.config (working copy)
@@ -127,7 +129,7 @@
   ifeq ($(OSNAME),Darwin)
     # link with gcc_eh to resolve the _Unwind_xxx functions
     # (shouldn't we link with it on all platforms?)
- LDLIBS += -lgcc_eh
+ LDLIBS += -liconv -lgcc_eh
   endif
 endif # gcc > 2

{noformat}
Patch Info [Patch Available]
Martin Sebor added a comment - 12/Mar/08 03:44 AM
Brad, can you check if the patch is still good an needed?

Btw., it would be nice if you could put together a list of the programs that need to link with libiconv and show what happens when they don't (linker errors? runtime problems? ...)


Martin Sebor made changes - 12/Mar/08 03:44 AM
Assignee Martin Sebor [ sebor ] Eric Lemings [ elemings ]
Eric Lemings added a comment - 13/Mar/08 09:46 PM
I believe this issue is no longer relevant (as the locale utilities seeminly link without a hitch) but I'm running into other problems while building so I'm not 100% sure of this.

Eric Lemings added a comment - 31/Mar/08 11:12 PM
I built the latest snapshot of trunk on both Tiger and Leopard, reviewed the build results, and did some test runs of the locale-related utilities. Found no evidence of these link errors nor any runtime errors. Going to close this issue. (Note to self: Give enough detail to reproduce the exact failure next time!)

Eric Lemings made changes - 31/Mar/08 11:13 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Cannot Reproduce [ 5 ]
Eric Lemings logged work - 31/Mar/08 11:14 PM
Time Worked: 2h
<No comment>
Eric Lemings made changes - 31/Mar/08 11:14 PM
Time Spent 2h [ 7200 ]
Remaining Estimate 2h [ 7200 ] 0h [ 0 ]
Eric Lemings added a comment - 02/Jun/08 07:26 PM - edited
I just ran into this again (or something similar).

Eric Lemings made changes - 02/Jun/08 07:26 PM
Resolution Cannot Reproduce [ 5 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Eric Lemings made changes - 03/Jun/08 03:50 PM
Fix Version/s 4.2.1 [ 12312690 ]
Fix Version/s 4.2.2 [ 12313096 ]
Eric Lemings added a comment - 03/Jun/08 08:25 PM
After further investigation, the error observed is related to a specific test rather than the linking in general. Will create a new issue to address the error.

Eric Lemings made changes - 03/Jun/08 08:25 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Invalid [ 6 ]