Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modoule-4.2.4 :: problem whith prepend//append path using value starting with a - (minus sign) #278

Closed
EricDeveaud opened this issue Jun 20, 2019 · 0 comments
Milestone

Comments

@EricDeveaud
Copy link

Hello,

we hold a large collection of modules that are used to set eg LDFLAGS

modulefiles are ritten in this way

prepend-path -d " " LDFLAGS -L/foo/bar/lib

trying to load this modulefiles leads to an error: see

bigmess:Work/modules-4.2.4 > ./configure --prefix=/tmp/modules-dist
--disable-compat-version
bigmess:Work/modules-4.2.4 > make
bigmess:Work/modules-4.2.4 > make install
bigmess:Work/modules-4.2.4 > source /tmp/modules-4.2.4/init/sh
bigmess:Work/modules-4.2.4 > module --version
Modules Release 4.2.4 (2019-04-26)

bigmess:Work/modules-4.2.4 > cat testprepend
#%Module #########

prepend-path -d " " LDFLAGS  -L/foo/bar/lib

bigmess:Work/modules-4.2.4 > module load ./testprepend
Loading /home/edeveaud/Work/modules-4.2.4/testprepend
   Module ERROR: invalid option '-L/foo/bar/lib' for add-path
     In '/home/edeveaud/Work/modules-4.2.4/testprepend'
     Please contact <root@localhost>

same problem with append-path

is this expected ?

NB modules 4.2.x with x < 4 does not show this behaviour

eg with 4.2.3

bigmess:Work/modules-4.2.4 > source /tmp/modules-4.2.3/init/sh 
bigmess:Work/modules-4.2.4 > module --version 
Modules Release 4.2.3 (2019-03-23)
bigmess:Work/modules-4.2.4 > echo $LDFLAGS

bigmess:Work/modules-4.2.4 > module load ./testprepend
bigmess:Work/modules-4.2.4 > echo $LDFLAGS
-L/foo/bar/lib

using 4.2.4 and following syntax works

prepend-path -d { } LDFLAGS  { -L/foo/bar/lib }

regards

Eric

@xdelaruelle xdelaruelle added this to the 4.2.5 milestone Jul 8, 2019
xdelaruelle added a commit to xdelaruelle/modules that referenced this issue Jul 8, 2019
Fix argument parsing for the `append-path`, `prepend-path` and
`remove-path` modulefile commands to consider every arguments found
after the variable name as variable values and not command option even
if argument starts with `-` character.

Fixes cea-hpc#278.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants