[Ifeffit] Launching Problem (D)Athena and Co.

Matt Newville newville at cars.uchicago.edu
Wed Aug 22 11:29:35 CDT 2012


Hi Bruce,

On Wed, Aug 22, 2012 at 9:45 AM, Bruce Ravel <bravel at bnl.gov> wrote:
>
> Hi Alfred,
>
> I am thrilled that you discovered the problem, because I was stumped!
>
> Actually, you have uncovered a problem I have been worrying about for
> some time.  I have been procrastinating on addressing the problem
> because such a small fraction of Windows users will ever see the
> problem.
>
> As you have found, Demeter coexists poorly with other versions of perl
> installed on the computer.  A partial list of software which will
> trigger this conflict includes:
>
>    ActivePerl
>    CitrusPerl / Cava package manager
>    Git for Windows
>    MinGW (possibly -- one can install MinGW and not install perl)
>    Cygwin
>
> There are probably other, but that's the list of things I know of
> which will install a version of perl that cannot be guaranteed to work
> well with Demeter.
>
> There are at least two work-arounds:
>
>  1. The one you found is to edit your PATH so that C:\strawberry comes
>     before all the other possible locations of perl version.  The
>     problem with this is that doing so might break other software you
>     have your system that is expecting to use a particular perl
>     installation.
>
>  2. If you are actually using perl on your windows computer, you can
>     download the Demeter source code and install Demeter following the
>     linux installation instructions.  You will need a proper
>     development environment so that Ifeffit and various other
>     dependencies can be built and installed.  Citrus, MinGW, and
>     Cygwin can all, in principle, provide this level of support.
>
>     Obviously, this can be done.  I had to do all of this in order to
>     build the Demeter installer.  I know of at least one user of my
>     software who opted to work this way.
>
> If you or anyone else has any substantive suggestions for how best to
> deal with this sort of conflict, I am very eager for good suggestions.
>
> If anyone would like to help me package Demeter more effectively on
> Windows -- that would make me deliriously happy.

I thought I reported such an issue earlier this summer, but it might
have gotten lost in the shuffle.
I think the solution is to either explicitly set the PATH to use
C:\strawberry\perl\bin first in dathena.bat, etc,  or to replace

    perl -x -S %0 %*  > "%APPDATA%\demeter\dathena.log" 2>&1

with
    C:\strawberry\perl\bin\perl.exe -x -S %0 %* >
"%APPDATA%\demeter\dathena.log" 2>&1

or do something like

   @echo off
   SET PERLEXE=perl
   if "%OS%" == "Windows_NT" goto WinNT
   %PERLEXE% -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 >
"%APPDATA%\demeter\dathena.log" 2>&1
   goto endofperl
   :WinNT
   SET PERLEXE=C:\strawberry\perl\bin\perl.exe
   %PERLEXE% -x -S %0 %* > "%APPDATA%\demeter\dathena.log" 2>&1


You may want to consider setting other perl-related environmental
variables (say, PERL5LIB) to explicitly point to the strawberry
version --  I'm not sure that this is necessary.  In general, it might
be reasonable to check  at startup of the Perl programs what PERL5LIB
etc is set to and whether it matches the perl executable, perhaps
generating a warning if things look out-of-sync.

I'll submit a github issue.  I looked very briefly just now for
where/how you generate the batch files -- if I knew where that was,
I'd attempt a pull request.

--Matt



More information about the Ifeffit mailing list