Bug 47456 - internal compiler error: Segmentation fault while using jna
Summary: internal compiler error: Segmentation fault while using jna
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 11:19 UTC by steve.reinke
Modified: 2012-01-10 16:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-01-26 00:20:46


Attachments
the jar which trys to load the dll (7.26 KB, application/java-archive)
2011-01-31 08:47 UTC, steve.reinke
Details
batch file for compiling (157 bytes, application/octet-stream)
2011-01-31 08:48 UTC, steve.reinke
Details
the dll i try to load (13.01 KB, application/octet-stream)
2011-01-31 08:49 UTC, steve.reinke
Details
the src file for the jar (3.84 KB, text/java)
2011-02-01 14:28 UTC, steve.reinke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description steve.reinke 2011-01-25 11:19:45 UTC
i tried to use the java native compiler 1.1.1 application for compiling java code to native code. i use gcj for compiling for windows.
in the application i use jna. in the line where i try to load the dmx4all.dll the compiler breaks with the following error:

creating "Main.exe" for Windows
- processing 3D_Viewer_NEW.jar
	de/fraunhofer/iws/dmxcontrol/DMXControl.java:29: internal compiler error:
        Segmentation fault
	Please submit a full bug report,
	with preprocessed source if appropriate.
	See <URL:http://gcc.gnu.org/bugs.html> for instructions.

failed...

that's why I'm reporting this bug. can you help me or fix this bug so that i can compile my project?

the version of the compiler is "gcc-122233-win.zip". i got it from your homepage.

regards

steve reinke
Comment 1 Andrew Pinski 2011-01-26 00:20:46 UTC
Can you provide the exact output of "gcc -v"?  And also attach the jar file which you are trying to compile with the exact command line?
Comment 2 steve.reinke 2011-01-26 06:32:43 UTC
the out put of "gcj -v" is the following:

C:\Dokumente und Einstellungen\reinke\Desktop\JavaNativeCompiler-1.1.1\libs\win\
gcc-122233-win\bin>gcj -v
Using built-in specs.
Reading specs from c:/dokumente und einstellungen/reinke/desktop/javanativecompi
ler-1.1.1/libs/win/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.0/../../../
libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i686-pc-mingw32
Configured with: /usr/local/src/gcc/configure --prefix=/home/Marco/Desktop/compi
le-win-win/gcc-XYZXYZ-win --with-sysroot=/home/Marco/Desktop/compile-win-win/gcc
-XYZXYZ-win/sys-root --build=i686-pc-linux-gnu --host=i686-pc-mingw32 --target=i
686-pc-mingw32 --enable-languages=c,c++,java --enable-libgcj --disable-shared --
with-gnu-as --with-gnu-ld --disable-nls --disable-debug --disable-checking --ena
ble-threads=win32 --disable-win32-registry --enable-java-gc=boehm --enable-java-
maintainer-mode --with-gmp=/home/Marco/Desktop/compile-win-win/gmp-out --with-mp
fr=/home/Marco/Desktop/compile-win-win/mpfr-out --enable-sjlj-exceptions --with-
build-sysroot=/home/Marco/Desktop/compile-win-win/gcc-XYZXYZ-win/sys-root --with
-gcj=i686-pc-mingw32-gcj
Thread model: win32
gcc version 4.3.0 20070222 (experimental)
Comment 3 steve.reinke 2011-01-26 06:57:14 UTC
i can't attach the jar file but i can add the line where the error occurs.

line 29:

DMXLibrary INSTANCE = (DMXLibrary) Native.loadLibrary("DMX4ALL",
				DMXLibrary.class);
Comment 4 steve.reinke 2011-01-27 11:31:50 UTC
is anybody there who can help me?
Comment 5 Mikael Pettersson 2011-01-27 12:05:32 UTC
(In reply to comment #4)
> is anybody there who can help me?

You need to supply a test case.  If not the original application then something similar that triggers the same error.
Comment 6 steve.reinke 2011-01-31 08:47:55 UTC
Created attachment 23174 [details]
the jar which trys to load the dll
Comment 7 steve.reinke 2011-01-31 08:48:43 UTC
Created attachment 23175 [details]
batch file for compiling
Comment 8 steve.reinke 2011-01-31 08:49:04 UTC
Created attachment 23176 [details]
the dll i try to load
Comment 9 steve.reinke 2011-02-01 07:52:46 UTC
i added a testcase...
i hope anybody can help me now, please...
Comment 10 Mikael Pettersson 2011-02-01 09:40:18 UTC
Your test case requires using binaries without sources on Win32.

You can:

1. Try a newer gcc, preferably 4.5.2.  Your pre-4.3.0 development snapshot is ancient and likely to contain bugs which have since been fixed.

2. Supply a test case in source form.
Comment 11 steve.reinke 2011-02-01 13:14:23 UTC
Hi, 

I din't found a gcj version 4.5 build for windows.
That's why I tried to use this version.

Do you know where I can get anywhere such a windows build?

Regards

Steve Reinke

-----Ursprüngliche Nachricht-----
Von: mikpe at it dot uu.se [mailto:gcc-bugzilla@gcc.gnu.org] 
Gesendet: Dienstag, 1. Februar 2011 10:40
An: Reinke, Steve
Betreff: [Bug java/47456] internal compiler error: Segmentation fault while using jna

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47456

--- Comment #10 from Mikael Pettersson <mikpe at it dot uu.se> 2011-02-01 09:40:18 UTC --- Your test case requires using binaries without sources on Win32.

You can:

1. Try a newer gcc, preferably 4.5.2.  Your pre-4.3.0 development snapshot is ancient and likely to contain bugs which have since been fixed.

2. Supply a test case in source form.

--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: ------- You reported the bug.
Comment 12 Mikael Pettersson 2011-02-01 14:12:12 UTC
(In reply to comment #11)
> Hi, 
> 
> I din't found a gcj version 4.5 build for windows.
> That's why I tried to use this version.
> 
> Do you know where I can get anywhere such a windows build?

(please don't top-post)

Looks like mingw supplies prebuilt binaries, including java:
http://www.mingw.org/wiki/Getting_Started
Comment 13 steve.reinke 2011-02-01 14:28:43 UTC
Created attachment 23197 [details]
the src file for the jar
Comment 14 Kai Tietz 2011-12-13 09:13:38 UTC
The gcc 4.3.x series has reached end of support. Does this failure happens still with newer gcj version?
Comment 15 Kai Tietz 2012-01-10 16:57:02 UTC
Hmm, neither an new report about this, nor confirmation that issue still happens. We waited long enough.  Closing it.