Re: [Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-12 Thread Mario Domenech Goulart
Hi Jeronimo,

On Sun, 12 May 2019 08:37:50 -0300 Jeronimo Pellegrini  wrote:

> On Sun, May 12, 2019 at 08:52:13AM +0200, Peter Bex wrote:
>> On Sat, May 11, 2019 at 08:28:23PM -0300, Jeronimo Pellegrini wrote:
>> > Hello,
>> > 
>> > I am compiling it for wireless routers, and so far I could not yet
>> > package csc -- so getting modules with chicken-install doesn't
>> > work for me.
>> 
>> Hi Jeronimo,
>> 
>> I'm not sure what you're trying to do, but are statically linked
>> binaries of your program not an option for you?  This would be one
>> single binary file you can just put onto the router.
>
> Do you mean tranfering a statically linked program to the router?
>
> I'd then need to cross-compile Chicken, and using the produced binary,
> run the Chicken compiler? (Cross-compilation is done within the
> OpenWRT build environment).
>
> So -- how do I do that? (Cross-compile an egg) I won't be able to
> run the target chicken compiler.
>
> This is what I imagime:
>
> 1- build chicken-host
> 2- compile the egg to C using chicken-host
> 3- use gcc from the cross-build environment to compile the egg for the
>target architecture
>
> How do I do step (2)?  (I'm only used to chicken-install, don't know
> other ways to compile eggs)

Cross-compilation can be a bit tricky.  Have you checked the
instructions in http://wiki.call-cc.org/man/5/Cross%20development ?

Alternatively, is there an emulator of the target platform that you
could use to compile CHICKEN natively and then produce the statically
linked binaries?

All the best.
Mario
-- 
http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-12 Thread Jeronimo Pellegrini
Hello,

On Sun, May 12, 2019 at 09:18:16AM +0200, Kristian Lein-Mathisen wrote:
> Perhaps an option would be to cross-compile CHICKEN for your target, and
> run chicken-install with that? That should give you the eggs as shared libs
> for your target, which you could simply copy over. That'd require a C
> compiler for your target on your host, though.

Yes, but although I could get csi to run on the target, csc and chicken
(the compiler) did not work as expected (didn't interact well with 
target gcc).
But I'll keep trying to get that to work.

J.

> K.
> 
> On Sun, May 12, 2019, 9:01 AM Peter Bex  wrote:
> 
> > On Sat, May 11, 2019 at 08:28:23PM -0300, Jeronimo Pellegrini wrote:
> > > Hello,
> > >
> > > I was wondering if it is possible to remove or add modules to
> > > the list of default included modules that come with Chicken.
> > >
> > > I am compiling it for wireless routers, and so far I could not yet
> > > package csc -- so getting modules with chicken-install doesn't
> > > work for me.
> >
> > Hi Jeronimo,
> >
> > I'm not sure what you're trying to do, but are statically linked
> > binaries of your program not an option for you?  This would be one
> > single binary file you can just put onto the router.
> >
> > > Would it be possible to
> > >
> > > - get the source of a couple of eggs, and put them somewhere with
> > >   the Chicken sources,
> > > - add their name/path to a list,
> > >
> > > and have them compiled and included in $PREFIX/lib/chicken/9/
> > > when Chicken is compiled?
> >
> > Technically this should be possible I think, but I don't know of an
> > easy way to do this currently.
> >
> > Cheers,
> > Peter
> > ___
> > Chicken-users mailing list
> > Chicken-users@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
> >

> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-12 Thread Jeronimo Pellegrini
Hi Peter,

On Sun, May 12, 2019 at 08:52:13AM +0200, Peter Bex wrote:
> On Sat, May 11, 2019 at 08:28:23PM -0300, Jeronimo Pellegrini wrote:
> > Hello,
> > 
> > I am compiling it for wireless routers, and so far I could not yet
> > package csc -- so getting modules with chicken-install doesn't
> > work for me.
> 
> Hi Jeronimo,
> 
> I'm not sure what you're trying to do, but are statically linked
> binaries of your program not an option for you?  This would be one
> single binary file you can just put onto the router.

Do you mean tranfering a statically linked program to the router?

I'd then need to cross-compile Chicken, and using the produced binary,
run the Chicken compiler? (Cross-compilation is done within the
OpenWRT build environment).

So -- how do I do that? (Cross-compile an egg) I won't be able to
run the target chicken compiler.

This is what I imagime:

1- build chicken-host
2- compile the egg to C using chicken-host
3- use gcc from the cross-build environment to compile the egg for the
   target architecture

How do I do step (2)?  (I'm only used to chicken-install, don't know
other ways to compile eggs)

> > Would it be possible to
> > 
> > - get the source of a couple of eggs, and put them somewhere with
> >   the Chicken sources,
> > - add their name/path to a list,
> > 
> > and have them compiled and included in $PREFIX/lib/chicken/9/
> > when Chicken is compiled?
> 
> Technically this should be possible I think, but I don't know of an
> easy way to do this currently.

That is what I thought, from looking into the code. I'll work more on
the other option.

Thanks a lot!
J.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-12 Thread Kristian Lein-Mathisen
Perhaps an option would be to cross-compile CHICKEN for your target, and
run chicken-install with that? That should give you the eggs as shared libs
for your target, which you could simply copy over. That'd require a C
compiler for your target on your host, though.

K.

On Sun, May 12, 2019, 9:01 AM Peter Bex  wrote:

> On Sat, May 11, 2019 at 08:28:23PM -0300, Jeronimo Pellegrini wrote:
> > Hello,
> >
> > I was wondering if it is possible to remove or add modules to
> > the list of default included modules that come with Chicken.
> >
> > I am compiling it for wireless routers, and so far I could not yet
> > package csc -- so getting modules with chicken-install doesn't
> > work for me.
>
> Hi Jeronimo,
>
> I'm not sure what you're trying to do, but are statically linked
> binaries of your program not an option for you?  This would be one
> single binary file you can just put onto the router.
>
> > Would it be possible to
> >
> > - get the source of a couple of eggs, and put them somewhere with
> >   the Chicken sources,
> > - add their name/path to a list,
> >
> > and have them compiled and included in $PREFIX/lib/chicken/9/
> > when Chicken is compiled?
>
> Technically this should be possible I think, but I don't know of an
> easy way to do this currently.
>
> Cheers,
> Peter
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-12 Thread Peter Bex
On Sat, May 11, 2019 at 08:28:23PM -0300, Jeronimo Pellegrini wrote:
> Hello,
> 
> I was wondering if it is possible to remove or add modules to
> the list of default included modules that come with Chicken.
> 
> I am compiling it for wireless routers, and so far I could not yet
> package csc -- so getting modules with chicken-install doesn't
> work for me.

Hi Jeronimo,

I'm not sure what you're trying to do, but are statically linked
binaries of your program not an option for you?  This would be one
single binary file you can just put onto the router.

> Would it be possible to
> 
> - get the source of a couple of eggs, and put them somewhere with
>   the Chicken sources,
> - add their name/path to a list,
> 
> and have them compiled and included in $PREFIX/lib/chicken/9/
> when Chicken is compiled?

Technically this should be possible I think, but I don't know of an
easy way to do this currently.

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Is it possible to change the list of included modules when compiling Chicken?

2019-05-11 Thread Jeronimo Pellegrini
Hello,

I was wondering if it is possible to remove or add modules to
the list of default included modules that come with Chicken.

I am compiling it for wireless routers, and so far I could not yet
package csc -- so getting modules with chicken-install doesn't
work for me.

Would it be possible to

- get the source of a couple of eggs, and put them somewhere with
  the Chicken sources,
- add their name/path to a list,

and have them compiled and included in $PREFIX/lib/chicken/9/
when Chicken is compiled?

For example, I'd like to use one of the JSON eggs, but they're
not included when Chicken is compiled.

Thanks!
J.


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users