Re: [Ifeffit] Demeter on Ubuntu 14.04
Thanks for your answer Bruce. Don't spoil your holidays/vacation for this! I had done the "perl Build.pl" or "./Build installdeps" steps. In fact I tried a clean install with all those steps. Right now, I tried the touch_wrapper you mentionned without success. I also tried an install as root for all the steps: no success either. I'm stuck and it might be something stupid I can't see. When you have some time to have a look, let me know, there's no rush right now. Cheers denis Le 22/05/2014 15:09, ifeffit-request@millenia.cars.aps.anl.gov a écrit :
Send Ifeffit mailing list submissions to ifeffit@millenia.cars.aps.anl.gov
To subscribe or unsubscribe via the World Wide Web, visit http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit or, via email, send a message with subject or body 'help' to ifeffit-request@millenia.cars.aps.anl.gov
You can reach the person managing the list at ifeffit-owner@millenia.cars.aps.anl.gov
When replying, please edit your Subject line so it is more specific than "Re: Contents of Ifeffit digest..."
Today's Topics:
1. Re: Demeter on Ubuntu 14.04 (Ravel, Bruce)
----------------------------------------------------------------------
Message: 1 Date: Thu, 22 May 2014 13:09:14 +0000 From: "Ravel, Bruce"
To: XAFS Analysis using Ifeffit Subject: Re: [Ifeffit] Demeter on Ubuntu 14.04 Message-ID:<9ocjbe8obqgecedql4scmfu3.1400764153184@email.android.com> Content-Type: text/plain; charset="us-ascii" I'm on vacation right now and only have my tablet, so typing a decent response is a challenge.
From what you included, it looks as though you pulled or cloned the latest from within, but did not do the "perl Build.pl" or "./Build installdeps" steps. If not starting from a clean install, it may help to also "./Build touch_wrapper".
I'll be with email only sporadically for a while, unfortunately.
B
On May 21, 2014, at 11:27AM, Denis TESTEMALE wrote:
Dear members of the list,
it's that time of the (Linux) Ubuntu life cycles where you do upgrades and break previously working programs... Upgrading to Ubuntu 14.04 made no exception for me. It also broke the old Hephaestus programs, but I think it is definitely time that I stop being lazy and switch to Demeter. So I'll focus on the Demeter problems. Sorry about the lengthy post full of pasted error messages.
-------------------------------------------------------------------------------------------------------------- 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:
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. Compilation failed in require at lib/Xray/data/elam2st.PL line 405. BEGIN failed--compilation aborted at lib/Xray/data/elam2st.PL line 405. lib/Xray/data/elam2st.PL failed at /home/denis/perl5/lib/perl5/Module/Build/Base.pm line 2963.
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. Compilation failed in require at /home/denis/perl5/bin/dathena line 11. BEGIN failed--compilation aborted at /home/denis/perl5/bin/dathena line 11.
-----------------------------------------------------------------------------------------------------------------------------------
So I erased the folders and reinstalled everything. 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:
For Dephaestus: everything works, I can plot f' and f" (gnuplot is working) but when I try to plot some XANES references in the standards tab, it crashes with:
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 Moose::Exception::_build_trace('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0x9a3fd18)') called at reader Moose::Exception::trace (defined at /usr/local/lib/perl/5.18.2/Moose/Exception.pm line 9) line 7 Moose::Exception::trace('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0x9a3fd18)') called at /usr/local/lib/perl/5.18.2/Moose/Exception.pm line 49 Moose::Exception::BUILD('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0x9a3fd18)', 'HASH(0xa3743c8)') called at /usr/local/lib/perl/5.18.2/Class/MOP/Method.pm line 128 Class::MOP::Method::execute('Moose::Meta::Method=HASH(0xa44deb8)', 'Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0x9a3fd18)', 'HASH(0xa3743c8)') called at /usr/local/lib/perl/5.18.2/Moose/Object.pm line 56 Moose::Object::BUILDALL('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0x9a3fd18)', 'HASH(0xa3743c8)') called at /usr/local/lib/perl/5.18.2/Moose/Meta/Class.pm line 282 Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x9a3f0d8)', 'HASH(0xa3743c8)') called at /usr/local/lib/perl/5.18.2/Moose/Object.pm line 27 Moose::Object::new('Moose::Exception::ValidationFailedForInlineTypeConstraint', 'type_constraint_message', 'Validation failed for \'LaxNum\' with value 0,00000000000000', 'class_name', 'Demeter::Data', 'attribute_name', 'bkg_nc0', 'value', '0,00000000000000') called at /usr/local/lib/perl/5.18.2/Moose/Util.pm line 52 Moose::Util::throw_exception('ValidationFailedForInlineTypeConstraint', 'type_constraint_message', 'Validation failed for \'LaxNum\' with value 0,00000000000000', 'class_name', 'Demeter::Data', 'attribute_name', 'bkg_nc0', 'value', '0,00000000000000') called at accessor Demeter::Data::bkg_nc0 (defined at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data.pm line 309) line 4 Demeter::Data::bkg_nc0('Demeter::Data=HASH(0xa372058)', '0,00000000000000') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data/Mu.pm line 323 Demeter::Data::Mu::normalize('Demeter::Data=HASH(0xa372058)') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data.pm line 674 Demeter::Data::_update('Demeter::Data=HASH(0xa372058)', 'fft') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data/Plot.pm line 24 Demeter::Data::Plot::plot('Demeter::Data=HASH(0xa372058)', 'E') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Standards.pm line 267 Demeter::UI::Standards::plot('Demeter::UI::Standards=HASH(0x96b3d78)', 'Ferrihydrite', 'mu', 'plot') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Hephaestus/Standards.pm line 139 Demeter::UI::Hephaestus::Standards::make_standards_plot('Demeter::UI::Hephaestus::Standards=HASH(0x9a2f018)', 'Wx::CommandEvent=SCALAR(0x9a2ee50)', 'Demeter::UI::Hephaestus::Standards=HASH(0x9a2f018)', 'mu') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Hephaestus/Standards.pm line 79 Demeter::UI::Hephaestus::Standards::__ANON__('Demeter::UI::Hephaestus::Standards=HASH(0x9a2f018)', 'Wx::CommandEvent=SCALAR(0x9a2ee50)') called at /home/denis/perl5/bin/dhephaestus line 37 eval {...} at /home/denis/perl5/bin/dhephaestus line 37
Similar story and message (at least the first line, since the rest is a bit obscure for me) for Dathena when I try to import a data file from an old Athena .prj project (i.e., as far as I understand and remember things, a file where there is no interactive import window to select columns, references, etc.).
Attribute (bkg_nc0) does not pass the type constraint because: Validation failed for 'LaxNum' with value 68,42548963866604 at /usr/local/lib/perl/5.18.2/Moose/Exception.pm line 37 Moose::Exception::_build_trace('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0xbd2adb0)') called at reader Moose::Exception::trace (defined at /usr/local/lib/perl/5.18.2/Moose/Exception.pm line 9) line 7 Moose::Exception::trace('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0xbd2adb0)') called at /usr/local/lib/perl/5.18.2/Moose/Exception.pm line 49 Moose::Exception::BUILD('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0xbd2adb0)', 'HASH(0xbd2e050)') called at /usr/local/lib/perl/5.18.2/Class/MOP/Method.pm line 128 Class::MOP::Method::execute('Moose::Meta::Method=HASH(0xbd372b8)', 'Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0xbd2adb0)', 'HASH(0xbd2e050)') called at /usr/local/lib/perl/5.18.2/Moose/Object.pm line 56 Moose::Object::BUILDALL('Moose::Exception::ValidationFailedForInlineTypeConstraint=HASH(0xbd2adb0)', 'HASH(0xbd2e050)') called at /usr/local/lib/perl/5.18.2/Moose/Meta/Class.pm line 282 Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xbd2d4c8)', 'HASH(0xbd2e050)') called at /usr/local/lib/perl/5.18.2/Moose/Object.pm line 27 Moose::Object::new('Moose::Exception::ValidationFailedForInlineTypeConstraint', 'type_constraint_message', 'Validation failed for \'LaxNum\' with value 68,42548963866604', 'class_name', 'Demeter::Data', 'attribute_name', 'bkg_nc0', 'value', '68,42548963866604') called at /usr/local/lib/perl/5.18.2/Moose/Util.pm line 52 Moose::Util::throw_exception('ValidationFailedForInlineTypeConstraint', 'type_constraint_message', 'Validation failed for \'LaxNum\' with value 68,42548963866604', 'class_name', 'Demeter::Data', 'attribute_name', 'bkg_nc0', 'value', '68,42548963866604') called at accessor Demeter::Data::bkg_nc0 (defined at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data.pm line 309) line 4 Demeter::Data::bkg_nc0('Demeter::Data=HASH(0xbd3ec78)', '68,42548963866604') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data/Mu.pm line 323 Demeter::Data::Mu::normalize('Demeter::Data=HASH(0xbd3ec78)') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data.pm line 674 Demeter::Data::_update('Demeter::Data=HASH(0xbd3ec78)', 'fft') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/Data/Plot.pm line 24 Demeter::Data::Plot::plot('Demeter::Data=HASH(0xbd3ec78)', 'E') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Artemis/Prj.pm line 209 Demeter::UI::Artemis::Prj::do_plot('Demeter::UI::Artemis::Prj=HASH(0xbd2b4f8)', 'Demeter::Data::Prj=HASH(0xbd2a6a8)', 1) called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Artemis/Prj.pm line 162 Demeter::UI::Artemis::Prj::plot_selection('Demeter::UI::Artemis::Prj=HASH(0xbd2b4f8)', 'Wx::CommandEvent=SCALAR(0xbd31420)', 'Demeter::Data::Prj=HASH(0xbd2a6a8)', 'ARRAY(0xbd2bc78)', 'ARRAY(0xbd30f00)') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Artemis/Prj.pm line 59 Demeter::UI::Artemis::Prj::__ANON__('Demeter::UI::Artemis::Prj=HASH(0xbd2b4f8)', 'Wx::CommandEvent=SCALAR(0xbd31420)') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Athena/IO.pm line 769 eval {...} at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Athena/IO.pm line 769 Demeter::UI::Athena::IO::_prj('Demeter::UI::Athena=HASH(0xc7d498)', '/home/denis/Collaborations/C2RMF/Manip_FeCn/exafs_FeOH2.prj', '/home/denis/Collaborations/C2RMF/Manip_FeCn/exafs_FeOH2.prj', 1, '') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Athena/IO.pm line 165 Demeter::UI::Athena::IO::Import('Demeter::UI::Athena=HASH(0xc7d498)', '/home/denis/Collaborations/C2RMF/Manip_FeCn/exafs_FeOH2.prj') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Athena.pm line 793 Demeter::UI::Athena::OnMenuClick('Wx::Frame=HASH(0xa2feb60)', 'Wx::CommandEvent=SCALAR(0xbd27218)', 'Demeter::UI::Athena=HASH(0xc7d498)') called at /home/denis/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Demeter/UI/Athena.pm line 754 Demeter::UI::Athena::__ANON__('Wx::Frame=HASH(0xa2feb60)', 'Wx::CommandEvent=SCALAR(0xbd27218)') called at /home/denis/perl5/bin/dathena line 39 eval {...} at /home/denis/perl5/bin/dathena line 39
Finally, still Dathena when I try to import a new data file (i.e., a file where I expect an interactive import window to select the columns), there is no error message in the shell, but in the bottom line of the Dathena GUI window, it says that the file "cannot be read as data. (Do you need to enable a plugin?). The thing is I never had to enable a plugin for such a data file (the data file is the cu10k.dat file that you provided in the Ifeffit CD some time ago, and you might still provide today).
OK, enough. Let me know if I can try different things to help source the problem. Regards. Denis
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 ------------------------------------ bravel@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
On 05/28/2014 02:24 PM, Bruce Ravel wrote:
* If the latter, do the following two commands: * export LC_ALL="" * export LC_NUMERIC=""
Denis, It might also be that LANG or LANGUAGE is set to something like fr_FR and LC_NUMERIC inherits from that. So another thing to try in your new shell is export LANG=en_US.UTF-8 and/or export LANGUAGE=en_US B -- Bruce Ravel ------------------------------------ bravel@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
participants (2)
-
Bruce Ravel
-
Denis Testemale