This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Jv_CreateJavaVM problems
- From: steve <steve at netfuel dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 03 Jun 2003 14:36:45 -0500
- Subject: Re: Jv_CreateJavaVM problems
- Organization: Netfuel
- References: <3E8C576F.7000503@netfuel.com> <1049385862.14533.5.camel@keel.futureroute.co.uk> <3E8C5EB0.3090002@netfuel.com> <3ECD2848.1060107@netfuel.com>
Here is a very simple program what fails. I hope you guys can fix this
soon. I would be willing to accept a work around if there is one. If it
is already fixed please let us know or update the PR.
Thanks
Steve
[steve@pascal native]$ cat junk.cpp
#include <gcj/cni.h>
int main(int argc, char *argv[])
{
JvCreateJavaVM(argv[0]);
}
[steve@pascal native]$ gcc -o junk junk.cpp -lgcj -static -ldl -lpthread
[steve@pascal native]$ ./junk
[steve@pascal native]$ gcc -o junk junk.cpp -lgcj
[steve@pascal native]$ ./junk
Segmentation fault
[steve@pascal native]$
Just to make sure that I am not getting some other version of libgcj.
[root@pascal root]# find / -name libgcj.so
/opt/gcc-3.3/lib/libgcj.so
[root@pascal root]#
echo $LD_LIBRARY_PATH
/opt/gcc-3.3/lib
[steve@pascal native]$ gcc -v
Reading specs from /opt/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../configure --prefix /opt/gcc-3.3
Thread model: posix
gcc version 3.3
steve wrote:
I have been working with the 3.3 release of gcc.
If you compile using -static -lpthread -ldl -lgcj it works with and with
out the work around mentioned below.
However I can not get the dynamically liked version to work at all.
Still have the same problem mentions if PR 8685.
Thanks
Steve