public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required
@ 2008-05-11 14:12 tprince at computer dot org
2008-05-11 15:58 ` [Bug libstdc++/36211] " tprince at computer dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: tprince at computer dot org @ 2008-05-11 14:12 UTC (permalink / raw)
To: gcc-bugs
libstdc++ testsuite cases which require libiconv fail on account of trying the
wrong choice in __iconv_adaptor:
/cygdrive/c/gnu/gcc-4.4-20080509/xp/i686-pc-cygwin/libstdc++-v3/include/ext/code
cvt_specializations.h:302: undefined reference to `_libiconv'^M
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft,
char*
* outbuf, size_t *outbytesleft);
--
Summary: __iconv_adaptor chooses char** where const char** is
required
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tprince at computer dot org
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
@ 2008-05-11 15:58 ` tprince at computer dot org
2008-05-11 17:14 ` paolo dot carlini at oracle dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: tprince at computer dot org @ 2008-05-11 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tprince at computer dot org 2008-05-11 15:57 -------
2 unicode.cc tests fail. Several other tests with -liconv pass.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
2008-05-11 15:58 ` [Bug libstdc++/36211] " tprince at computer dot org
@ 2008-05-11 17:14 ` paolo dot carlini at oracle dot com
2008-05-11 17:16 ` pcarlini at suse dot de
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-05-11 17:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2008-05-11 17:13 -------
Why, exactly, do you believe the problem is with the const? The code and the
comment in codecvt_specializations.h appear to indicate that we are already
dealing correctly with the issue and indeed you are reporting that other tests
link fine...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dannysmith at users dot
| |sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
2008-05-11 15:58 ` [Bug libstdc++/36211] " tprince at computer dot org
2008-05-11 17:14 ` paolo dot carlini at oracle dot com
@ 2008-05-11 17:16 ` pcarlini at suse dot de
2008-05-11 17:27 ` tprince at computer dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pcarlini at suse dot de @ 2008-05-11 17:16 UTC (permalink / raw)
To: gcc-bugs
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (2 preceding siblings ...)
2008-05-11 17:16 ` pcarlini at suse dot de
@ 2008-05-11 17:27 ` tprince at computer dot org
2008-05-11 17:32 ` paolo dot carlini at oracle dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: tprince at computer dot org @ 2008-05-11 17:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tprince at computer dot org 2008-05-11 17:26 -------
I see that the failing case is looking for a libiconv in the library to match
the char ** prototype, and failing to find one, while the one in the actual
library is set up for the const char ** version. The comment in
codecvt_specializations.h indicates this should be taken care of by
__iconv_adaptor, yet the link failure shows this is not working.
I don't understand the usage well enough to know what to conclude, why some
cases (do they also exercise __iconv_adaptor ?) work, while the unicode.cc
cases fail to link at that point.
This problem has been brought up by others in mail lists, but as far as I know
no one wrote up a PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (3 preceding siblings ...)
2008-05-11 17:27 ` tprince at computer dot org
@ 2008-05-11 17:32 ` paolo dot carlini at oracle dot com
2008-05-11 18:05 ` tprince at computer dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-05-11 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2008-05-11 17:31 -------
Please add pointers to the discussions on those mailing lists.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (4 preceding siblings ...)
2008-05-11 17:32 ` paolo dot carlini at oracle dot com
@ 2008-05-11 18:05 ` tprince at computer dot org
2008-05-11 18:14 ` paolo dot carlini at oracle dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: tprince at computer dot org @ 2008-05-11 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tprince at computer dot org 2008-05-11 18:04 -------
Only the gcc-testresults reports where others report the same thing are clearly
relevant:
http://gcc.gnu.org/ml/gcc-testresults/2008-03/msg01444.html
http://gcc.gnu.org/ml/gcc-testresults/2007-05/msg01528.html
In other cases, the poster did not provide sufficient information to establish
conclusively it was the same problem.
It is generally not reported in testresults whether libstdc++ tests were run
with libiconv installed. If libiconv is not installed, none of these tests are
attempted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (5 preceding siblings ...)
2008-05-11 18:05 ` tprince at computer dot org
@ 2008-05-11 18:14 ` paolo dot carlini at oracle dot com
2008-05-11 22:46 ` dannysmith at users dot sourceforge dot net
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-05-11 18:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo dot carlini at oracle dot com 2008-05-11 18:13 -------
Frankly, we badly need more details and/or the help of a cygwin maintainer,
because by looking statically at the code I don't see how possibly
__iconv_adaptor can be wrong and most (all?) the active libstdc++ maintainers
do not have a cygwin machine available.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (6 preceding siblings ...)
2008-05-11 18:14 ` paolo dot carlini at oracle dot com
@ 2008-05-11 22:46 ` dannysmith at users dot sourceforge dot net
2008-05-12 1:59 ` tprince at computer dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2008-05-11 22:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dannysmith at users dot sourceforge dot net 2008-05-11 22:46 -------
Following is with mingw but it applies to cygwin as well
This is the command line from log for FAILing 22_locale/locale/cons/unicode.cc
Executing on host: /develop/svn/trunk/build/./gcc/g++ -shared-libgcc
-B/develop/svn/trunk/build/./gcc -nostdinc++
-L/develop/svn/trunk/build/mingw32/libstdc++-v3/src
-L/develop/svn/trunk/build/mingw32/libstdc++-v3/src/.libs
-L/develop/svn/trunk/build/mingw32/winsup/mingw
-L/develop/svn/trunk/build/mingw32/winsup/w32api/lib -isystem
/develop/svn/trunk/src/winsup/mingw/include -isystem
/develop/svn/trunk/src/winsup/w32api/include -B/mingw/mingw32/bin/
-B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem
/mingw/mingw32/sys-include -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0
-ffunction-sections -fdata-sections -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++
-I/develop/svn/trunk/build/mingw32/libstdc++-v3/include/mingw32
-I/develop/svn/trunk/build/mingw32/libstdc++-v3/include
-I/develop/svn/trunk/src/libstdc++-v3/libsupc++
-I/develop/svn/trunk/src/libstdc++-v3/include/backward
-I/develop/svn/trunk/src/libstdc++-v3/testsuite/util -Wl,--gc-sections
/mingw/lib/libiconv.a
/develop/svn/trunk/src/libstdc++-v3/testsuite/22_locale/locale/cons/unicode.cc
-include bits/stdc++.h ./libtestc++.a -lm -o ./unicode.exe (timeout =
600)
Note that although the correct libiconv "/mingw/lib/libiconv.a" is passed to
linker, it is passed *before* the objects and libraries that reference
libiconv symbols.
With PE-COFF, the order of objects really does matter and since the libiconv
symbols have not yet been referenced when the linker looks at the lib, the
symbols are not resolved. They are not resolved lazily as is possible in ELF
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (7 preceding siblings ...)
2008-05-11 22:46 ` dannysmith at users dot sourceforge dot net
@ 2008-05-12 1:59 ` tprince at computer dot org
2009-05-14 3:24 ` billingd at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: tprince at computer dot org @ 2008-05-12 1:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from tprince at computer dot org 2008-05-12 01:58 -------
Yes, -liconv precedes the source file, where it must follow:
Executing on host: /cygdrive/c/gnu/gcc-4.4-20080509/xp/./gcc/g++ -shared-libgcc
-B/cygdrive/c/gnu/gcc-4.4-20080509/xp/./gcc -nostdinc++
-L/cygdrive/c/gnu/gcc-4.
4-20080509/xp/i686-pc-cygwin/libstdc++-v3/src
-L/cygdrive/c/gnu/gcc-4.4-20080509
/xp/i686-pc-cygwin/libstdc++-v3/src/.libs
-B/usr/local/gcc44/i686-pc-cygwin/bin/
-B/usr/local/gcc44/i686-pc-cygwin/lib/ -isystem
/usr/local/gcc44/i686-pc-cygwin
/include -isystem /usr/local/gcc44/i686-pc-cygwin/sys-include -g -O2
-D_GLIBCXX_
ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2
-D
LOCALEDIR="." -nostdinc++
-I/cygdrive/c/gnu/gcc-4.4-20080509/xp/i686-pc-cygwin/l
ibstdc++-v3/include/i686-pc-cygwin
-I/cygdrive/c/gnu/gcc-4.4-20080509/xp/i686-pc
-cygwin/libstdc++-v3/include
-I/cygdrive/c/gnu/gcc-4.4-20080509/libstdc++-v3/lib
supc++ -I/cygdrive/c/gnu/gcc-4.4-20080509/libstdc++-v3/include/backward
-I/cygdr
ive/c/gnu/gcc-4.4-20080509/libstdc++-v3/testsuite/util -Wl,--gc-sections
-liconv
/cygdrive/c/gnu/gcc-4.4-20080509/libstdc++-v3/testsuite/22_locale/locale/cons/u
nicode.cc -include bits/stdc++.h ./libtestc++.a -o ./unicode.exe
(time
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (8 preceding siblings ...)
2008-05-12 1:59 ` tprince at computer dot org
@ 2009-05-14 3:24 ` billingd at gcc dot gnu dot org
2009-05-14 21:51 ` billingd at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-14 3:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from billingd at gcc dot gnu dot org 2009-05-14 03:24 -------
Draft patch http://gcc.gnu.org/ml/libstdc++/2009-05/msg00090.html
--
billingd at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |billingd at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (9 preceding siblings ...)
2009-05-14 3:24 ` billingd at gcc dot gnu dot org
@ 2009-05-14 21:51 ` billingd at gcc dot gnu dot org
2009-05-15 9:24 ` billingd at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-14 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from billingd at gcc dot gnu dot org 2009-05-14 21:51 -------
Patch is approved - http://gcc.gnu.org/ml/libstdc++/2009-05/msg00098.html
--
billingd at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |billingd at gcc dot gnu dot
|dot org |org
Status|WAITING |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-05-14 21:51:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (10 preceding siblings ...)
2009-05-14 21:51 ` billingd at gcc dot gnu dot org
@ 2009-05-15 9:24 ` billingd at gcc dot gnu dot org
2009-05-21 11:31 ` billingd at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-15 9:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from billingd at gcc dot gnu dot org 2009-05-15 09:24 -------
Subject: Bug 36211
Author: billingd
Date: Fri May 15 09:23:58 2009
New Revision: 147565
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147565
Log:
2009-05-15 David Billinghurst <billingd@gcc.gnu.org>
PR libstdc++/36211
* testsuite/lib/libstdc++.exp(v3_target_compile): Add
cxxldflags to additional_flags rather than cxx_final.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (11 preceding siblings ...)
2009-05-15 9:24 ` billingd at gcc dot gnu dot org
@ 2009-05-21 11:31 ` billingd at gcc dot gnu dot org
2009-05-21 11:32 ` billingd at gcc dot gnu dot org
2009-05-21 11:36 ` billingd at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-21 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from billingd at gcc dot gnu dot org 2009-05-21 11:31 -------
Subject: Bug 36211
Author: billingd
Date: Thu May 21 11:30:55 2009
New Revision: 147762
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147762
Log:
2009-05-21 David Billinghurst <billingd@gcc.gnu.org>
Backport from mainline:
PR libstdc++/36211
* testsuite/lib/libstdc++.exp(v3_target_compile): Add
cxxldflags to additional_flags rather than cxx_final.
Modified:
branches/gcc-4_4-branch/libstdc++-v3/ChangeLog
branches/gcc-4_4-branch/libstdc++-v3/testsuite/lib/libstdc++.exp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (12 preceding siblings ...)
2009-05-21 11:31 ` billingd at gcc dot gnu dot org
@ 2009-05-21 11:32 ` billingd at gcc dot gnu dot org
2009-05-21 11:36 ` billingd at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-21 11:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from billingd at gcc dot gnu dot org 2009-05-21 11:32 -------
Fixed in 4.4 and trunk.
--
billingd at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/36211] __iconv_adaptor chooses char** where const char** is required
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
` (13 preceding siblings ...)
2009-05-21 11:32 ` billingd at gcc dot gnu dot org
@ 2009-05-21 11:36 ` billingd at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-21 11:36 UTC (permalink / raw)
To: gcc-bugs
--
billingd at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36211
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-05-21 11:36 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-11 14:12 [Bug libstdc++/36211] New: __iconv_adaptor chooses char** where const char** is required tprince at computer dot org
2008-05-11 15:58 ` [Bug libstdc++/36211] " tprince at computer dot org
2008-05-11 17:14 ` paolo dot carlini at oracle dot com
2008-05-11 17:16 ` pcarlini at suse dot de
2008-05-11 17:27 ` tprince at computer dot org
2008-05-11 17:32 ` paolo dot carlini at oracle dot com
2008-05-11 18:05 ` tprince at computer dot org
2008-05-11 18:14 ` paolo dot carlini at oracle dot com
2008-05-11 22:46 ` dannysmith at users dot sourceforge dot net
2008-05-12 1:59 ` tprince at computer dot org
2009-05-14 3:24 ` billingd at gcc dot gnu dot org
2009-05-14 21:51 ` billingd at gcc dot gnu dot org
2009-05-15 9:24 ` billingd at gcc dot gnu dot org
2009-05-21 11:31 ` billingd at gcc dot gnu dot org
2009-05-21 11:32 ` billingd at gcc dot gnu dot org
2009-05-21 11:36 ` billingd at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).