Runtime error while compile with mingw gcc(4.6.1)

Q&A's, tips, howto's
Locked
iNPRwANG
Posts: 32
Joined: Sun May 08, 2011 1:45 pm

Runtime error while compile with mingw gcc(4.6.1)

Post by iNPRwANG »

While I compile newlisp 10.4.2 on windows mingw gcc(4.6.1), and run the target, it looks good for all test.
But if only cause a error in code, like run a undefine function:

Code: Select all

(aa)
That will show a error message, and make a fatal error messagebox, then program will crash.

I try to build a version with no -O1 option with gcc(4.6.1), It works better!

I try to find the error from source, it looks crash at the "longjump" function while resume from error.

I try to compile newlisp on mingw gcc(3.4.5), the result is it woks all good.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Runtime error while compile with mingw gcc(4.6.1)

Post by Lutz »

Windows versions newLISP 10.4.0 and 10.4.1 are compiled using gcc 4.4.0 for 32-bit and using either makefile "makefile_mingw_ffi" or "makefile_mingw_utf8_ffi". That makefile also specifies -O1, do not use -O2. You should see no warning messages.

What makefile are you using ?
Are you on Windows XP or on Windows 7 ?
Maybe, 4.6.1 is compiling for 64-bit by default, try to add the -m32 compile flag.


Ps:
The Linux UBUNTU version uses gcc 4.6.1 and the -O2 flag in makefile_linux_utf8_ffi (-O1 works, but slower)
The Mac OSX Lion version uses gcc 4.2.1 and the -O1 flag in makefile_darwin_utf8-ffi. (-O2 works, but same speed and bigger executable)
All compiles should be without warning messages.

iNPRwANG
Posts: 32
Joined: Sun May 08, 2011 1:45 pm

Re: Runtime error while compile with mingw gcc(4.6.1)

Post by iNPRwANG »

I use the default makefile named "makefile_mingw_utf8_ffi", and did not to modity it. (just use the -01)
My system is Windows XP sp3 32bit, lib ffi also compile with gcc 4.6.1.
Use newlisp version is 10.4.2 in-progress. : )

The fatal error message with a msvcrt.dll callstack, function is longjump.

Locked