[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Cygwin
From: |
Mark Carter |
Subject: |
[Chicken-users] Cygwin |
Date: |
Sat, 6 Mar 2010 15:31:41 +0000 (GMT) |
OK. I achieved a build of chicken using cygwin. I give instructions below. I'd
like to give a write-up, maybe by providing a patch, edit the wiki, or
something. Let me know what you'd prefer.
INSTALLING CHICKEN ON CYGWIN
If you have chicken v3.4.0 installed on cygwin, then uninstall it. It will only
cause confusion.
I tried obtaining releases from http://chicken.wiki.br/dev-snapshots/, but that
seems to have its own set of build problems. So obtain a copy of the source
from git:
git clone http://chicken.wiki.br/git/chicken-core.git
cd chicken-core
You need to edit Makefile.cygwin to include C_INCLUDE_PREFIX, thusly:
diff --git a/Makefile.cygwin b/Makefile.cygwin
index b448813..1ab2c04 100644
--- a/Makefile.cygwin
+++ b/Makefile.cygwin
@@ -148,6 +148,9 @@ chicken-defaults.h:
echo "#ifndef C_INSTALL_LDFLAGS" >>$@
echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS)
$(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
echo "#endif" >>$@
+ echo "#ifndef C_INSTALL_PREFIX" >>$@
+ echo "# define C_INSTALL_PREFIX \"$(PREFIX)\"" >>$@
+ echo "#endif" >>$@
echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
echo "#endif" >>$@
Clean up any configuration weirdness:
make PLATFORM=cygwin confclean
It's a good idea to run the above command whenever it looks like your
configuration might be dirty.
Now do the building and installation:
make PLATFORM=cygwin PREFIX=/usr/local bootstrap
make -f Makefile.cygwin PREFIX=/usr/local chicken-config.h
make PLATFORM=cygwin PREFIX=/usr/local CHICKEN=./chicken-boot
make PLATFORM=cygwin PREFIX=/usr/local install
Do the following Win 7 (probably also Vista) kludge:
cp /usr/local/bin/chicken-install.exe /usr/local/bin/chickeni.exe
This is because Win7(/Vista) treats any file with the words setup, install, or
patch specially. From now on, when you want to install an egg, use chickeni
instead of chicken-install.
Perform a library installation kludge:
mv /usr/local/lib/libchicken* /usr/local/bin
mv /usr/local/lib/libuchicken* /usr/local/bin
Makefile.cygwin puts them in a place where the compiler can't find them. There
must be a way to correct it, but there are so many references to libraries that
I haven't yet determined where the correction needs to be made. The egg
installer (chicken-install) needs access to the libraries, or else it will fail.
You should now be in business. Build programs using something like
csc hello.scm
and install eggs using something like
chickeni tk
I have confirmed that I have achieved a compile and had Tk running.
TROUBLESHOOTING
Here are some things that can go wrong, along with their fixes.
# "highlevel macros are not supported"
The build process is trying to use an old version of chicken (probably 3.4.0)
to bootstrap the compilation process.
To fix: Follow the instructions above where it mentions uninstalling the old
version and building and using a bootstrap version
# csi.c:2152: error: 'C_INSTALL_PREFIX' undeclared
csi.c needs it, for some reason.
To fix: apply the patch given above
Hope that helps! Enjoy! Feedback welcome!
- [Chicken-users] Cygwin,
Mark Carter <=