public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/43839]  New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
@ 2010-04-21 18:37 mrs at gcc dot gnu dot org
  2010-04-21 18:44 ` [Bug java/43839] " mrs at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 18:37 UTC (permalink / raw)
  To: java-prs

libjava doesn't link libgcj with -liconv during build when
--with-libiconv-prefix=/opt/local is used, and no corresponding -L for the
-liconv is issued on the link line when running the libjava testsuite (jni.exp)
for the FAIL: PR16923 run testcase:

Executing on host: /Users/mrs/net/gcc-java/gcc/xgcc
-B/Users/mrs/net/gcc-java/gcc/
/Users/mrs/net/gcc/libjava/testsuite/libjava.jni/invocation/PR16923.c  
-bind_at_load -multiply_defined suppress -I. -I..
-I/Users/mrs/net/gcc/libjava/testsuite/libjava.jni
-I/Users/mrs/net/gcc/libjava/testsuite/../include
-I/Users/mrs/net/gcc/libjava/testsuite/../classpath/include
-fdollars-in-identifiers
-L/Users/mrs/net/gcc-java/x86_64-apple-darwin10/./libjava/.libs -ljvm
-shared-libgcc -lgcj -liconv  -lm   -o PR16923    (timeout = 300)

The correct bit can be found in the Makefile:

$ grep LTLIBICO x86_64-apple-darwin10/libjava/Makefile 
LTLIBICONV = -L/opt/local/lib -liconv -R/opt/local/lib

The spec file appears it would work:
$ cat x86_64-apple-darwin10/libjava/libgcj.spec
[ ... ]
%rename lib liborig
*lib:  %{s-bc-abi:} -lgcj  -lm -L/opt/local/lib -liconv  -lpthread 
-allow_stack_execute \
 -ldl %(libgcc)  %(liborig)
[ ... ]

as well.

This was reported by Jack, in http://gcc.gnu.org/ml/java/2010-02/msg00003.html,
but seems unresolved.

xgcc (GCC) 4.5.0 20100324 (experimental) [trunk revision 157698]


-- 
           Summary: libjava incorrectly uses -liconv in testsuite, jni.exp
                    when using --with-libiconv-prefix
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrs at gcc dot gnu dot org
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
@ 2010-04-21 18:44 ` mrs at gcc dot gnu dot org
  2010-04-21 18:52 ` mrs at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 18:44 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from mrs at gcc dot gnu dot org  2010-04-21 18:44 -------
I think this is the root cause of PR43086.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
  2010-04-21 18:44 ` [Bug java/43839] " mrs at gcc dot gnu dot org
@ 2010-04-21 18:52 ` mrs at gcc dot gnu dot org
  2010-04-21 19:00 ` mrs at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 18:52 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from mrs at gcc dot gnu dot org  2010-04-21 18:52 -------
Found it:

  if { [istarget "*-*-darwin*"] } {
    lappend cxxflags -shared-libgcc -lgcj -liconv
  }

in libjava/testsuite/libjava.jni/jni.exp.  This needs the proper -L added just
before -liconv, or libgcj linked with -L... -liconv.  So, the question is,
which solution is desired?  Normally I like adding -liconv to the libgcj link
line, so that all consumers of libgcj just work.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
  2010-04-21 18:44 ` [Bug java/43839] " mrs at gcc dot gnu dot org
  2010-04-21 18:52 ` mrs at gcc dot gnu dot org
@ 2010-04-21 19:00 ` mrs at gcc dot gnu dot org
  2010-04-21 19:02 ` mrs at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 19:00 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from mrs at gcc dot gnu dot org  2010-04-21 19:00 -------
Nasty hack around:

