hit-moodle / moodle-local_onlinejudge

Online Judge plugin for Moodle 2.7-4.2.
http://cms.hit.edu.cn
GNU General Public License v3.0
120 stars 59 forks source link

sandbox won't build #13

Closed CarlLee closed 12 years ago

CarlLee commented 12 years ago

output

carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data uname -a
Linux li250-237 2.6.39.1-linode34 #1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 GNU/Linux
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data cc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-        4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-        linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make clean
make -C libsandbox clean
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -rf doc
rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \
        libsandbox.so.0.2.18
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
make -C libsandbox libsandbox.a
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/platform.o src/platform.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/sandbox.o src/sandbox.c
src/sandbox.c: In function '__sandbox_tracer':
src/sandbox.c:1030: warning: label 'next' defined but not used
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/symbols.o src/symbols.c
ar rcvs libsandbox.a src/platform.o src/sandbox.o src/symbols.o
a - src/platform.o
a - src/sandbox.o
a - src/symbols.o
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy_print.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c sand.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D         WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o detector sand.o policy_print.o ./libsandbox/libsandbox.a
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o 223 223.c
./detect.sh
Detecting syscalls...
INIT_SYSCALLS:
ALLOWED_SYSCALLS:
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D W    ITHOUT_TSC_COUNTER -I ./libsandbox/src  -o sand sand.o policy.o ./libsandbox/libsandbox.a
./runtest.sh 1 stdin_test < /dev/null
make: *** [stdin] Error 255
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ^C
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data ./runtest.sh 1 stdin_test <     /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test < /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test < /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data uname -a
Linux li250-237 2.6.39.1-linode34 #1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 GNU/Linux
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data cc -v
    Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-    4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make clean
make -C libsandbox clean
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -rf doc
rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \
        libsandbox.so.0.2.18
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
make -C libsandbox libsandbox.a
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/platform.o src/platform.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/sandbox.o src/sandbox.c
src/sandbox.c: In function '__sandbox_tracer':
src/sandbox.c:1030: warning: label 'next' defined but not used
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/symbols.o src/symbols.c
ar rcvs libsandbox.a src/platform.o src/sandbox.o src/symbols.o
a - src/platform.o
a - src/sandbox.o
a - src/symbols.o
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy_print.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c sand.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o detector sand.o policy_print.o ./libsandbox/libsandbox.a
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o 223 223.c
./detect.sh
Detecting syscalls...
INIT_SYSCALLS:
ALLOWED_SYSCALLS:
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o sand sand.o policy.o ./libsandbox/libsandbox.a
./runtest.sh 1 stdin_test < /dev/null
make: *** [stdin] Error 255
CarlLee commented 12 years ago

Figured out, must be compiled using super user