chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Windows 10, MinGW-W64, Chicken 4.11, "invalid enco


From: Peter Bex
Subject: Re: [Chicken-hackers] Windows 10, MinGW-W64, Chicken 4.11, "invalid encoded numeric literal"
Date: Sat, 27 Aug 2016 17:35:20 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Sat, Aug 27, 2016 at 11:08:20AM -0400, Claude Marinier wrote:
> On Sat, Aug 27, 2016 at 10:22AM -0400, Peter Bex wrote:
> > The previous installation was built with a 64-bit toolchain?
> 
> Hi Peter,
> 
> Yes. When I installed MinGW-M64 I chose the 64-bit option and I built
> Chicken with the  ARCH=x86-64  option.

The ARCH option doesn't do that much anymore; it only affects some
build options on Mac OS X and ios I think.  It used to be necessary
to choose the correct apply hack, but since we got rid of that there's
not that much use for it.

In particular, it does *not* ensure a 64 bit build.  This is
automatically determined from the presence of some compiler macros
like __LP64__, _LP64, __MINGW64__ or _WIN64, which should really
be set in your situation.

> > It sounds more likely that CHICKEN didn't detect the 64-bit environment
> > properly.  Was C_SIXTY_FOUR defined?  Did csi print "64bit" in the banner?
> > Or did (memq 64bit: (features)) return #f?
> 
> I do not remember seeing "64bit" in the banner and I did not record it. I
> remember and recorded building Chicken with an explicit request for 64-bit.

See above.

> Some details here
> http://lists.nongnu.org/archive/html/chicken-users/2016-08/msg00009.html
> 
> Who printed the error message? Was it "a.out" ?

Yeah, which is compiled from lolevel-tests.scm.  That's a result of being
compiled to C with bad embedded literals.

>     [panic] invalid encoded numeric literal - execution terminated
> 
> It's looks like the generated C code contained a numeric literal which the
> GCC run-time did not like, almost as if it was operating in 32-bit mode.

It's not GCC that complains, it's the embedded literal decoder in
CHICKEN's runtime (the C_decode_literal function, in case you're
wondering).  This means the compiler produced a literal that the running
program doesn't understand.

> So, is 'csc' not passing the correct flags to 'gcc' ? I'm just speculating.

The CHICKEN compiler tries hard to make portable C files, which can be
compiled on any platform, be it 32 or 64 bits.  I suspect there's simply
something going wrong with detection of 64/32 bit in chicken.h where it
sets (or doesn't set) C_SIXTY_FOUR.

> The other interesting queston is: Why me?

Probably because (still) not many CHICKEN users are running 64-bit
Windows.  All the free as in beer test VMs provided by Microsoft
on modern.ie are 32-bit variants, AFAIK, which really doesn't help
either (of course, that shouldn't matter for testing websites, which
is their main function, even though the license simply says "testing").

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]