[Openmcl-devel] CCL startup script (ccl & ccl64) is not Bourne Shell compatible

Tim Bradshaw tfb at tfeb.org
Sat Oct 17 13:30:41 PDT 2009


On 17 Oct 2009, at 14:57, Aleksej Saushev wrote:

> Replace it at build time. PATH changes across system, and this breaks
> spontaneously when someone uses another interpreter version or PERL
> suddenly becomes out of PATH.

This is off-topic now so I'll shut up after this, but that's what I  
used to do in the old days (I think you mean "install time" not "build  
time"), and it sucks.  It's particularly not amusing if you need to  
run something across a thousand-odd variously-configured systems  
running maybe one of 5 versions of one of 4 OSs, which is what I do  
for my living.
* You need an installation step, which is bad in itself, and then you  
have several further problems.
* What does the installer do?  Chances are it does things like "type  
x" to find the path to x.  In other words it just does at install time  
what the env trick does at run time, and it's pretty hard to see that  
as being better.
* You might think you can ask the user, but (a) they don't know, (b)  
they don't like being asked, (c) they give the wrong answer.
* The main drag of your code is now *not what you distributed*, so  
every time you upgrade it you need to have yet more stuff which checks  
that all the changes are the ones you put in at installation time,  
because if you clobber changes the user made they will come after you  
with a pitchfork at some point.
* This installer you've now written, how does it find the right  
versions of things?  Maybe you need an installer for it.

What I do now is:
* write code which works out where things are itself,
* and checks versions carefully dynamically and complains;
* for things which are really fussy, or where I might want to select  
versions, write "wrappers" which control the environment for things  
based on configuration files or the environment.  The wrappers  
themselves need to bootstrap themselves based on only minimal  
assumptions.

I actually have a whole wrapper-creation system I wrote, though I  
don't use it very much nowadays as I cop out and write simple once-off  
wrappers (like the one I use for CCL).

--tim




More information about the Openmcl-devel mailing list