Re: [Ifeffit] Install for Mac error

2019-10-03 Thread Ravel, Bruce


Here's one time recently that question was answered:

 
https://millenia.cars.aps.anl.gov/pipermail/ifeffit/2019-June/009822.html



The archives of this mailing list are quite useful:

https://millenia.cars.aps.anl.gov/pipermail/ifeffit/


B



On 10/2/19 6:04 PM, Wu Xiaohan wrote:
> Hello everyone,
> 
> I tried to install demeter on my Mac and run Athena. And get the error 
> shown below:
> 
> 16:59:44: Name "Demeter::Templates::DS" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> 16:59:44: Name "Demeter::Templates::S" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> 16:59:44: Name "Demeter::Templates::F" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> 16:59:44: Name "Demeter::Templates::PT" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> 16:59:44: Name "Demeter::Templates::T" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> 16:59:44: Name "Demeter::Templates::D" used only once: possible typo at 
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm line 572,  
> line 236.
> 
> I would like to ask help to correct this error.
> 
> Thank you so much.
> 
> Best regards
> Kelsey
> 
> 
> 
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
> 


-- 
  Bruce Ravel   bra...@bnl.gov

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS-II
  Lead Beamline Scientist, 6BM (BMM)
  Building 743, Room 114
  Upton NY, 11973

  Homepage:http://bruceravel.github.io/home/
  Beamline:https://www.bnl.gov/ps/beamlines/beamline.php?r=6-BM
  Software:https://github.com/bruceravel
  Demeter: http://bruceravel.github.io/demeter/

___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-04 Thread Matt Newville
Hi Bruce,

Just for clarification (or perhaps to confuse matters more!), I do not see
these warnings or crash with Demeter from github master branch with Perl
5.26 from MacPorts, which is using Text::Template v 1.52 (not 1.47 as Luke
attached).   I did see the warnings and crash with Demeter 0.9.25 from
MacPorts.

--Matt
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-03 Thread Bruce Ravel

On 04/03/2018 01:47 PM, Luke Higgins wrote:

I see this error too. This is a bit of a bodge job, but if you replace:

/opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm

With the attached template.pm from p5.24, it seems to work fine. I’d 
just rename the old Template.pm in the same directory, rather than 
deleting it – since another program may end up needing the most recent one.




Luke,

It's better than a bodge.  It seems to be a good idea.  It seems there 
was a big change in Text::Template at version 1.48.  Your attachment was 
version 1.47 -- i.e. before this significant change.


This confuses me.  I've read the relevant code and I don't understand 
why it's a problem.  Even more, I don't understand how it can be a 
problem only on the Mac and not everywhere.  Weird.


Anyway, I think replacing Text::Template as Luke suggests is a good idea 
for anyone seeing this problem on the Mac.


B


--
 Bruce Ravel   bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS-II
 Building 743, Room 114
 Upton NY, 11973

 Homepage:http://bruceravel.github.io/home/
 Beamline:https://www.bnl.gov/ps/beamlines/beamline.php?r=6-BM
 Software:https://github.com/bruceravel
 Demeter: http://bruceravel.github.io/demeter/
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-03 Thread Christopher Patridge
Luke,

Many thanks Luke.  Error is gone and Athena didn't crash on open.  Bruce, I
am unsure how the two were related but I am good to go.

Thanks for everyone's comments,

Chris


On Tue, Apr 3, 2018 at 12:47 PM, Luke Higgins <pml...@leeds.ac.uk> wrote:

> Hi All,
>
>
>
> I see this error too. This is a bit of a bodge job, but if you replace:
>
>
>
> /opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm
>
>
>
> With the attached template.pm from p5.24, it seems to work fine. I’d just
> rename the old Template.pm in the same directory, rather than deleting it –
> since another program may end up needing the most recent one.
>
>
>
> Cheers,
>
>
>
> Luke
>
>
>
> *From: *Ifeffit <ifeffit-boun...@millenia.cars.aps.anl.gov> on behalf of
> Chris Patridge <patri...@buffalo.edu>
> *Reply-To: *XAFS Analysis using Ifeffit <ifeffit@millenia.cars.aps.anl.gov
> >
> *Date: *Tuesday, 3 April 2018 at 19:22
> *To: *XAFS Analysis using Ifeffit <ifeffit@millenia.cars.aps.anl.gov>
> *Subject: *Re: [Ifeffit] install for mac error
>
>
>
> Thank you for the input Matt. I am glad to hear that it is not “user
> error”. I tried it again and I need to correct my earlier statement because
> Artemis GUI will stay open after the warning however Athena
> closes/crashes.
>
> I will try on a different system.
>
>
>
> Thanks again,
>
>
>
> Chris
>
> Sent from my iPhone
>
>
> On Apr 3, 2018, at 11:52 AM, Matt Newville <newvi...@cars.uchicago.edu>
> wrote:
>
> Hi Chris,
>
>
>
> On Mon, Apr 2, 2018 at 4:15 PM, Christopher Patridge <patri...@buffalo.edu>
> wrote:
>
> Hello everyone,
>
>
>
> I tried to install demeter on my mac (running high Sierra) and it appeared
> everything went well.  However when I run either Athena or Artemis I get an
> error shown below about Demeter::Templates: showing a error and I am not
> sure how I can correct this error.  Any help would be appreciated.
>
>
>
> Thanks in advanced,
>
>
>
> I can confirm this.  I just did a fresh install of Macports on 10.13.3
> (high sierra).  The MacPorts install was not super easy, but once it got to
> the demeter install, that part went fine.
>
> I see the same problem with athena from demeter 0.9.25. I think the
> warnings about "Demeter::Templates::F" and so forth are meant to be
> warnings only -- I think they may not be related to the crash of athena.
> For me, hephaestus gives the same sort of warnings, but runs fine.
>
> I can install and run Demeter 0.9.26 (including using Larch as a backend)
> using Macports, though there are definitely some Mac-specific weirdness.
> Anyway, I do not believe that "install from source" is a feasible approach
> for demeter on OSX. I do not know enough about Macports to update the
> existing package.  I don't know that using some other system would be an
> improvement.
>
>
>
> We keep seeing problems with demeter on OSX.   I'm not sure what the right
> answer is.  Anyone have any suggestions?
>
> --Matt
>
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>
>
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>
>


-- 
Dr. Christopher Patridge
Assistant Professor of Chemistry
Math and Natural Science Dept
BFAC 009
D'Youville College
320 Porter Ave., Buffalo, NY 14201
716-829-8096
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-03 Thread Luke Higgins
Hi All,

I see this error too. This is a bit of a bodge job, but if you replace:

/opt/local/lib/perl5/vendor_perl/5.26/Text/Template.pm

With the attached template.pm from p5.24, it seems to work fine. I’d just 
rename the old Template.pm in the same directory, rather than deleting it – 
since another program may end up needing the most recent one.

Cheers,

Luke

From: Ifeffit <ifeffit-boun...@millenia.cars.aps.anl.gov> on behalf of Chris 
Patridge <patri...@buffalo.edu>
Reply-To: XAFS Analysis using Ifeffit <ifeffit@millenia.cars.aps.anl.gov>
Date: Tuesday, 3 April 2018 at 19:22
To: XAFS Analysis using Ifeffit <ifeffit@millenia.cars.aps.anl.gov>
Subject: Re: [Ifeffit] install for mac error

Thank you for the input Matt. I am glad to hear that it is not “user error”. I 
tried it again and I need to correct my earlier statement because Artemis GUI 
will stay open after the warning however Athena closes/crashes.
I will try on a different system.

Thanks again,

Chris
Sent from my iPhone

On Apr 3, 2018, at 11:52 AM, Matt Newville 
<newvi...@cars.uchicago.edu<mailto:newvi...@cars.uchicago.edu>> wrote:
Hi Chris,

