Hi, I am developing algorithms for Automation of "DATA MINING FOR HIGH THROUGHPUT SYNCROTRON SPECTROSCOPIES" with Dr. S L M Schroeder group. I have come across a problem in accessing IFEFFIT libraries through Perl on WINDOWS Platform. I have installed latest version of IFEFFIT as well as PERL. Evertime i try accessing IFEFFIT Through Perl it gives the error like: c:\work>perl -w trial.pl Can't locate loadable object for module ifeffitin @INC <@INC contains: C:/Perl/lib c:/Perl/site/lib .> at trial.pl line 2. Compilation failed in require at trial.pl line 2. BEGIN failed--conpliation aborted at trial.pl line 2. I have trying putting 'Perl folder from wrappers of IFEFFIT' to Perl/site/lib, but no success so far. I am stuck with my work. Any solution to get Access of IFEFFIT libraries through Perl? Cheers!!! Satyender Goel MSc 'Cheminformatics'
On Monday 06 June 2005 08:44, Satyender Goel wrote:
Hi,
I am developing algorithms for Automation of "DATA MINING FOR HIGH THROUGHPUT SYNCROTRON SPECTROSCOPIES" with Dr. S L M Schroeder group.
I have come across a problem in accessing IFEFFIT libraries through Perl on WINDOWS Platform. I have installed latest version of IFEFFIT as well as PERL. Evertime i try accessing IFEFFIT Through Perl it gives the error like:
c:\work>perl -w trial.pl Can't locate loadable object for module ifeffitin @INC <@INC contains: C:/Perl/lib c:/Perl/site/lib .> at trial.pl line 2. Compilation failed in require at trial.pl line 2. BEGIN failed--conpliation aborted at trial.pl line 2.
I have trying putting 'Perl folder from wrappers of IFEFFIT' to Perl/site/lib, but no success so far.
I am stuck with my work. Any solution to get Access of IFEFFIT libraries through Perl?
Cheers!!!
Satyender, To explain why you are stuck, I need to explain a bit how the Ifeffit package works on Windows. If you look at the properties for the desktop icons for Athena, Artemis, and Hephaestus, you will see that they point at the .bat files rather than at the .exe files. Indeed, if you try double clicking on the .exe files you will find that the programs will not launch. The reason for this is that the perl programs need to have some environment variables set correctly in order to run. This could have been done by making modifications to the registry, but I am of the opinion that neither Matt nor I understand Windows well enough to be mucking around with peoples' registries! The solution we came up with was to set some environment variables in the .bat files then lauynch the executables from the batch files. Among the environemnt variables that get set in the .bat files is the one that Ifeffit.pm uses to figure out the location of the Ifeffit DLL. Without that environment variable set, Ifeffit.pm cannot find the DLL and spits up an error message. Take a look at the .bat files -- it should be clear to your how that scheme works. To solve your problem, there are many possible solutions. You'll have to decide which one works best for you. Here are some suggestions: 1. Modify your registry so that the environment variables are set in some global sense. (Note that I have no idea how that is done.) 2. Wrap all you perl scripts inside of batch files like the ones we use for my GUI codes. 3. Try putting something like this at the beginning of your perl scripts: BEGIN { $ENV{IFEFFIT_DIR} = 'C:\Program Files\Ifeffit\'; } You'll probably want to set all the environemnt variables from the batch files in the BEGIN block. Note that I am suggesting this without actually testing it. YMMV. Let us know how if any of these things work. If not, send me a copy of your script and I'll take a more direct look at the problem. B -- Bruce Ravel ----------------------------------- bravel@anl.gov -or- ravel@phys.washington.edu Environmental Research Division, Building 203, Room E-165 Argonne National Laboratory phone and voice mail: (1) 630 252 5033 Argonne IL 60439, USA fax: (1) 630 252 9793 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
Hi Satyender, You need the Ifeffit perl module installed. Do you have Visual Studio installed?? If not, we'll have to send a package with Ifeffit.pm (and we should make this easier!). If you do have a C compiler, building the perl module isn't too difficult (but, again, we should probably make it easier). Ideally, you should be able to open a command shell, go to C:\Program Files\Ifeffit\wrappers\perl\build, and do perl Makefile.PL nmake install This assumes that perl and the Visual Studio tools cl, nmake, etc are in your path. This almost works. There are two simple changes you need to make: First, edit Makefile.PL to say (note the quotes!): 'LIBS' => [' -LC:\"Program Files"\Ifeffit ifeffit_10 '], (it currently says 'LIBS' => [' -LC:\ifeffit ifeffit_10 '], ) Second, I believe you may still have to copy Ifeffit.pm to C:\perl\site\lib after the installation. I'm not sure why this is, but it seems to not install otherwise. Note that there are some old Perl Packages under C:\Program Files\Ifeffit\wrappers\perl. Don't use these. Again, if you don't have Visual Studio installed, we'll have to make a newer version of these packages for Perl 5.8.something. Finally, if you're developing with Ifeffit and Perl, you probably want to permanently set the Ifeffit environmental variables IFEFFIT_DIR, PGPLOT_DIR, and PGPLOT_DEV... Take these from one of the batch files for athena, artemis,etc. Cheers, and let us know how it goes! --Matt
To solve your problem, there are many possible solutions. You'll have to decide which one works best for you. Here are some suggestions:
1. Modify your registry so that the environment variables are set in some global sense. (Note that I have no idea how that is done.)
Hi all Easy I think... 1. Right click on 'My Computer' (or whatever you might have renamed that icon to) on your desktop 2. Open 'Properties' 3. Choose the 'Advanced' tab 4. Click on the button 'Environment variables' VoilĂ ! You can set user variables and global variables! These instructions were for Windows XP - but Win2k was similar (or identical...?). Sven -- IMPORTANT: Please note the new e-mail and postal addresses, as well as changes in the phone numbers. UMIST and the Victoria University of Manchester have combined on 1 October 2004 to form THE UNIVERSITY OF MANCHESTER - http://www.manchester.ac.uk Sven L.M. Schroeder (mailto:s.schroeder@manchester.ac.uk) School of Chemical Engineering and Analytical Science (CEAS) & School of Chemistry The University of Manchester PO Box 88 Sackville Street Manchester M60 1QD United Kingdom Tel +44 (161) 306 4502 Lab +44 (161) 306 4486 Fax +44 (161) 306 4399 Offices: School of CEAS: Room C17 (Jackson's Mill) School of Chemistry: Room E3 (Faraday Undergraduate Block) http://personalpages.umist.ac.uk/staff/s.schroeder/ ============================================================== Molecular Materials Centre: http://www.ce.umist.ac.uk/mmc ============================================================== DISCLAIMER The views expressed within this message are those of the sender, not those of The University of Manchester or one of its Departments. While all emails and attachments are scanned for viruses before sending, we cannot accept any responsibility for viruses, so please scan all emails and attachments. This email is intended for the addressee only. If you are not the intended recipient, please notify the sender and delete this email immediately. END OF MESSAGE
participants (4)
-
Bruce Ravel
-
Matt Newville
-
Satyender Goel
-
Sven L.M. Schroeder