From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22382 invoked by alias); 23 Jul 2009 21:39:12 -0000 Received: (qmail 22359 invoked by uid 22791); 23 Jul 2009 21:39:10 -0000 X-SWARE-Spam-Status: No, hits=2.9 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_34,J_CHICKENPOX_46,J_CHICKENPOX_71 X-Spam-Check-By: sourceware.org Received: from mail.directdreams.com (HELO mail.directdreams.com) (217.17.33.138) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Jul 2009 21:39:04 +0000 Received: from [192.168.1.14] (cln103.neoplus.adsl.tpnet.pl [83.31.115.103]) (authenticated bits=0) by mail.directdreams.com (8.13.1/8.13.1) with ESMTP id n6NLcoSt005348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Jul 2009 23:39:01 +0200 Message-ID: <4A68D868.3030903@directdreams.com> Date: Thu, 23 Jul 2009 21:39:00 -0000 From: "Piotr D. Kaczorowski" User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: java@gcc.gnu.org Subject: [GCC 4.4.0 / 4.4.1] GCJ - ecj1: undefined symbol: JvRunMainName, In function `_Jv_platform_nanotime()': undefined reference to "clock_gettime" Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-07/txt/msg00057.txt.bz2 Hello there! I'd like to build GCC 4.4.1 with GCJ on Centos 5.3 and have some problems with that. Description: I'm using vanilla gcc source with gmp-4.2.4 and mpfr-2.3.2. This is my configuration line: ./configure --program-suffix=44 --enable-languages=c,c++,java --with-ecj-jar=/usr/src/ecj/ecj.jar ecj.jar is from FC11. GCC 4.4 with GCJ works on that system. Problems: 1) undefined symbol: JvRunMainName [piotr@localhost gcj-3]$ gcj44 Foo.java /usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.1/ecj1: symbol lookup error: /usr/local/libexec/gcc/i686-pc-linux-gnu/4.4.1/ecj1: undefined symbol: JvRunMainName 2) static linking (http://gcc.gnu.org/wiki/Statically_linking_libgcj) Small program: public class Foo { public static void main(String args[]) { System.out.println("Hello."); } } [piotr@localhost gcj-3]$ gcj -c Foo.java [piotr@localhost gcj-3]$ gcj --main=Foo -save-temps Foo.java [piotr@localhost gcj-3]$ gcc -o Foo Foo.o Foomain.i -shared-libgcc -Wl,-non_shared -lgcj -Wl,-call_shared -lsupc++ -Wl,--as-needed -lz -lgcc_s -lpthread -lc -lm -ldl -Wl,--no-as-needed /usr/local/lib/libgcj.a(posix.o): In function `_Jv_platform_nanotime()': posix.cc:(.text+0xa0): undefined reference to `clock_gettime' collect2: ld returned 1 exit status How can I overcome those problems? Regards, Piotr