Caanoo / WIZ Gnu Guile On Caanoo?


BurningSludge

Still Fresh
Joined
Aug 23, 2010
Messages
16
How do I go about making a port of GNU guile which is a scheme interpreter? I want a scheme interpreter on the Caanoo for I can have a light and fast lisp environment to work with.
 
DISCLAIMER: This is just a quick experiment I did, I have never worked with guile and I don't even have a Caanoo to try and see if it actually works...

You can just cross-compile it using the GPH toolchain. I just tried this on Debian:

Code:
# Put the GPH toolchain on your PATH
...

# Install guile natively, because it is needed during compilation
$ sudo apt-get install guile-1.8

# Install everything required to build guile
$ sudo apt-get build-dep guile-1.8

# Download libtool 2.4 and build libtldl (in sub-dir libtldl)
$ ./configure --host=arm-gph-linux-gnueabi --prefix=/tmp/guile --enable-ltdl-install
$ make && make install

Code:
# Download guile 1.8.8 and apply this patch:
diff --git a/configure.in b/configure.in
index 217ac83..15600dc 100644
--- a/configure.in
+++ b/configure.in
@@ -1369,6 +1369,7 @@ AM_CONDITIONAL([BUILD_PTHREAD_SUPPORT],
 
 ## Check whether pthread_attr_getstack works for the main thread
 
+if test "$cross_compiling" != "yes"; then
 if test "$with_threads" = pthreads; then
 
 AC_MSG_CHECKING(whether pthread_attr_getstack works for the main thread)
@@ -1408,7 +1409,7 @@ CFLAGS="$old_CFLAGS"
 AC_MSG_RESULT($works)
 
 fi # with_threads=pthreads
-
+fi # !cross_compiling
 
 ## Cross building	
 if test "$cross_compiling" = "yes"; then

Code:
# Rebuild the configure script
$ autoreconf -i --force

# Configure and build guile
$ ./configure --target=arm-gph-linux-gnueabi --host=arm-gph-linux-gnueabi --prefix=/tmp/guile CFLAGS=-I/tmp/guile/include LDFLAGS=-L/tmp/guile/lib
$ make && make install

Now you have a build in /tmp/guile that you can try to get running on the Caanoo. It is probably not very useful unless you use it in a C/C++ program or build further extension packages...
 
Back
Top