Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-15-2003, 07:34 PM   #1
LQ Newbie
Registered: Oct 2002
Location: St. Petersburg , Florida
Distribution: Red Hat 7.3
Posts: 7

Rep: Reputation: 0
Unhappy gcc, gcj, and java problems

Ok, so I upgraded to GCC 3.3 to play with the java (gcj), but I am having some problems.

The C, C++ compilers work fine, but not Java going to native code directly

//Program - Test (
public class HelloWorld {
public static void main(String [] args) {

I can compile into byte code (class files) and then use Sun's JRE (1.4.1)
[weppnesp@hildegard2 java]$ gcj -C
[weppnesp@hildegard2 java]$ java HelloWorld

Now native compiling screws up:
[weppnesp@hildegard2 java]$ gcj -c
[weppnesp@hildegard2 java]$ gcj --main=HelloWorld HelloWorld.o
[weppnesp@hildegard2 java]$ a.out
Segmentation fault
[weppnesp@hildegard2 java]$ gcj -C
[weppnesp@hildegard2 java]$ gcj --main=HelloWorld HelloWorld.class
[weppnesp@hildegard2 java]$ a.out
Segmentation fault
Anybody see this before, i did a rather standard install with options in the configure program for GCC, but this was my first upgrade.

Ok, also notice also no core dumps, so please tell me how to get them so i can use GDB. I tried to comment out the following in /etc/profile and then sourced it but no avail....
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

Cheers, Thanks in Advance. Steve


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java (Sun, Eclipse, gcj, ...) rpz Linux - Software 3 08-08-2005 10:02 PM
GCJ:Java is not anymore inerpeted? NCC-1701&NCC-1701-D Programming 4 07-02-2005 02:52 PM
Sun Java not GCJ untwisted Linux - Software 6 06-16-2005 05:18 PM
installed gcc with java language enabled.. but no gcj ! qwijibow Linux - Software 3 10-15-2004 04:24 PM
gcc/gcj and classpath on knoppix 3.6 (debian) oeri Programming 2 09-16-2004 02:38 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration