The following error has me baffled (I believe it's related to another issue - not being able to generate hardcopies). Our server generated this error while checking an answer to a problem (from the NPL) in a homework set:
cd /opt/webwork/webwork2/tmp/ImageGenerator.9fZZWO7U && /usr/bin/latex equation > latex.out 2> latex.err returned non-zero status 32512: Inappropriate ioctl for device at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 387.
cd /opt/webwork/webwork2/tmp/ImageGenerator.9fZZWO7U failed at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 388.
Unable to execute /usr/bin/latex at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 390.
total 8
-rw-r--r-- 1 apache wwdata 195 Sep 12 11:20 equation.tex
-rw-r--r-- 1 apache wwdata 46 Sep 12 11:20 latex.err
-rw-r--r-- 1 apache wwdata 0 Sep 12 11:20 latex.out
Unable to read logfile /opt/webwork/webwork2/tmp/ImageGenerator.9fZZWO7U/equation.log at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 398.
cd /opt/webwork/webwork2/tmp/ImageGenerator.9fZZWO7U && /usr/bin/latex equation > latex.out 2> latex.err failed to generate a DVI file at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 402.
cd /opt/webwork/webwork2/tmp/ImageGenerator.9fZZWO7U && /usr/bin/dvipng -bgTransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status 32512: No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 410.
# DESCRIPTION
## Calculus
## ENDDESCRIPTION
## KEYWORDS ('integration','graph','area')
## Tagged by cmd6a 4/26/06
## DBsubject('Calculus')
## DBchapter('Applications of Integration')
## DBsection('Areas Between Curves')
## Date('')
## Author('')
## Institution('Rochester')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')
## TitleText2('Calculus: Early Transcendentals')
## EditionText2('1')
## AuthorText2('Rogawski')
## Section2('6.1')
## Problem2('1')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl",
"PGgraphmacros.pl"
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
#here are the parameters that will be varied.
$a = random(3,10,1);
$b = random(2,8,1);
$c = random(-8,-2,1);
$d = random(.1,.95,.1);
#with $bound* we ensure that the graph of the function will always be in view.
$boundx1 = $c-3;
$boundy1 = $c-8;
$boundx2 = $b +2;
$boundy2 = $d*8.2**2 +$a;
#here we create start and stop points for the x=lines which will be drawn later.
$line1_finish_y = $d*$c**2 +$a ;
$line2_finish_y = $d*$b**2 +$a ;
@line1_start = ($c, $c);
@line1_finish = ($c,$line1_finish_y,'black');
@line2_start = ($b,$b);
@line2_finish = ($b,$line2_finish_y,'black');
$boundx1a = $boundx1 -1;
$boundx2a = $boundx2 +1;
#We put the functions here to keep plot_functions' entries simple
$fun1 = FEQ("$d*x^2 ? {$a} for x in [$boundx1a,$boundx2a] using color:red and weight:2");
$fun2 = FEQ("x for x in [$boundx1a,$boundx2a] using color:blue and weight:2");
$graph = init_graph($boundx1,$boundy1,$boundx2,$boundy2,'axes' => [0,0]);
($fun1_ref,$fun2_ref) = plot_functions ($graph,
$fun1, $fun2
);
#Here Professor Gage uses a new routine for drawing non-functions (parametrically).
#And replaces the first line. However, this doesnt work in the system version,
#since the PGgraphmacros.pl (?) hasn't been updated there yet).
$temp = new Fun (sub {$c;},
sub {my $x = shift;
$c+($x)*($line1_finish_y - $c);},
$graph);
$temp ->color('black');
$temp -> domain(0,1);
$temp -> weight(2);
# here I make the two vertical lines at x=$c and x=$b
#line1 (x<0)
#$graph->moveTo(@line1_start);
#$graph->lineTo(@line1_finish);
#line2 (x>0)
$graph->moveTo(@line2_start);
$graph->lineTo(@line2_finish);
#where to put the labels
#$label_lineN = new Label ($x,$y,$string,$color,@justification)
#$string is the the text of the label, @justification can be: right, left or center.
$labelx = -4 ;
$y1 = $d*$c**2 ;
$y2 = $d*$b**2 ;
$label_fun1 = new Label ($labelx,&{$fun1_ref->rule}($labelx),"f(x)",'red','left','bottom');
$label_fun2 = new Label ($labelx,&{$fun2_ref->rule}($labelx),"g(x)",'blue','left');
# NOTE: $fRef->rule is a reference to the subroutine which calculates the function. It was
# defined in the output of plot_functions. It is used here to calculate the y value of the
# label corresponding to the function, and below to find the y values for the labels
# corresponding to the first and second derivatives.
$label_line1 = new Label ($c-.1,(&{$fun1_ref->rule}($c) + &{$fun2_ref->rule}($c))/2,"x=$c",'black','right','middle');
$label_line2 = new Label ($b+.1,(&{$fun1_ref->rule}($b) + &{$fun2_ref->rule}($b))/2,"x=$b",'black','left','middle');
#prints the labels
$graph->lb($label_fun1,$label_fun2 ,$label_line1 ,$label_line2 );
TEXT(image( insertGraph($graph), 'width' => 200, 'height' => 200) );
TEXT(EV2(<<EOT));
$PAR
Find the area enclosed between \( f(x) = $d x^2 ? {$a} \) and \( g(x) = x \) from \(x= $c \) to \(x= $b\). $BR
\{ans_rule(40)\}
EOT
$answer = ($d /3)*($b**3 -$c**3) + .5*($c**2 -$b**2) + $a*($b -$c);
ANS(num_cmp($answer));
ENDDOCUMENT(); # This should be the last executable line in the problem.
## Calculus
## ENDDESCRIPTION
## KEYWORDS ('integration','graph','area')
## Tagged by cmd6a 4/26/06
## DBsubject('Calculus')
## DBchapter('Applications of Integration')
## DBsection('Areas Between Curves')
## Date('')
## Author('')
## Institution('Rochester')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')
## TitleText2('Calculus: Early Transcendentals')
## EditionText2('1')
## AuthorText2('Rogawski')
## Section2('6.1')
## Problem2('1')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl",
"PGgraphmacros.pl"
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
#here are the parameters that will be varied.
$a = random(3,10,1);
$b = random(2,8,1);
$c = random(-8,-2,1);
$d = random(.1,.95,.1);
#with $bound* we ensure that the graph of the function will always be in view.
$boundx1 = $c-3;
$boundy1 = $c-8;
$boundx2 = $b +2;
$boundy2 = $d*8.2**2 +$a;
#here we create start and stop points for the x=lines which will be drawn later.
$line1_finish_y = $d*$c**2 +$a ;
$line2_finish_y = $d*$b**2 +$a ;
@line1_start = ($c, $c);
@line1_finish = ($c,$line1_finish_y,'black');
@line2_start = ($b,$b);
@line2_finish = ($b,$line2_finish_y,'black');
$boundx1a = $boundx1 -1;
$boundx2a = $boundx2 +1;
#We put the functions here to keep plot_functions' entries simple
$fun1 = FEQ("$d*x^2 ? {$a} for x in [$boundx1a,$boundx2a] using color:red and weight:2");
$fun2 = FEQ("x for x in [$boundx1a,$boundx2a] using color:blue and weight:2");
$graph = init_graph($boundx1,$boundy1,$boundx2,$boundy2,'axes' => [0,0]);
($fun1_ref,$fun2_ref) = plot_functions ($graph,
$fun1, $fun2
);
#Here Professor Gage uses a new routine for drawing non-functions (parametrically).
#And replaces the first line. However, this doesnt work in the system version,
#since the PGgraphmacros.pl (?) hasn't been updated there yet).
$temp = new Fun (sub {$c;},
sub {my $x = shift;
$c+($x)*($line1_finish_y - $c);},
$graph);
$temp ->color('black');
$temp -> domain(0,1);
$temp -> weight(2);
# here I make the two vertical lines at x=$c and x=$b
#line1 (x<0)
#$graph->moveTo(@line1_start);
#$graph->lineTo(@line1_finish);
#line2 (x>0)
$graph->moveTo(@line2_start);
$graph->lineTo(@line2_finish);
#where to put the labels
#$label_lineN = new Label ($x,$y,$string,$color,@justification)
#$string is the the text of the label, @justification can be: right, left or center.
$labelx = -4 ;
$y1 = $d*$c**2 ;
$y2 = $d*$b**2 ;
$label_fun1 = new Label ($labelx,&{$fun1_ref->rule}($labelx),"f(x)",'red','left','bottom');
$label_fun2 = new Label ($labelx,&{$fun2_ref->rule}($labelx),"g(x)",'blue','left');
# NOTE: $fRef->rule is a reference to the subroutine which calculates the function. It was
# defined in the output of plot_functions. It is used here to calculate the y value of the
# label corresponding to the function, and below to find the y values for the labels
# corresponding to the first and second derivatives.
$label_line1 = new Label ($c-.1,(&{$fun1_ref->rule}($c) + &{$fun2_ref->rule}($c))/2,"x=$c",'black','right','middle');
$label_line2 = new Label ($b+.1,(&{$fun1_ref->rule}($b) + &{$fun2_ref->rule}($b))/2,"x=$b",'black','left','middle');
#prints the labels
$graph->lb($label_fun1,$label_fun2 ,$label_line1 ,$label_line2 );
TEXT(image( insertGraph($graph), 'width' => 200, 'height' => 200) );
TEXT(EV2(<<EOT));
$PAR
Find the area enclosed between \( f(x) = $d x^2 ? {$a} \) and \( g(x) = x \) from \(x= $c \) to \(x= $b\). $BR
\{ans_rule(40)\}
EOT
$answer = ($d /3)*($b**3 -$c**3) + .5*($c**2 -$b**2) + $a*($b -$c);
ANS(num_cmp($answer));
ENDDOCUMENT(); # This should be the last executable line in the problem.
Previous forum posts point to permissions issues. I'm nearly 100% certain that directories have the correct permissions set (I followed the instructions of the Fedora 11 install manual exactly). Is there something else that could likely cause this error? Maybe in {WWroot}/webwork2/conf/global.conf ? I'm running on Fedora 15, WeBWorK v2.5.0 with texlive 2011 (installed from source).
Thank you.
-Kurt