An error occurred while fetching participants.
etc/cshrc on Mac OS X
Summary
etc/cshrc
does not work on Mac OS X.
- Original version exists with
% source etc/cshrc
sed: 1: "s@^[^/]*@@;\@/OpenFOAM[ ...": extra characters at the end of q command
Error: did not locate installation path for OpenFOAM-v1912
No directory:
- It sets up
LD_LIBRARY_PATH
instead ofDYLD_LIBRARY_PATH
.
Steps to reproduce
source etc/cshrc
What is the current bug behaviour?
Error:
sed: 1: "s@^[^/]*@@;\@/OpenFOAM[ ...": extra characters at the end of q command
Error: did not locate installation path for OpenFOAM-v1912
No directory:
What is the expected correct behavior?
- Environment is set up.
-
DYLD_LIBRARY_PATH
is set instead ofLD_LIBRARY_PATH
.
Environment information
- OpenFOAM version : 1912
- Operating system : Mac OS X (10.15.4)
- tcsh version : tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec
Possible fixes
-
sed
issue can be fixed by adding;
afterq
command. I.e.
set projectDir=`lsof +p $$ |& \
sed -ne 's@^[^/]*@@;\@/'"$projectName"'[^/]*/etc/cshrc@{s@/etc/cshrc.*@@p; q; }'`
On Linux (tested on Ubuntu 19.10) this addition does not change behaviour.
- Use
DYLD_LIBRARY_PATH
on Mac OS X. I have tried to fix the issue, see attached config.csh.patch. Not sure if it conforms with tcsh programming style guide. Also it is not quite clean what to do if system Open MPI is installed in/usr/local/...
: it is added to[DY]LD_LIBRARY_PATH
during environment setup but is not cleaned duringwmUnset
.
As a side-note: etc/cshrc
works only in tcsh
. With real csh
(Ubuntu's 20110502-5
, which is based on csh
from OpenBSD
source tree) it exits with Invalid null command.
error.