Installation error -- was New server install: which versions to use? error -- was New server install: which versions to use?

by Michael Gage -
Number of replies: 1
I have spent some time trying to track down the error -- usually appearing as "fileFromPath not found", or "fileFromPath not exported" which occurs when using ubuntu 14.04 and specifically when using perl 5.18.0.   I haven't solved it but I've established some facts.

1. Commenting out 
our @ISA= qw(PGcore); in the file does not cure the problem although it doesn't hurt and is good idea in any case.

2. The most reliable way to diagnose the problem is to place
use WeBWorK::PG::IO qw(fileFromPath);  in 
then about every sixth time you restart the server you get an immediate error:
"fileFromPath" is not exported by the WeBWorK::PG::IO module

3. If you use something like 
use WeBWorK::PG::IO qw(AskSage fileFromPath);
you will get error messages about both imported functions -- the problem is clearly some interaction with Exporter.

I've used a wide variety of ways of calling Exporter in without being able to cure this behavior.  If you use the trick in 2 above you can very rapidly determine whether or not a fix has worked, but that's the most progress I've made.

The only reliable workaround I've found at the moment is to fully qualify the one place where fileFromPath is used in as suggested earlier by Davide. 

line 544
my $macro_file_name = WeBWorK::PG::IO::fileFromPath($filePath);

It's definitely puzzling.

( see also the threads:

In reply to Michael Gage

Re: error -- was New server install: which versions to use?

by Michael Gage -

This error shows up, but not consistently if the operating system is upgraded to use perl 5.16 or higher.  (The new perl has an asynchronous loading pattern which is not allowed for in the original code.)  The pull requests webwork2: #465 and pg #148 address this issue.  Both pull requests need to be applied to the develop branch at the same time since files are changed in both the webwork2 and pg directories.

After further testing these pull requests will become part of the develop release.