[Ecls-list] Problems with -fomit-frame-pointer (Was Compilation under MinGW32 failed)

Goffioul Michael goffioul at imec.be
Tue Oct 12 07:08:25 UTC 2004


I don't know if the following has the same origin, but here's
something that might guide you in finding the problem.

I'm currently in the process of compiling/building ECL with MSVC6
under Win32 (which BTW is almost finished and works quite well).
While trying the compile, the compilation process failed and stopped
at the same point: loading cmp/cmplam.lsp, evaluating c2lambda-expr
function definition.
Digging a little bit, I finally discovered that the problem/crash
appeared while parsing "(last-arg)" in the &aux parts of the
lambda list: that is in compiler.d, si_process_lambda_list, around
line 2347 with the statement "} else if (end(CDDR(v))) {".
Analyzing this, v is Cnil, CDR(v) is NULL, hence CDDR(v) crash. So
basically, the problem was that CDR(Cnil) is NULL and not Cnil, as
it should be.
Then came the origin of this problem: structure bytes alignment. The
HEADER4 part of ecl_symbol structure was not 4-bytes large, but
8-bytes, such that sizeof(struct ecl_symbol) == 28 (instead of 24).
Hence Cnil->cons.cdr didn't return Cnil, as expected, but NULL.

Under MSVC6, I changed HEADER4 to:
#define HEADER4(field1,flag2,flag3,flag4) int8_t t, m, field1; unsigned char flag2:4, flag3:2, flag4:2
and it solved the problem.

Hope this helps.

Michael.


> -----Original Message-----
> From: Juan Jose Garcia Ripoll [mailto:jlr at mpq.mpg.de]
> Sent: Thursday, October 07, 2004 10:09
> To: Goffioul Michael
> Cc: ecls-list at lists.sourceforge.net
> Subject: [Ecls-list] Problems with -fomit-frame-pointer (Was 
> Compilation
> under MinGW32 failed)
> 
> 
> Goffioul Michael wrote:
> 
> >I'm trying to compile ECL under Win32 with MinGW32, but it fails
> >when loading the "compile.lsp" file. I configured ECL with
> >./configure --prefix=/usr/local/ecl --with-cmuformat
> >I'm using gcc-3.2.3 under Windows2K.
> >  
> >
> Confirmed. The problem seems to be caused by the flag 
> -fomit-frame-pointer which is introduced by the configuration 
> process of 
> GMP [1]. If I remove it from build/c/Makefile, ECL compiles. 
> If I leave 
> it, I am unable to use GDB to trace the problem. Hmmm, difficult.
> 
> Juanjo
> 
> -- 
> Max-Planck-Institut fuer Quantenoptik	+49/(0)89/32905-345
> Hans-Kopfermann-Str. 1, D-85748		
www.mpq.mpg.de/Theorygroup/CIRAC/
Garching b. Muenchen, Germany		Juan.Ripoll at mpq.mpg.de






More information about the ecl-devel mailing list