[Top][All Lists]

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

Re: Installing Chicken 5.2.0 on Windows - chicken-install -update-db han

From: Mark Fisher
Subject: Re: Installing Chicken 5.2.0 on Windows - chicken-install -update-db hanging
Date: Fri, 27 Aug 2021 20:00:22 +0100

I have traced where my copy is crashing, but I don't know why.

After compiling with DEBUGBUILD, and using gdb, I've step debug the
application until it crashes.
This is the last function it enters in chicken-install.c:

/* main#destination-repository in k8330 in k8326 in k8322 in k8318 in
k8314 in k8310 in k8306 in k8302 in k8298 in k8294 in k8290 in k8286
in k8282 in k8278 in k8274 in k8270 in k8266 in k8262 in k8258 in
k8254 in k22049 in ... */
static void C_fcall f_8360(C_word t1,C_word t2,C_word t3){
C_word av2[3];

so it's doing

      (or (get-environment-variable "CHICKEN_INSTALL_REPOSITORY")

It jumps around in library.c, runtime.c and file.c a bit before crashing.
The final backtrace is:

#0  0x00007ffbabf5faad in ntdll!RtlEnterCriticalSection ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffba9a299c5 in KERNELBASE!FindNextFileW ()
   from C:\Windows\System32\KernelBase.dll
#2  0x00007ffba9a29868 in KERNELBASE!FindNextFileA ()
   from C:\Windows\System32\KernelBase.dll
#3  0x00007ffbabe56daa in msvcrt!_findnext64 ()
   from C:\Windows\System32\msvcrt.dll
#4  0x00007ffb451f8018 in _findnext64i32 (_FindHandle=<optimized out>,
#5  0x00007ffb44dc3607 in readdir (dir=0x21ac4764f20) at file.c:108
#6  0x00007ffb44dd97f2 in f_903 (t0=484619982368, t1=484619986192)
    at file.c:5341
#7  0x00007ffb44dda226 in f_929 (t0=484619980592, t1=22) at file.c:5416
#8  0x00007ffb44dda0ab in f_917 (c=2, av=0x70d59a1120) at file.c:5390
#9  0x00007ffb44bc53ce in f_11588 (c=2, av=0x70d59a1120) at library.c:11683
#10 0x00007ffb451e4824 in allocate_vector_2 (c=0, av=0x21ac2eebec8)

I don't know where to go from here though.

I've also tried cross compiling from my linux laptop.

Following the guide at
This isn't very accurate, for instance, it mentions "see
C_PLATFORM_TYPE in chicken.h for the supported options", but there
isn't any C_PLATFORM_TYPE in that file.

I compiled chicken with:

    make clean confclean
    make ARCH=x86-64 PREFIX=C:/msys64/usr/local
PLATFORM=cross-linux-mingw HOSTSYSTEM=x86_64-w64-mingw32
    # have to drop the PLATFORM when installing else it mangles the destination
    make ARCH=x86-64 PLATFORM=cross-linux-mingw

I was able to make the cross compiled chicken work in wine on linux:

    $ wine ../target/usr/local/bin/chicken.exe -version
    (c) 2008-2021, The CHICKEN Team
    (c) 2000-2007, Felix L. Winkelmann
    Version 5.3.0rc1 (prerelease) (rev 837cf9ff)
    mingw32-windows-gnu-x86-64 [ 64bit dload ptables cross ]

    $ wine ../target/usr/local/bin/chicken-install.exe -repository

I transferred the cross compiled installation files to my PC, and
although a simple csi worked, as well as "chicken --version", it still
crashes trying to do a "chicken-install update-db" (this was in a
windows cmd shell with paths setup to pick up msys64 bin dirs).

I then found that if I move the old /usr/local/lib/chicken/11 dir out
the way, it then doesn't crash and was able to create a new modules.db

However, when I then tried to install any egg, it was failing as the
PREFIX in my cross build in a windows shell is causing the install
scripts to insert the wrong delimiter, e.g.

    set "PATH=C:/msys64/usr/local/bin;%PATH%"
    set "CHICKEN_CC=gcc"
    ... etc

and the cmd script errors:

    The filename, directory name, or volume label syntax is incorrect.

I can't run this under MSYS2 shell because it fails as it's unable to
understand cmd files.
I couldn't work out how to set the prefix up correctly to make the
paths correct, it kept failing to compile if I used any number of
backslashes instead of forward slashes in the PREFIX variable.
So I think I've got the cross compilation args wrong, but the instructions are

I really don't know how to get chicken compiling in windows, and not
crashing when doing chicken-install.

The cygwin build I made the other day still works in an MSYS shell but
not a cmd shell.
Is it possible to have it work in both?
Has anyone compiled a recent copy of chicken with the latest
MSYS/MingW64 installations?

reply via email to

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