On 7/3/2010 11:45 AM, P Kishor wrote: > On Sat, Jul 3, 2010 at 9:01 AM, Barry Hall<[email protected]> wrote: >> Trying to install PDL using CPAN -- newbie not sure where to start here. > > > I will write up my experience, but until then, here is what I suggest -- > > 0. I prefer to install against my own install of Perl. Perl installs > cleanly, clearly, and without a single hassle on a Mac. All one > hundred and bazillion thousand tests of it pass cleanly. It is a heady > feeling to read the summary that 100% of 1,85,000 (or whatever large > number) tests passed. That is what I would recommend. If you do, Perl > will get installed in /usr/local > > 0.1. Even if you prefer to not install your own Perl, you will likely > have to install some dependencies yourself, in which case, the stuff > you install will go under /usr/local > > 1. Forget CPAN, when it comes to PDL. Instead, download the source, > and start from there. Assume, the PDL source is in ~/src/PDL-2.4.6. > > 2. cd into PDL src and open up perldl.conf in a text editor. Set > slatec, GSL, PLplot, PGPLOT and other exotic stuff that you may not > need to 0 (zero). Remember, undef means PDL will still try to build if > it can (let PDL decide), 1 means PDL will be forced to build it, and 0 > means PDL will ignore it. Start with 0.
You must *first* install any required dependencies from the DEPENDENCIES file in the PDL distribution. The cpan shell is an easy way for the perl module ones. I recommend trying the default settings first rather than trying tricks with options first. If you save the result of the configuration stage in a file, you can review it for problems. I use something like this from a bash shell prompt: ( set -x ; perl Makefile.PL ) 2>&1 | tee -a ../pdl-build-log.txt so I can see the process output as it is running. If that doesn't complete successfully, please report any issues as the defaults should work for all platforms that PDL supports. After the Makefile is built, then you can run the make to compile everything: ( set -x ; make ) 2>&1 | tee -a ../pdl-make-log.txt again you check the output looking for errors. There are a lot of warnings that may come up but only the errors indicate a true failure to compile. If the make worked, you can run the test suite: ( set -x ; make test ) 2>&1 | tee -a ../pdl-test-log.txt after which if all the tests pass, you can run 'make install' to install PDL on your system. > 3. type the following in your PDL src file > > ~/src/PDL-2.4.6 % perl Makefile.PL I recommend logging the output of the build commands. > 4. If you are lucky, it will configure without any errors. In which > case, type the following > > ~/src/PDL-2.4.6 % make&& sudo make install I recommend logging the output of the make commands. You should always run the test suite. It is best not to combine more than one step at a time unless you *know* already that things will work or that there won't be a problem if something does go wrong. The standard sequence to build and test any perl module by hand is generally: perl Makefile.PL make make test make install and you *definitely* be logging the output of each step as above since without complete and accurate problem reports we will never get PDL building out of the box on all our platforms. That is just a fact of life since we don't have active developers on every platform. > and start using PDL once it is installed. > > 5. If you are unlucky in #3 above, and encounter errors, note them all > down. Most will be easily fixable, because they will be because of old > or missing libraries. Find the libraries and install them (one by > one). After each install of a library, repeat step #3 again. Remember, > all the stuff you install will go to /usr/local I recommend a completely clean install after each external library fix. For example, if I change something on my system and want to see if it fixed things for PDL I first: rm -rf PDL-2.4.6 tar xzf PDL-2.4.6.tar.gz cd PDL-2.4.6 to get back to square one for a clean build. It is a bit of a pain but folks who take shortcut here can end up with impossible to diagnose problems of version skew and mysterious errors. > I keep a record of everything I have installed, including the > configure options I used, and any relevant output of the make and make > install commands. I've added the log commands I use above. I don't know if that is what would work on the Mac. > 80%-90% of PDL is very easy to install. The remainder is a pain in the > ass, but it is doable. All depends on how badly you want it all. Your mileage may vary. My impression is that *if* you have the needed dependencies, everything will work. A particular problem is misinstalled dependencies or ones in non-standard locations since the defaults of the build look in the standard system locations. If you have things elsewhere then you immediately need to know a lot more about how to tell perl and your C and fortran compilers how to find things.... > Once you have installed PDL, read the chapter on Threading. Be amazed, > and evangelize PDL's use to others. > >> I've just accepted whatever else CPAN wanted to install. >> Need someone to point me in the right direction. >> Used to using PPM on windows based machine. >> Never had this number of errors trying install any package. >> Don't know where to start. The output from the PDL build is more voluminous than indicative of a horrific problem. Nonetheless, it doesn't make it easy to sort things out. I hope this hasn't gone on too long but this is in the hopes that the suggestions will migrate into our documentation of the build process. Good luck, Chris >> >> >> cpan> install PDL >> >> >> I get a lot of these: >> >> -- NOT OK >> Running make test >> Can't test without successful make >> Running make install >> make had returned bad status, install seems impossible >> >> >> probable cause? >> >> Also had a couple of these: >> >> >> Can't locate ExtUtils/F77.pm in @INC (@INC contains: >> /Library/Perl/Updates/5.8.8 >> /System/Library/Perl/5.8.8/darwin-thread-multi-2level >> /System/Library/Perl/5.8.8 >> /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 >> /Library/Perl >> /Network/Library/Perl/5.8.8/darwin-thread-multi-2level >> /Network/Library/Perl/5.8.8 /Network/Library/Perl >> /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level >> /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 >> /Users/barryhall/.cpan/build/PDL-2.4.6 >> /Users/barryhall/.cpan/build/PDL-2.4.6/Lib .) at (eval 269) line 2. >> BEGIN failed--compilation aborted at (eval 269) line 2. >> >> ExtUtils::F77 module not found. Ought not build PDL::Slatec >> >> >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > > > > > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.830 / Virus Database: 271.1.1/2978 - Release Date: 07/02/10 > 14:35:00 > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
