I think you are misunderstanding the scope of modextravars, it is there to set additional variables in the resultant module file from the installation (it is not relevant to the install process of the software, only the final module file that is written). The modextravars should be set in the Bar easyconfig if you wish to leverage it in Foo? Otherwise you just use something like
preconfigopts = 'BAR_BIN=$EBROOTBAR/bin ' in the Foo easyconfig. On 8 January 2018 at 12:29, Caspar van Leeuwen <caspar.vanleeu...@surfsara.nl<mailto:caspar.vanleeu...@surfsara.nl>> wrote: Dear EasyBuilders, Question: I have a Package Foo that provides a wrapper for a software package Bar. Thus, in the EasyConfig for Foo, I list Bar as a dependency. Now, Foo requires an environment variable BAR_BIN to be set that points to the Bar binary. Thus, what I would like to do in the Foo EasyConfig is something like: modextravars = {‘BAR_BIN’: ‘$EBROOTBAR/bin’} This doesn’t work: I get an error (something like ‘no variable EBROOTBAR’). I presume the reason is that in the modextravars step for 'Foo', the 'Bar' module isn’t actually loaded - thus EBROOTBAR is not set. I could use $root (which points to the FOO root, and does exist when modextravars is executed) and peal off the …/Foo/(version)-(toolchain), then add .../Bar/(version)-(toolchain), but this feels like a very dirty solution. Does anyone know of an elegant way to achieve this? And just to check: is it correct that the dependencies are not loaded when modextravars is executed? Best regards, Caspar van Leeuwen -- Dr. Alan O'Cais E-CAM Software Manager Juelich Supercomputing Centre Forschungszentrum Juelich GmbH 52425 Juelich, Germany Phone: +49 2461 61 5213 Fax: +49 2461 61 6656 E-mail: a.oc...@fz-juelich.de<mailto:a.oc...@fz-juelich.de> WWW: http://www.fz-juelich.de/ias/jsc/EN ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------