From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7993 invoked by alias); 6 Oct 2010 17:58:49 -0000 Received: (qmail 7980 invoked by uid 22791); 6 Oct 2010 17:58:47 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_GC,TW_LG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail3.caviumnetworks.com (HELO mail3.caviumnetworks.com) (12.108.191.235) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Oct 2010 17:58:41 +0000 Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with MailMarshal (v6,7,2,8378) id ; Wed, 06 Oct 2010 10:59:14 -0700 Received: from caexch01.caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 6 Oct 2010 10:58:47 -0700 Received: from dd1.caveonetworks.com ([12.108.191.236]) by caexch01.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 6 Oct 2010 10:58:47 -0700 Message-ID: <4CACB8D0.7060604@caviumnetworks.com> Date: Wed, 06 Oct 2010 17:58:00 -0000 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 MIME-Version: 1.0 To: Andreas Frisch , Java List Subject: Re: gcj static crosscompiling raises issues with boehm-gc References: <20101006175323.A6AC03148D76@mail.multimedia-labs.de> In-Reply-To: <20101006175323.A6AC03148D76@mail.multimedia-labs.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00007.txt.bz2 Normally I leave the list CCed. It is my personal policy not to respond to private messages of this nature, but I am making an exception for this one. On 10/06/2010 10:53 AM, Andreas Frisch wrote: >> Things can get complicated when linking in C++ code with the gcj driver >> program. I would think all you would need is -lsupc++, and perhaps >> -lstdc++. >> >> -nostdlib looks a bit questionable to me. >> >> In any event it is good to see that people are still making use of gcj >> on mips. >> >> David Daney > > dear David, > > yeah it actually comes in very handy! if it just wasn't so tricky to use. > okay soo where do i start... i mean i've literally spent a week trying to get > this to link properly and i've tried maaaany combinations of the parameters > > i'll just put in some command lines along with excerpts of the respective > error messages > > --main=dumphd.core.DumpHD -static-libgcj > -L/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe-linux/usr/lib \ > -L/dream/projects/bluray/aacskeys-0.4.0c-mipsel/lib/linux/ \ > -Wl,-rpath-link,/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe- > linux/usr/lib \ > -Wl,-rpath-link,/dream/projects/bluray/aacskeys-0.4.0c- > mipsel/lib/linux/ -laacskeys \ > -Wl,-non_shared \ > -Wl,-lstdc++ -lsupc++ > > 10 problems (10 warnings) > /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe- > linux/4.4.4/../../../../mipsel-oe-linux/bin/ld: cannot find -lgcc_s > > *** > > --main=dumphd.core.DumpHD -static-libgcj \ > -nostdlib \ > -L/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe-linux/usr/lib \ > -L/dream/projects/bluray/aacskeys-0.4.0c-mipsel/lib/linux/ \ > -Wl,-rpath-link,/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe- > linux/usr/lib \ > -Wl,-rpath-link,/dream/projects/bluray/aacskeys-0.4.0c- > mipsel/lib/linux/ -laacskeys \ > -Wl,-lstdc++ -lsupc++ > > 10 problems (10 warnings) > /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe- > linux/4.4.4/../../../../mipsel-oe-linux/bin/ld: warning: libgcc_s.so.1, needed > by /dream/projects/bluray/aacskeys-0.4.0c-mipsel/lib/linux//libaacskeys.so, > not found (try using -rpath or -rpath-link) > /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe- > linux/4.4.4/../../../../mipsel-oe-linux/bin/ld: warning: cannot find entry > symbol __start; defaulting to 00000000004015d0 > /tmp/cclqdxg7.o: In function `bdvm::vm::BDVMException::BDVMException()': > ./source/bdvm/vm/BDVMException.java:(.text+0x2c): undefined reference to > `java::lang::Exception::Exception()' > /tmp/cclqdxg7.o: In function > `bdvm::vm::BDVMException::BDVMException(java::lang::String*)': > ./source/bdvm/vm/BDVMException.java:(.text+0x8c): undefined reference to > `java::lang::Exception::Exception(java::lang::String*)' > /tmp/cclqdxg7.o: In function > `bdvm::vm::BDVMException::BDVMException(java::lang::String*, > java::lang::Throwable*)': > ./source/bdvm/vm/BDVMException.java:(.text+0x100): undefined reference to > `java::lang::Exception::Exception(java::lang::String*, > java::lang::Throwable*)' > /tmp/cclqdxg7.o: In function > `bdvm::vm::BDVMException::BDVMException(java::lang::Throwable*)': > ./source/bdvm/vm/BDVMException.java:(.text+0x160): undefined reference to > `java::lang::Exception::Exception(java::lang::Throwable*)' > /tmp/cclqdxg7.o: In function > `dumphd::bdplus::ConversionTable::ConversionTable()': > ./source/bdvm/vm/BDVMException.java:(.text+0x1b4): undefined reference to > `java::lang::Object::Object()' > ./source/bdvm/vm/BDVMException.java:(.text+0x1cc): undefined reference to > `java::util::ArrayList::class$' > 6000+ similar undefined refs > > *** > > --main=dumphd.core.DumpHD -static-libgcj \ > -L/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe-linux/usr/lib \ > -L/dream/projects/bluray/aacskeys-0.4.0c-mipsel/lib/linux/ \ > -Wl,-rpath-link,/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe- > linux/usr/lib \ > -Wl,-rpath-link,/dream/projects/bluray/aacskeys-0.4.0c- > mipsel/lib/linux/ -laacskeys \ > -Wl,-lstdc++ -lsupc++ > > 10 problems (10 warnings) > /tmp/ccWdYPef.o:(.data+0x5638): undefined reference to `hidden alias for > java::lang::String* dumphd::aacs::AACSKeys::getVersionString()' > /tmp/ccWdYPef.o:(.data+0x563c): undefined reference to `hidden alias for void > dumphd::aacs::AACSKeys::getKeys(java::lang::String*, dumphd::core::KeyData*)' > /tmp/ccWdYPef.o:(.data+0x5680): undefined reference to `hidden alias for > java::lang::String* dumphd::aacs::AACSKeys::getVersionString()' > /tmp/ccWdYPef.o:(.data+0x5694): undefined reference to `hidden alias for void > dumphd::aacs::AACSKeys::getKeys(java::lang::String*, dumphd::core::KeyData*)' > collect2: ld returned 1 exit status > > > the parameter set in my original post (with the boehm-gc errors) led me the > farthest, as far as i can tell. at least there were no complaints about > linking the java sources and that c++ library, possible though that it failed > in an earlier state of the linking process - i don't really know > > still open for more suggestions, i am available on instant messangers or irc > too for live trial and error experiments :) > andy@snaut.ath.cx thorugh jabber/xmpp or fraxinas on ircnet or freenode irc The GCJ IRC channel typically has the highest concentration of gcj experts available on this planet. David Daney