From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9991 invoked by alias); 6 Oct 2010 16:07:06 -0000 Received: (qmail 9981 invoked by uid 22791); 6 Oct 2010 16:07:05 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_FJ,TW_GC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Oct 2010 16:06:59 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o96G6v43007999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Oct 2010 12:06:57 -0400 Received: from zebedee.pink (ovpn-113-67.phx2.redhat.com [10.3.113.67]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o96G6t28010319; Wed, 6 Oct 2010 12:06:56 -0400 Message-ID: <4CAC9E9F.6010802@redhat.com> Date: Wed, 06 Oct 2010 16:07:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: Andreas Frisch CC: java@gcc.gnu.org Subject: Re: gcj static crosscompiling raises issues with boehm-gc References: <20101006154451.913B63148A7C@mail.multimedia-labs.de> In-Reply-To: <20101006154451.913B63148A7C@mail.multimedia-labs.de> Content-Type: text/plain; charset=ISO-8859-1 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/msg00004.txt.bz2 On 10/06/2010 04:44 PM, Andreas Frisch wrote: >> This looks completely broken: it seems to be trying to statically link >> gainst libgcj. Try it without -non_shared. > > Hi Andrew, thanks for your prompt help! > linking statically against libgcj is what i actually intend to do to save a > lot of space on the embedded device with very limited capacity. That is really hard to get working. It can be done, but you should at least get dynamic linking working first. > other than that, if i omit the -non_shared parameter, then it doesn't seem to > find the aacskeys.so which is a run-time include of in one of the java files > where it does a System.loadLibrary("aacskeys"); It'll be fibn as long as it's in the load path. You might be better using a full path to the library. > the resulting error message is the infamous > /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 0000000000406960 Are you forgetting to compile with -jni ? -fjni With gcj there are two options for writing native methods: CNI and JNI. By default gcj assumes you are using CNI. If you are compiling a class with native methods, and these methods are implemented using JNI, then you must use "-fjni". This option causes gcj to generate stubs which will invoke the underlying JNI methods. Andrew.