On Mon, Apr 2, 2018 at 4:15 PM, Christopher Patridge 
<patri...@buffalo.edu<mailto:patri...@buffalo.edu>> wrote:
Hello everyone,

I tried to install demeter on my mac (running high Sierra) and it appeared 
everything went well.  However when I run either Athena or Artemis I get an 
error shown below about Demeter::Templates: showing a error and I am not sure 
how I can correct this error.  Any help would be appreciated.

Thanks in advanced,

I can confirm this.  I just did a fresh install of Macports on 10.13.3 (high 
sierra).  The MacPorts install was not super easy, but once it got to the 
demeter install, that part went fine.
I see the same problem with athena from demeter 0.9.25. I think the warnings 
about "Demeter::Templates::F" and so forth are meant to be warnings only -- I 
think they may not be related to the crash of athena.   For me, hephaestus 
gives the same sort of warnings, but runs fine.
I can install and run Demeter 0.9.26 (including using Larch as a backend) using 
Macports, though there are definitely some Mac-specific weirdness. Anyway, I do 
not believe that "install from source" is a feasible approach for demeter on 
OSX. I do not know enough about Macports to update the existing package.  I 
don't know that using some other system would be an improvement.

We keep seeing problems with demeter on OSX.   I'm not sure what the right 
answer is.  Anyone have any suggestions?

--Matt
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov<mailto:Ifeffit@millenia.cars.aps.anl.gov>
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
# -*- perl -*-
# Text::Template.pm
#
# Fill in `templates'
#
# Copyright 2013 M. J. Dominus.
# You may copy and distribute this program under the
# same terms as Perl itself.  
# If in doubt, write to mjd-perl-templa...@plover.com for a license.
#

package Text::Template;
$Text::Template::VERSION = '1.47';
# ABSTRACT: Expand template text with embedded Perl

require 5.004;
use Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(fill_in_file fill_in_string TTerror);
use vars '$ERROR';
use strict;

my %GLOBAL_PREPEND = ('Text::Template' => '');

sub Version {
  $Text::Template::VERSION;
}

sub _param {
  my $kk;
  my ($k, %h) = @_;
  for $kk ($k, "\u$k", "\U$k", "-$k", "-\u$k", "-\U$k") {
return $h{$kk} if exists $h{$kk};
  }
  return;
}

sub always_prepend
{
  my $pack = shift;
  my $old = $GLOBAL_PREPEND{$pack};
  $GLOBAL_PREPEND{$pack} = shift;
  $old;
}

