Bruce sez to try this to test if things are in place for Athena:
#!/usr/bin/perl -w use Tk; use Ifeffit qw(get_scalar); use Tk::Dialog; my $x = get_scalar('etok'); my $top=MainWindow->new(); $top->Label(-text=>"Ifeffit sez etok=$x") ->pack(); $top->Button(-text=>'Done', -command=>sub{exit})->pack(); MainLoop;
I tried it and got:
[h196132:~/Desktop] charlesb% perl test_ifeffit.pl Can't locate Ifeffit.pm in @INC (@INC contains: /sw/lib/perl5/darwin /sw/lib/perl5 /System/Library/Pe rl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl /darwin /Network/Library/Perl /Network/Library/Perl .) at test_ifeffit.pl line 3. BEGIN failed--compilation aborted at test_ifeffit.pl line 3.
But then I realized I needed to At 12:01 PM -0600 3/7/02, ifeffit-request@millenia.cars.aps.anl.gov wrote:
cd ../../wrappers/perl perl Makefile.PL sudo make install
So, I did that, but now I get
[h196132:~/Desktop] charlesb% perl test_ifeffit.pl dyld: perl Undefined symbols: _ifeffit_ _iff_exec _iff_get_array _iff_get_echo _iff_get_scalar _iff_get_string _iff_put_array _iff_put_scalar _iff_put_string _iffgetarr_ _iffgetecho_ _iffgetsca_ _iffgetstr_ _iffputarr_
and I'm not sure why this is happening. However, this feels close to working. More suggestions?
Well, it is certainly a step in the right direction to actually install the perl interface to Ifeffit before attempting to use Athena ;-) I find the message you sent encouraging. It tells me that perl is actually attempting to communicate with the ifeffit library. So Ifeffit.pm is in the right place and is working. I would guess that the swig wrapper is not compiled correctly. I barely understand swig on a nice warm fuzzy linux system, so I am not sure how much advice I have for making it work on the mac. Some time spent at http://www.swig.org might help. My hunch is that someone is going to have to generate a wrapper for the Mac on the Mac. HTH, B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu U.S. Naval Research Laboratory, Code 6134 phone: (1) 202 767 5947 Washington DC 20375, USA fax: (1) 202 767 1697 NRL Synchrotron Radiation Consortium (NRL-SRC) Beamlines X11a, X11b, X23b, X24c, U4b National Synchrotron Light Source Brookhaven National Laboratory, Upton, NY 11973 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
A progress report... == Run ifeffit from Terminal.App: Like Chuck found, ifeffit runs (and plots) from Terminal.App once: setenv DISPLAY :0.0 or if( ! $?DISPLAY ) setenv DISPLAY :0.0 is in the .cshrc file and X-Darwin is running. FWIW, putting setenv PGPlOT_DEV /xs will leave the PGPLOT window up (and dormant) after quitting ifeffit. This dormant PGPLOT window will then be ready and used by the ifeffit session run. Personally, I like this alternative, but I may use ifeffit more than others :). == Athena: I made some progress this morning before heading to work. I believe I now have perl/Tk installed correctly on MacOSX, following the instructions (and the dyld file) to the letter at (please note the warnings about how easy it is to trash your OS if you get a few steps wrong!) http://www.Lehigh.EDU/~sol0/Macintosh/X/ptk/ I couldn't run athena due to the 'other necessary modules' (Tk::FileDialog, Chemistry::Elements,...), and so started installing TkAtoms as I headed out the door. Hopefully this will auto-install all the other modules. I didn't have loads of time and didn't try Bruce's test, but perl -e 'use Tk; use Ifeffit;' returned without error for me. I thought this was decent success. The 'use Ifeffit;' really _does_ call some of the underlying Ifeffit compiled code, so I had high hopes. In light of Chuck's problem:
[h196132:~/Desktop] charlesb% perl test_ifeffit.pl dyld: perl Undefined symbols: _ifeffit_ _iff_exec _iff_get_array _iff_get_echo
maybe there's more to it than I thought??? I'll look into it -- hopefully this evening. My guess is that some part of the link/load stage for the perl extension isn't working correctly, possibly because the auto-generated Makefile.PL has some errors. I'm not sure I have any suggestions beyond going back to the source dir and remaking the whole library: cd ..... src/macosx; make clean ; sudo make install cd ../../wrappers/perl ; perl Makefile.PL ; sudo make install and post the output of 'perl Makefile.PL ; sudo make install'. BR> I would guess that the swig wrapper is not compiled correctly. BR> I barely understand swig on a nice warm fuzzy linux system, so BR> I am not sure how much advice I have for making it work on the BR> mac. Some time spent at http://www.swig.org might help. My BR> hunch is that someone is going to have to generate a wrapper BR> for the Mac on the Mac. Hmmm, I'm not sure this will be necessary. The python extension, also using swig, worked without any changes. With respect to C headers and conventions, Darwin is very much BSD, so I wouldn't blame swig just yet. --Matt
participants (3)
-
Bruce Ravel
-
Charles Bouldin
-
Matt Newville