[Chicken-users] Portable installs broken?

2014-04-06 Thread Daniel Leslie
I'm trying to create a 'portable' distribution of chicken and am running
into a simple issue. Basically, the built-in library search path isn't
always valid, and csc and csi don't appear to pay attention to
LD_LIBRARY_PATH.

Thus, the following:

bin $ ./csi -n

CHICKEN

Error: (string-append) bad argument type - not a string: #f

bin $ echo (display \Hello world\) | ./csc - -o foo

Error: (string-append) bad argument type - not a string: #f

Call history:

syntax  (##core#begin (display Hello world))
syntax  (display Hello world)--

Error: shell command terminated with non-zero exit status 17920:
bin/chicken - -output-file foo.c

Alright, so with csi and csc we can get around this by explicitly providing
a -include-path parameter at the command line. But what of installing eggs?
Chicken-install takes no such parameter, and invocations of csc from setup
scripts are not mutable to accept the parameter.

It seems to me that the easy fix would be to import a path from some
environment variable by default. Does such an environment variable exist
already?

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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Peter Bex
On Sun, Apr 06, 2014 at 08:55:31AM -0700, Daniel Leslie wrote:
 I'm trying to create a 'portable' distribution of chicken and am running
 into a simple issue. Basically, the built-in library search path isn't
 always valid, and csc and csi don't appear to pay attention to
 LD_LIBRARY_PATH.
 
 Alright, so with csi and csc we can get around this by explicitly providing
 a -include-path parameter at the command line. But what of installing eggs?
 Chicken-install takes no such parameter, and invocations of csc from setup
 scripts are not mutable to accept the parameter.
 
 It seems to me that the easy fix would be to import a path from some
 environment variable by default. Does such an environment variable exist
 already?

The way I do it is by passing CSC_OPTIONS on the commandline, through an
environment.  There, you can place any options which are appended to the
commandline for every csc invocation.

Cheers,
Peter
-- 
http://www.more-magic.net

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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Dan Leslie

*facepalm*

I should have read to the bottom of the help listing for csc.

Thanks Peter!

-Dan

On 14-04-06 09:13 AM, Peter Bex wrote:

On Sun, Apr 06, 2014 at 08:55:31AM -0700, Daniel Leslie wrote:

I'm trying to create a 'portable' distribution of chicken and am running
into a simple issue. Basically, the built-in library search path isn't
always valid, and csc and csi don't appear to pay attention to
LD_LIBRARY_PATH.

Alright, so with csi and csc we can get around this by explicitly providing
a -include-path parameter at the command line. But what of installing eggs?
Chicken-install takes no such parameter, and invocations of csc from setup
scripts are not mutable to accept the parameter.

It seems to me that the easy fix would be to import a path from some
environment variable by default. Does such an environment variable exist
already?

The way I do it is by passing CSC_OPTIONS on the commandline, through an
environment.  There, you can place any options which are appended to the
commandline for every csc invocation.

Cheers,
Peter



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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Dan Leslie

Actually, that doesn't appear to help.

In order to get csi to work I must pass both the -include-path parameter 
as well as -q; and csc has no equivalent option to -q.


What appears to happen with csi is that before -include-path is 
evaluated some chicken code is executed that requires loading of a 
library and so it fails. Disabling the banner appears to solve this issue.


I wonder if doing a STATICBUILD would rectify this?

-Dan

On 14-04-06 09:31 AM, Dan Leslie wrote:

*facepalm*

I should have read to the bottom of the help listing for csc.

Thanks Peter!

-Dan

On 14-04-06 09:13 AM, Peter Bex wrote:

On Sun, Apr 06, 2014 at 08:55:31AM -0700, Daniel Leslie wrote:
I'm trying to create a 'portable' distribution of chicken and am 
running

into a simple issue. Basically, the built-in library search path isn't
always valid, and csc and csi don't appear to pay attention to
LD_LIBRARY_PATH.

Alright, so with csi and csc we can get around this by explicitly 
providing
a -include-path parameter at the command line. But what of 
installing eggs?
Chicken-install takes no such parameter, and invocations of csc from 
setup

scripts are not mutable to accept the parameter.

It seems to me that the easy fix would be to import a path from some
environment variable by default. Does such an environment variable 
exist

already?

The way I do it is by passing CSC_OPTIONS on the commandline, through an
environment.  There, you can place any options which are appended to the
commandline for every csc invocation.

Cheers,
Peter





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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Dan Leslie

Nix that, STATICBUILD would break most everything I need.

Hrm, haven't a clue.

-Dan

On 14-04-06 10:09 AM, Dan Leslie wrote:

Actually, that doesn't appear to help.

In order to get csi to work I must pass both the -include-path 
parameter as well as -q; and csc has no equivalent option to -q.


What appears to happen with csi is that before -include-path is 
evaluated some chicken code is executed that requires loading of a 
library and so it fails. Disabling the banner appears to solve this 
issue.


I wonder if doing a STATICBUILD would rectify this?

-Dan

On 14-04-06 09:31 AM, Dan Leslie wrote:

*facepalm*

I should have read to the bottom of the help listing for csc.

Thanks Peter!

-Dan

On 14-04-06 09:13 AM, Peter Bex wrote:

On Sun, Apr 06, 2014 at 08:55:31AM -0700, Daniel Leslie wrote:
I'm trying to create a 'portable' distribution of chicken and am 
running

into a simple issue. Basically, the built-in library search path isn't
always valid, and csc and csi don't appear to pay attention to
LD_LIBRARY_PATH.

Alright, so with csi and csc we can get around this by explicitly 
providing
a -include-path parameter at the command line. But what of 
installing eggs?
Chicken-install takes no such parameter, and invocations of csc 
from setup

scripts are not mutable to accept the parameter.

It seems to me that the easy fix would be to import a path from some
environment variable by default. Does such an environment variable 
exist

already?
The way I do it is by passing CSC_OPTIONS on the commandline, 
through an
environment.  There, you can place any options which are appended to 
the

commandline for every csc invocation.

Cheers,
Peter







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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Dan Leslie
Analyze and syntax-check only csc invocations appear to work (-A and -P 
options). That implies to me that -include-path is adhered to /very/ 
late in the invocation, if at all.


-Dan


On 14-04-06 10:18 AM, Dan Leslie wrote:

Nix that, STATICBUILD would break most everything I need.

Hrm, haven't a clue.

-Dan

On 14-04-06 10:09 AM, Dan Leslie wrote:

Actually, that doesn't appear to help.

In order to get csi to work I must pass both the -include-path 
parameter as well as -q; and csc has no equivalent option to -q.


What appears to happen with csi is that before -include-path is 
evaluated some chicken code is executed that requires loading of a 
library and so it fails. Disabling the banner appears to solve this 
issue.


I wonder if doing a STATICBUILD would rectify this?

-Dan

On 14-04-06 09:31 AM, Dan Leslie wrote:

*facepalm*

I should have read to the bottom of the help listing for csc.

Thanks Peter!

-Dan

On 14-04-06 09:13 AM, Peter Bex wrote:

On Sun, Apr 06, 2014 at 08:55:31AM -0700, Daniel Leslie wrote:
I'm trying to create a 'portable' distribution of chicken and am 
running
into a simple issue. Basically, the built-in library search path 
isn't

always valid, and csc and csi don't appear to pay attention to
LD_LIBRARY_PATH.

Alright, so with csi and csc we can get around this by explicitly 
providing
a -include-path parameter at the command line. But what of 
installing eggs?
Chicken-install takes no such parameter, and invocations of csc 
from setup

scripts are not mutable to accept the parameter.

It seems to me that the easy fix would be to import a path from some
environment variable by default. Does such an environment variable 
exist

already?
The way I do it is by passing CSC_OPTIONS on the commandline, 
through an
environment.  There, you can place any options which are appended 
to the

commandline for every csc invocation.

Cheers,
Peter








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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Oleg Kolosov
On 04/06/14 19:55, Daniel Leslie wrote:
 I'm trying to create a 'portable' distribution of chicken and am
 running into a simple issue. Basically, the built-in library search
 path isn't always valid, and csc and csi don't appear to pay attention
 to LD_LIBRARY_PATH.

 Thus, the following:

 bin $ ./csi -n

 CHICKEN

 Error: (string-append) bad argument type - not a string: #f

 bin $ echo (display \Hello world\) | ./csc - -o foo

 Error: (string-append) bad argument type - not a string: #f

 Call history:

 syntax  (##core#begin (display Hello world))
 syntax  (display Hello world)--

 Error: shell command terminated with non-zero exit status 17920:
 bin/chicken - -output-file foo.c

 Alright, so with csi and csc we can get around this by explicitly
 providing a -include-path parameter at the command line. But what of
 installing eggs? Chicken-install takes no such parameter, and
 invocations of csc from setup scripts are not mutable to accept the
 parameter.

 It seems to me that the easy fix would be to import a path from some
 environment variable by default. Does such an environment variable
 exist already?

 -Dan



 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users
csc uses definitions from chicken-config.h which is generated at build
time. Some of those can be modified with environment variables. This can
be quite inconvenient. I'm currently working on CMake based solution
which does not depend on csc. It handles parallel builds, separate build
folders, cross compilation, etc. Check
https://github.com/bazurbat/cmake-modules/blob/master/cmake/ChickenUse.cmake
and example usage in tests/chicken to see how chicken command line is
constructed. Maybe this will help you.

-- 
Regards, Oleg

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


Re: [Chicken-users] Portable installs broken?

2014-04-06 Thread Dan Leslie
It turns out that all of the odd issues I was having were resolved by 
ditching SRCDIR. I like to build from a separate directory from source 
as I tend to leave intermediate files in a tmpfs partition, to save my 
SSD some unnecessary thrashing, so I naturally attempted to use SRCDIR. 
Anyhow, building from the same directory as the source resolved all of 
the issues.


Here's hoping Oleg's cmake branch comes together soon. :)

-Dan

On 14-04-06 08:55 AM, Daniel Leslie wrote:
I'm trying to create a 'portable' distribution of chicken and am 
running into a simple issue. Basically, the built-in library search 
path isn't always valid, and csc and csi don't appear to pay attention 
to LD_LIBRARY_PATH.


Thus, the following:

bin $ ./csi -n

CHICKEN

Error: (string-append) bad argument type - not a string: #f

bin $ echo (display \Hello world\) | ./csc - -o foo

Error: (string-append) bad argument type - not a string: #f

Call history:

syntax  (##core#begin (display Hello world))
syntax  (display Hello world) --

Error: shell command terminated with non-zero exit status 17920: 
bin/chicken - -output-file foo.c


Alright, so with csi and csc we can get around this by explicitly 
providing a -include-path parameter at the command line. But what of 
installing eggs? Chicken-install takes no such parameter, and 
invocations of csc from setup scripts are not mutable to accept the 
parameter.


It seems to me that the easy fix would be to import a path from some 
environment variable by default. Does such an environment variable 
exist already?


-Dan



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