chicken-users
[Top][All Lists]
Advanced

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

Re: Hard coded paths in csc and relocatable chicken


From: Théo Cavignac
Subject: Re: Hard coded paths in csc and relocatable chicken
Date: Fri, 21 May 2021 14:58:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

Hi Matt,

I have been interested in this problem for other reasons, mainly because I was interested in the possibility of installing eggs in userspace while Chicken was installed through distro package manager (thus in root).

Anyway, in the current states of the compiler it appears that the whole build process of Chicken is built around the assumption of a fixed install path.

The dust project (https://sr.ht/~evhan/dust/) solved this by putting a placeholder 256 * "X" instead of the path in binaries, then editing the binaries in place when installing in your location.

I don't know how it would fit in your use case and it is definitely hacky but it works.

Cheers,

Théo


Le 21/05/2021 à 00:04, Matt Welland a écrit :
As mentioned in the coding jam I put together a chicken bundle including the iup egg ready to go outside the box. It turns out that my assertion that it worked was wrong. I tested by running csi and was able to load iup and create a button and I assumed that if this worked then so would compilation with csc. Not so. While a little script hackery could swizzle the full paths in the .info files for eggs I don't think there is any way to change the paths in compiled binaries such as csc. 

I really would like to be able to make a relocatable build system to enable us to use chicken in our ever more constrained compute environment. 

The directories are all pointing to the original install directory. E.g. 
> strings csc | less
...
_edata
__bss_start
_end
/home/matt/buildall/ck5.2/lib
GLIBC_2.3
GLIBC_2.2.5

Any suggestions or ideas on how to work around this?

Thanks,
Matt
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.

reply via email to

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