Error "Internal error, execve fails: Exec format error" when evaluating

Error "Internal error, execve fails: Exec format error" when evaluating

by James Smith -
Number of replies: 3

Hi,

I'm trying to expand my use of VPL to include Maple (which we installed on our local VPL server).  To that end, I've created a vpl_run.sh script and a vpl_evaluate.cases file.  My assignment is simply to have students submit an equation (requested file) called maple_template.mw.  Its contents is simply

x:=y+1;

when I run it I see a console like this:

which is good.  But when I hit the evaluation button I get this error in the comments window:

--- Program output ---

Internal error, execve fails: Exec format error

This is strange.  I haven't been able to find any hints via Google searching the error and the documentation.  Any suggestions would be welcome. I've defined the evaluate.cases like this:

case=Test 1
output= "                                  x := y + 1"

and my vpl_run.sh is like this:

#!/bin/bash
# This file is part of VPL for Moodle - http://vpl.dis.ulpgc.es/
# Copyright (C) 2015 onwards Juan Carlos Rodríguez-del-Pino
# License http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
# Author Juan Carlos Rodríguez-del-Pino <jcrodriguez@dis.ulpgc.es>

# @vpl_script_description
# load common script and check programs

echo "starting vpl_run.sh"
. common_script.sh
check_program maple
echo "#!/bin/bash" > vpl_execution
echo "maple -q *.mw" > vpl_execution
chmod +x vpl_execution

Average of ratings: -
In reply to James Smith

Re: Error "Internal error, execve fails: Exec format error" when evaluating

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,
I think that your approach to adding Maple support to VPL is correct. Try also the VPL "based on" feature.

I have not tested your script, but I think that has a small bug:
The second redirection in the script must be an append redirection. ">" must be ">>".
It seems that the terminal launcher overcomes the problem but the evaluator did not.

Try this vpl_run.sh (yours fixed)

#!/bin/bash
# This file is part of VPL for Moodle - http://vpl.dis.ulpgc.es/
# Copyright (C) 2015 onwards Juan Carlos Rodríguez-del-Pino
# License http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
# Author Juan Carlos Rodríguez-del-Pino
echo "starting vpl_run.sh"
. common_script.sh
check_program maple
echo "#!/bin/bash" > vpl_execution
echo "maple -q *.mw" >> vpl_execution
chmod +x vpl_execution
Best regards,
Juan Carlos.
In reply to Juan Carlos Rodríguez-del-Pino

Re: Error "Internal error, execve fails: Exec format error" when evaluating

by James Smith -
Hi Juan,

that fixed it. My setup remains just the vpl_run.sh and a evaluate.cases file, and no explicit vpl_evaluate.sh file. I modified the vpl_run.sh file to use >>. Now, when I hit the "evaluate button" I get the correct output:

Thanks!