Hi Denis,

On 05/26/2014 10:11 AM, Denis Testemale wrote:
Context: I'm running Ubuntu 64 bits 14.04. Demeter version 0.9.20. I
followed Ubuntu specific instructions found here:
https://gist.github.com/3959252
Demeter once worked but I cannot guarantee that it did just before the
upgrade to 14.04. After the upgrade, both trying to run dathena or to
rebuild the package ran into errors such as:

These:

denis@huchet4:~/demeter$ ./Build
Building Demeter
Perl API version v5.14.0 of DateTime does not match v5.18.0 at
/usr/share/perl/5.18/XSLoader.pm line 92.
 ... etc...

and

denis@huchet4:~/demeter$ dathena
Perl API version v5.14.0 of Wx does not match v5.18.0 at
/usr/lib/perl/5.18/DynaLoader.pm line 207.
 ... etc...

mean that you had built the DateTime and Wx modules for an older
version of perl.  The compiled bits are not, in general, forward
compatible.  That is, when a new version of perl is installed, the
various modules must be rebuilt.  This is the sort of thing that
package managers (like apt-get) take care of and why it would be
lovely if a package for Demeter existed.

In your case, I suspect that you ran "./Build installdeps" once upon a
time when you have perl 5.14 on your computer.  Normally, running
"./Build installdeps" again would do the right thing because it would
install to a version-specific subdirectory in someplace like
/usr/local/lib/perl/.

You didn't tell me what "perl -V" had to say, so I can only guess why
that didn't work for you.  My best guess is that you instruct the perl
Build script to install to some location in your home directory and
then you have modified perl's include list.

That is, when you say

So I erased the folders and reinstalled everything.

I presume that "the folders", whatever you mean by that, are something
other than the system folder that perl would normally install into.
Of course, it is hard for me to know for sure because you have not
provided enough information to diagnose the problem.

The installation ran
smoothly (except I had to install missing deps several times, but no
error messages at the end). Now I can start the programs but run into
problems:

Attribute (bkg_nc0) does not pass the type constraint because:
Validation failed for 'LaxNum' with value 0,00000000000000 at
/usr/local/lib/perl/5.18.2/Moose/Exception.pm line 37

This appears to be a localization problem.  In fact, it is true that
"0,000" is not a number when a dot is expected as a decimal point.

I am guessing that you have LC_ALL or LC_NUMERIC set to something like
"fr_FR" and that is causing some module used by Demeter to use French
localization for formatting a character string intended to represent a
number.  The reason I suspect this is because your stack trace points
to a line of code that looks like this:

  $self->bkg_nc0(sprintf("%.14f", $self->fetch_scalar("norm_c0")));

The fetch_scalar method is used to grab a value from Ifeffit and
returns a floating point number.  I then use sprintf to control the
number of decimal places.  14 digits is a lot, making this line a bit
silly, but I use this idiom extensively throughout the code, usually
with much less precision.  With one of the LC_* environment variables
set to fr_FR (or whatever), a comma gets used.

It would not be hard to make this idiom tolerant of commas-as-decimal-
points.

I suspect that there is a fairly simple work-around you could try:

 * Open a new terminal window.  (You want to try this in its own shell
   so it doesn't affect the rest of the programs running on your
   computer.)  Do "env | grep LC" to see whether and how the LC_*
   variables are set.

 * do
      perl -e 'printf("%.3f\n", 5.23456)'
   What gets printed?  "5.235" or "5,235"?

 * If the latter, do the following two commands:
     * export LC_ALL=""
     * export LC_NUMERIC=""
   If the former, then I'm stumped.

 * try running Athena again.

You should take a look at ~/.horae/demeter.ini.  If any of the values
in there use commas as the decimal point, then you will either need to
edit or delete the file.

Of course, I may be way off base.  Let me know if that works.

B



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

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:    http://xafs.org/BruceRavel
 Software:    https://github.com/bruceravel
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit

Reply via email to