chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] cross-compiling version of chicken-setup (was Re: chicke


From: Shawn Rutledge
Subject: [Chicken-users] cross-compiling version of chicken-setup (was Re: chicken-setup)
Date: Mon, 21 Jul 2008 22:24:39 -0700

On Tue, Jul 15, 2008 at 12:11 AM, Peter Bex <address@hidden> wrote:
> I don't think this can be solved automatically (unless we want to
> recreate Autotools or CMake) so what is needed is a way to override or
> add to existing search paths by passing switches to chicken-setup,
> which it then can pass on to the compiler. Example:
>
> chicken-setup foo.egg -I /opt/foo/include -L /opt/foo/lib

I just ran into this, so now I agree with you whole-heartedly.  :-)

While trying to cross-compile endian-port.egg... I found that it has

#include "ansidecl.h"

(if it was me I'd have put that in <> brackets to indicate that it's a
system requirement rather than a local include, but anyway...) and my
toolchain has ansidecl.h, but chicken-setup doesn't know to pass the
extra -I option on to the cross-compiling version of csc.

[proton][09:54:30 PM] DESTDIR=/opt/arm-chicken
/opt/arm-cross-chicken/bin/arm-chicken-setup endian-port

The extension endian-port does not exist.
Do you want to download it ? (yes/no/abort) [yes]
downloading endian-port.egg from
(www.call-with-current-continuation.org eggs/3 80)
  gzip -d -c /tmp/chicken-setup-3-rutledge/downloads/endian-port.egg | tar xf -
  swig -chicken endian_lowio.i
  /opt/arm-cross-chicken/bin/arm-csc -feature compiling-extension -O2
-d0 -s -o endian-port.so -check-imports -emit-exports
endian-port.exports endian-port.scm endian_lowio_wrap.c
endian_lowio_lib.c floatformat.c endian_lowio.scm -lchicken -ldl -lm
<some warnings...>
In file included from endian_lowio_lib.c:41:
floatformat.h:24:22: error: ansidecl.h: No such file or directory
*** Shell command terminated with exit status 1:
arm-angstrom-linux-gnueabi-gcc endian_lowio_lib.c -o
endian_lowio_lib.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os
-fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I/opt/arm-chicken/include
Error: shell invocation failed with non-zero return status
"/opt/arm-cross-chicken/bin/arm-csc -feature compiling-extension -O2
-d0 -s -o e...

I fixed it by going into the temp directory and running arm-csc
myself, with the extra -I option.

Of course it would be even nicer if when setting up the cross-chicken,
you could specify that it should always use the same -I, since in that
case it's in the expected subdirectory relative to the toolchain:
/usr/local/openmoko/arm/include


Now for the next problem with this same egg: it requires eggdoc (the
.meta file has (needs eggdoc ...)).  I don't really want to install
that on my phone.  So I guess  we need a way to distinguish
compile-time requirements from runtime ones.




reply via email to

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