fushar / regrader

ICPC-style programming contest system
MIT License
34 stars 25 forks source link

Cannot make moe from web-based installer: recipe for target 'obj/box/box.o' failed when executing CC box/box.c #69

Closed saifulwebid closed 5 years ago

saifulwebid commented 8 years ago

I cannot make moe from the web-based installer, but it make-d successfully if I run it manually from a bash terminal: ./configure && make from the /moe directory. The ./configure command, however, is successful from the web-based installer.

I modified the application/controllers/Site.php file to add debug parameter -d into make command on the build_grader() function. I compared the output from the make -d invoked manually from the terminal and the make -d invoked by the web-based installer.

The web-based installer failed on this:

CC box/box.c
Reaping winning child 0xd93d80 PID 27626
Live child 0xd93d80 (obj/box/box.o) PID 27627
Reaping losing child 0xd93d80 PID 27627
build/Makebottom:118: recipe for target 'obj/box/box.o' failed
Removing child 0xd93d80 PID 27627 from chain.

Could you help me?

Here's the output of uname -a, if needed: Linux tisigram 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux. I am running the web-based terminal on an Apache 2.4.10 server connected to a PHP-FPM module, configured to run from the very same user that I tested the manual make from the bash terminal.

fushar commented 8 years ago

Hey @saifulwebid,

I do not have solution yet, but if you did successfully run make manually, you can hack the installation process by removing this block

$grader_output = $this->build_grader();
if ( ! empty($grader_output))
{
    $data['heading'] = 'Error: cannot build grader engine';
    $data['content'] = '<p>Please make sure that the web server has the permission to write to <b>' . getcwd() . '/moe</b>.<p>Build output:</p><pre>' . html_entity_decode($grader_output) . '</pre>';
    $this->load->view('site/install', $data);
    return; 
}

from Site.php and run the installer again. This should unblock you.

saifulwebid commented 8 years ago

Thank you @fushar. Did it already. Just wondering why it behave differently -- still cannot figure it out. Will definitely tell you if I found something new.