Index: testsuite/libjava.jni/jni.exp
===================================================================
--- testsuite/libjava.jni/jni.exp       (revision 157698)
+++ testsuite/libjava.jni/jni.exp       (working copy)
@@ -267,7 +267,7 @@
   # to just make the linker find libgcc using -L options.
   # Similar logic applies to libgcj.
   if { [istarget "*-*-darwin*"] } {
-    lappend cxxflags -shared-libgcc -lgcj -liconv
+    lappend cxxflags -shared-libgcc -lgcj -L/opt/local/lib -liconv
   }

   if { [istarget "*-*-solaris*"] } {

seems to fix this issue.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-04-21 19:00 ` mrs at gcc dot gnu dot org
@ 2010-04-21 19:02 ` mrs at gcc dot gnu dot org
  2010-04-21 19:23 ` mrs at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 19:02 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from mrs at gcc dot gnu dot org  2010-04-21 19:02 -------
*** Bug 43086 has been marked as a duplicate of this bug. ***


-- 

mrs at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot med dot
                   |                            |uc dot edu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-04-21 19:02 ` mrs at gcc dot gnu dot org
@ 2010-04-21 19:23 ` mrs at gcc dot gnu dot org
  2010-04-21 19:26 ` mrs at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 19:23 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from mrs at gcc dot gnu dot org  2010-04-21 19:23 -------
Came in with http://gcc.gnu.org/ml/java-patches/2007-q4/msg00053.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-04-21 19:23 ` mrs at gcc dot gnu dot org
@ 2010-04-21 19:26 ` mrs at gcc dot gnu dot org
  2010-04-21 23:33 ` howarth at nitro dot med dot uc dot edu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-04-21 19:26 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from mrs at gcc dot gnu dot org  2010-04-21 19:26 -------
Ah, that wasn't the original work, just some mods along the way.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-04-21 19:26 ` mrs at gcc dot gnu dot org
@ 2010-04-21 23:33 ` howarth at nitro dot med dot uc dot edu
  2010-04-22  2:00 ` howarth at nitro dot med dot uc dot edu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-21 23:33 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from howarth at nitro dot med dot uc dot edu  2010-04-21 23:33 -------
This may be fixable with...

Index: testsuite/Makefile.in
===================================================================
--- testsuite/Makefile.in       (revision 158487)
+++ testsuite/Makefile.in       (working copy)
@@ -401,6 +401,7 @@
        @echo 'set host_triplet $(host_triplet)' >>site.tmp
        @echo 'set target_alias "$(target_alias)"' >>site.tmp
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit
##' >>site.tmp
        @test ! -f site.exp || \
          sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp

will test with current build.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2010-04-21 23:33 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-22  2:00 ` howarth at nitro dot med dot uc dot edu
  2010-04-22 22:07 ` howarth at nitro dot med dot uc dot edu
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-22  2:00 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from howarth at nitro dot med dot uc dot edu  2010-04-22 02:00 -------
This almost works...

Index: testsuite/Makefile.in
===================================================================
--- testsuite/Makefile.in       (revision 158624)
+++ testsuite/Makefile.in       (working copy)
@@ -401,6 +401,7 @@
        @echo 'set host_triplet $(host_triplet)' >>site.tmp
        @echo 'set target_alias "$(target_alias)"' >>site.tmp
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit
##' >>site.tmp
        @test ! -f site.exp || \
          sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
Index: testsuite/libjava.jni/jni.exp
===================================================================
--- testsuite/libjava.jni/jni.exp       (revision 158624)
+++ testsuite/libjava.jni/jni.exp       (working copy)
@@ -251,6 +251,7 @@
 }

 proc gcj_jni_get_cxxflags_invocation {} {
+  global libiconv
   global LIBJAVA
   if [info exists LIBJAVA] {
       set libjava $LIBJAVA;
@@ -267,7 +268,7 @@
   # to just make the linker find libgcc using -L options.
   # Similar logic applies to libgcj.
   if { [istarget "*-*-darwin*"] } {
-    lappend cxxflags -shared-libgcc -lgcj -liconv
+    lappend cxxflags "-shared-libgcc -lgcj $libiconv"
   }

   if { [istarget "*-*-solaris*"] } {

However it ends up compiling...

xecuting on host:
/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/gcc/
/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/libjava.jni/invocation/PR16923.c
  -bind_at_load -multiply_defined suppress -I. -I..
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/libjava.jni
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/../include
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/../classpath/include
-fdollars-in-identifiers
-L/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/x86_64-apple-darwin10.3.0/./libjava/.libs
-ljvm {-shared-libgcc -lgcj -L/sw/lib -liconv}  -lm   -o PR16923    (timeout =
300)
xgcc: unrecognized option '-shared-libgcc -lgcj -L/sw/lib -liconv'^M
output is:
xgcc: unrecognized option '-shared-libgcc -lgcj -L/sw/lib -liconv'^M

I don't understand why $libiconv in jni.exp gets expanded as...

 {-shared-libgcc -lgcj -L/sw/lib -liconv}

instead of just...

-shared-libgcc -lgcj -L/sw/lib -liconv.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2010-04-22  2:00 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-22 22:07 ` howarth at nitro dot med dot uc dot edu
  2010-05-03 22:38 ` mrs at gcc dot gnu dot org
  2010-06-09 17:21 ` mrs at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-22 22:07 UTC (permalink / raw)
  To: java-prs



------- Comment #9 from howarth at nitro dot med dot uc dot edu  2010-04-22 22:07 -------
Created an attachment (id=20465)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20465&action=view)
proposed patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2010-04-22 22:07 ` howarth at nitro dot med dot uc dot edu
@ 2010-05-03 22:38 ` mrs at gcc dot gnu dot org
  2010-06-09 17:21 ` mrs at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-05-03 22:38 UTC (permalink / raw)
  To: java-prs



------- Comment #10 from mrs at gcc dot gnu dot org  2010-05-03 22:38 -------
Subject: Bug 43839

Author: mrs
Date: Mon May  3 22:37:50 2010
New Revision: 159009

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159009
Log:
        PR 43839
        * testsuite/Makefile.am: Override automake for site.exp creation
        and add entry to set libiconv.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
        Add new global variable libiconv to handle alternative libiconv
        locations.

Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/testsuite/Makefile.am
    trunk/libjava/testsuite/Makefile.in
    trunk/libjava/testsuite/libjava.jni/jni.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
  2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2010-05-03 22:38 ` mrs at gcc dot gnu dot org
@ 2010-06-09 17:21 ` mrs at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-06-09 17:21 UTC (permalink / raw)
  To: java-prs



------- Comment #11 from mrs at gcc dot gnu dot org  2010-06-09 17:21 -------
Fixed.


-- 

mrs at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-06-09 17:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 18:37 [Bug java/43839] New: libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix mrs at gcc dot gnu dot org
2010-04-21 18:44 ` [Bug java/43839] " mrs at gcc dot gnu dot org
2010-04-21 18:52 ` mrs at gcc dot gnu dot org
2010-04-21 19:00 ` mrs at gcc dot gnu dot org
2010-04-21 19:02 ` mrs at gcc dot gnu dot org
2010-04-21 19:23 ` mrs at gcc dot gnu dot org
2010-04-21 19:26 ` mrs at gcc dot gnu dot org
2010-04-21 23:33 ` howarth at nitro dot med dot uc dot edu
2010-04-22  2:00 ` howarth at nitro dot med dot uc dot edu
2010-04-22 22:07 ` howarth at nitro dot med dot uc dot edu
2010-05-03 22:38 ` mrs at gcc dot gnu dot org
2010-06-09 17:21 ` mrs 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).