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 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 added a comment - 12/Mar/08 03:41 AM
Disabled formatting. Patch is available inline.

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? ...)


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 added a comment - 02/Jun/08 07:26 PM - edited
I just ran into this again (or something similar).

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.