{
  my %LEGAL_TYPE;
  BEGIN { 
%LEGAL_TYPE = map {$_=>1} qw(FILE FILEHANDLE STRING ARRAY);
  }
  sub new {
my $pack = shift;
my %a = @_;
my $stype = uc(_param('type', %a) || "FILE");
my $source = _param('source', %a);
my $untaint = _param('untaint', %a);
my $prepend = _param('prepend', %a);
my $alt_delim = _param('delimiters', %a);
my $broken = _param('broken', %a);
unless (defined $source) {
  require Carp;
  Carp::croak("Usage: $ {pack}::new(TYPE => ..., SOURCE => ...)");
}
unless ($LEGAL_TYPE{$stype}) {
  require Carp;
  Carp::croak("Illegal value `$stype' for TYPE parameter");
}
my $self = {TYPE => $stype,
		PREPEND => $prepend,
UNTAINT => $untaint,
BROKEN => $broken,
		(defined $alt_delim ? (DELIM => $alt_delim) : ()),
	   };
# Under 5.005_03, if any of $stype, $prepend, $untaint, or $broken
# are tainted, all the others become tainted too as a result of
# sharing the expression with them.  We install $source separately
# to prevent it from acquiring a spurious taint

Re: [Ifeffit] install for mac error

2018-04-03 Thread Bruce Ravel

On 04/03/2018 12:52 PM, Matt Newville wrote:


I see the same problem with athena from demeter 0.9.25. I think the 
warnings about "Demeter::Templates::F" and so forth are meant to be 
warnings only -- I think they may not be related to the crash of 
athena.   For me, hephaestus gives the same sort of warnings, but runs fine.


Those are only warnings and should not be related to whatever is causing 
Athena to crash.


I am confused why those warnings get reported.  I am using the same 
version of perl as Chris (5.26), so presumably the same version of 
Text::Template.  I don't see those warnings and don't understand why 
they would show up on a different system.


That said, I can think of a couple ways to suppress those warnings, but 
it is something someone would have to volunteer to test for me.


B

--
 Bruce Ravel   bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS-II
 Building 743, Room 114
 Upton NY, 11973

 Homepage:http://bruceravel.github.io/home/
 Beamline:https://www.bnl.gov/ps/beamlines/beamline.php?r=6-BM
 Software:https://github.com/bruceravel
 Demeter: http://bruceravel.github.io/demeter/
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-03 Thread Chris Patridge
Thank you for the input Matt. I am glad to hear that it is not “user error”. I 
tried it again and I need to correct my earlier statement because Artemis GUI 
will stay open after the warning however Athena closes/crashes. 
I will try on a different system. 

Thanks again,

Chris

Sent from my iPhone

> On Apr 3, 2018, at 11:52 AM, Matt Newville  wrote:
> 
> Hi Chris, 
> 
>> On Mon, Apr 2, 2018 at 4:15 PM, Christopher Patridge  
>> wrote:
>> Hello everyone,
>> 
>> I tried to install demeter on my mac (running high Sierra) and it appeared 
>> everything went well.  However when I run either Athena or Artemis I get an 
>> error shown below about Demeter::Templates: showing a error and I am not 
>> sure how I can correct this error.  Any help would be appreciated.
>> 
>> Thanks in advanced,
> 
> I can confirm this.  I just did a fresh install of Macports on 10.13.3 (high 
> sierra).  The MacPorts install was not super easy, but once it got to the 
> demeter install, that part went fine.   
> 
> I see the same problem with athena from demeter 0.9.25. I think the warnings 
> about "Demeter::Templates::F" and so forth are meant to be warnings only -- I 
> think they may not be related to the crash of athena.   For me, hephaestus 
> gives the same sort of warnings, but runs fine.
> 
> I can install and run Demeter 0.9.26 (including using Larch as a backend) 
> using Macports, though there are definitely some Mac-specific weirdness. 
> Anyway, I do not believe that "install from source" is a feasible approach 
> for demeter on OSX. I do not know enough about Macports to update the 
> existing package.  I don't know that using some other system would be an 
> improvement.
> 
> We keep seeing problems with demeter on OSX.   I'm not sure what the right 
> answer is.  Anyone have any suggestions?
> 
> --Matt
> 
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] install for mac error

2018-04-03 Thread Matt Newville
Hi Chris,

On Mon, Apr 2, 2018 at 4:15 PM, Christopher Patridge 
wrote:

> Hello everyone,
>
> I tried to install demeter on my mac (running high Sierra) and it appeared
> everything went well.  However when I run either Athena or Artemis I get an
> error shown below about Demeter::Templates: showing a error and I am not
> sure how I can correct this error.  Any help would be appreciated.
>
> Thanks in advanced,
>

I can confirm this.  I just did a fresh install of Macports on 10.13.3
(high sierra).  The MacPorts install was not super easy, but once it got to
the demeter install, that part went fine.

I see the same problem with athena from demeter 0.9.25. I think the
warnings about "Demeter::Templates::F" and so forth are meant to be
warnings only -- I think they may not be related to the crash of athena.
For me, hephaestus gives the same sort of warnings, but runs fine.

I can install and run Demeter 0.9.26 (including using Larch as a backend)
using Macports, though there are definitely some Mac-specific weirdness.
Anyway, I do not believe that "install from source" is a feasible approach
for demeter on OSX. I do not know enough about Macports to update the
existing package.  I don't know that using some other system would be an
improvement.

We keep seeing problems with demeter on OSX.   I'm not sure what the right
answer is.  Anyone have any suggestions?

--Matt
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit