Is it possible to change the list of included modules when compiling Chicken?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to change the list of included modules when compiling Chicken?

Jeronimo Pellegrini-5
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

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

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

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

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 <[hidden email]> 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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

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

Jeronimo Pellegrini-5
In reply to this post by Peter Bex
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

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

Jeronimo Pellegrini-5
In reply to this post by Kristian Lein-Mathisen
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 <[hidden email]> 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
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
> >

> _______________________________________________
> Chicken-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

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

Mario Domenech Goulart-4
In reply to this post by Jeronimo Pellegrini-5
Hi Jeronimo,

On Sun, 12 May 2019 08:37:50 -0300 Jeronimo Pellegrini <[hidden email]> 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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users