From: "Piotr D. Kaczorowski" <piotr.kaczorowski@directdreams.com>
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"
Date: Thu, 23 Jul 2009 21:39:00 -0000 [thread overview]
Message-ID: <4A68D868.3030903@directdreams.com> (raw)
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
next reply other threads:[~2009-07-23 21:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 21:39 Piotr D. Kaczorowski [this message]
2009-07-24 9:09 ` Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A68D868.3030903@directdreams.com \
--to=piotr.kaczorowski@directdreams.com \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).