chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Mingw build instructions and makefile


From: Patrick Brannan
Subject: [Chicken-users] Mingw build instructions and makefile
Date: Mon, 27 Feb 2006 21:31:22 -0600

This is how I got chicken 2.3 running with mingw.

Patrick

=====================================================================
Building Chicken With Mingw and Msys

Chicken Version 2.3

======================================================================
Mingw Setup

Mingw Packages - http://www.mingw.org/download.shtml
      mingw-runtime-3.9.tar.gz
      w32api-3.6.tar.gz      
      gcc-core-3.4.2-20040916-1.tar.gz
      binutils-2.15.91-20040904-1.tar.gz
      mingw-utils-0.3.tar.gz
      gcc-g++-3.4.2-20040916-1.tar.gz [Probably not needed]
      MSYS-1.0.10.exe
      msysDTK-1.0.1.exe

You probably don't need all of the packages listed, but at a minimum
you will need the mingw-runtime, gcc, w32api, and msys packages.  I
installed the others.

*** You have to have sed on the path for make and gunzip on the path for
    chicken-setup.  Either use the unix-utils package from
    http://unxutils.sourceforge.net/ or install the msysDTK.

1. Extract the gz files into C:\mingw.  If you put them anywhere
   else you will need to adjust all paths accordingly

2. Run the msys installer. It will run a script following the install.
   As the script runs you will be prompted for two items:
   - Where is you mingw?  Enter the correct location.
   - Make fstab entries?  Say yes.

3. Do whatever you decided to get sed and gunzip. Just make sure they
   are on the path.

You should be done with mingw setup at this point.


======================================================================
Alternate setup using Dev-C++ Bloodshed Dev-C++
      
      Packages - I used the package updater to get/update win32, gcc,
      and binutils.

      TODO - Finish this. It does work, just a slightly different
             process.


======================================================================
Set up the path with a batch file

Set your path and start a command prompt using something like this
batch file:

REM Don't use backslashes for anything used in the make file
set MINGW_HOME=C:/mingw
set MINGW_PATH=%MINGW_HOME%/bin;C:/msys/1.0/bin
set CHICKEN_HOME=C:/working/mingw-only/chicken-2.3
set PATH=%CHICKEN_HOME%;%MINGW_PATH%;C:/WINDOWS/system32
set INCLUDE=%CHICKEN_HOME%
set CHICKEN_INCLUDE_PATH=%CHICKEN_HOME%
set CHICKEN_LIB_DIR=%CHICKEN_HOME%
set LIB=%CHICKEN_HOME%;%MINGW_HOME%/lib
set CHICKEN_REPOSITORY=%CHICKEN_HOME%/repo
cmd.exe

Now you can just run this batch file to get a working environment.

Don't forget sed and gunzip.

I recommend that you eliminate all extraneous path entries.  I ran into
some strange linking issues with some of my standard path entries.


======================================================================
Change these files:

*** csc.scm.in
    Line 105
      remove '-DHAVE_CHICKEN_CONFIG '
    Line 185 should be:
      (define default-library-files '("%staticlibfiles%"))
    Line 529 should be:
      (set! compile-options (cons* "-DC_SHARED" compile-options))

*** chicken.h
    Line 80 should be
      # if defined(__CYGWIN__)


======================================================================
Build chicken.exe, csi.exe, csc.exe, chicken-setup.exe

make -f Makefile.mingw all

Try it out.


======================================================================
Issues and TODO

*** The method that csc.scm uses to obtain tool locations is unusual.
    It would be nice if it used environment variables instead. Maybe
    I don't have the big picture on this. Some things can be passed as
    arguments, but not everything.  In general csc.scm.in needs to be
    fixed to handle MINGW properly.

*** Update the command part of this doc to match the batch file.

*** This probably works with CYGWIN set up for MINGW building.

*** Figure out if all the MINGW packages listed are needed.


Building Chicken With Mingw and Msys

Chicken Version 2.3

======================================================================
Mingw Setup

Mingw Packages - http://www.mingw.org/download.shtml
      mingw-runtime-3.9.tar.gz
      w32api-3.6.tar.gz      
      gcc-core-3.4.2-20040916-1.tar.gz
      binutils-2.15.91-20040904-1.tar.gz
      mingw-utils-0.3.tar.gz
      gcc-g++-3.4.2-20040916-1.tar.gz [Probably not needed]
      MSYS-1.0.10.exe
      msysDTK-1.0.1.exe

You probably don't need all of the packages listed, but at a minimum
you will need the mingw-runtime, gcc, w32api, and msys packages.  I
installed the others.

*** You have to have sed on the path for make and gunzip on the path for
    chicken-setup.  Either use the unix-utils package from
    http://unxutils.sourceforge.net/ or install the msysDTK.

1. Extract the gz files into C:\mingw.  If you put them anywhere
   else you will need to adjust all paths accordingly

2. Run the msys installer. It will run a script following the install.
   As the script runs you will be prompted for two items:
   - Where is you mingw?  Enter the correct location.
   - Make fstab entries?  Say yes.

3. Do whatever you decided to get sed and gunzip. Just make sure they
   are on the path.

You should be done with mingw setup at this point.


======================================================================
Alternate setup using Dev-C++ Bloodshed Dev-C++
      
      Packages - I used the package updater to get/update win32, gcc,
      and binutils.

      TODO - Finish this. It does work, just a slightly different
             process.


======================================================================
Set up the path with a batch file

Set your path and start a command prompt using something like this
batch file:

REM Don't use backslashes for anything used in the make file
set MINGW_HOME=C:/mingw
set MINGW_PATH=%MINGW_HOME%/bin;C:/msys/1.0/bin
set CHICKEN_HOME=C:/working/mingw-only/chicken-2.3
set PATH=%CHICKEN_HOME%;%MINGW_PATH%;C:/WINDOWS/system32
set INCLUDE=%CHICKEN_HOME%
set CHICKEN_INCLUDE_PATH=%CHICKEN_HOME%
set CHICKEN_LIB_DIR=%CHICKEN_HOME%
set LIB=%CHICKEN_HOME%;%MINGW_HOME%/lib
set CHICKEN_REPOSITORY=%CHICKEN_HOME%/repo
cmd.exe

Now you can just run this batch file to get a working environment.

Don't forget sed and gunzip.

I recommend that you eliminate all extraneous path entries.  I ran into
some strange linking issues with some of my standard path entries.


======================================================================
Change these files:

*** csc.scm.in
    Line 105
      remove '-DHAVE_CHICKEN_CONFIG '
    Line 185 should be:
      (define default-library-files '("%staticlibfiles%"))
    Line 529 should be:
      (set! compile-options (cons* "-DC_SHARED" compile-options))

*** chicken.h
    Line 80 should be
      # if defined(__CYGWIN__)


======================================================================
Build chicken.exe, csi.exe, csc.exe, chicken-setup.exe

make -f Makefile.mingw all

Try it out.


======================================================================
Issues and TODO

*** The method that csc.scm uses to obtain tool locations is unusual.
    It would be nice if it used environment variables instead. Maybe
    I don't have the big picture on this. Some things can be passed as
    arguments, but not everything.  In general csc.scm.in needs to be
    fixed to handle MINGW properly.

*** Update the command part of this doc to match the batch file.

*** This probably works with CYGWIN set up for MINGW building.

*** Figure out if all the MINGW packages listed are needed.


Attachment: Makefile.mingw
Description: Binary data


reply via email to

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