make failure: Cannot compile rad/main.scm because cannot open file
michelmno opened this issue · 7 comments
[michel@twppc64:~/work]
$git clone https://github.com/aoh/radamsa.git
$cd radamsa/
$make
...
cd owl-lisp-0.1.10 && make bin/vm
make[2]: Entering directory '/mnt/disk2/michel/work/radamsa/owl-lisp-0.1.10'
# make a vm without a bundled heap
echo "unsigned char *heap = 0;" > c/vm.c
cat c/ovm.c >> c/vm.c
cc -Wall -O2 -o bin/vm c/vm.c
c/vm.c: In function 'boot':
c/vm.c:1016:4: warning: call to function 'vm' without a real prototype [-Wunprototyped-calls]
return vm(entry, oargs);
^
c/vm.c:148:6: note: 'vm' was declared here
word vm();
^
make[2]: Leaving directory '/mnt/disk2/michel/work/radamsa/owl-lisp-0.1.10'
make[1]: Leaving directory '/mnt/disk2/michel/work/radamsa'
owl-lisp-0.1.10/bin/vm owl-lisp-0.1.10/fasl/init.fasl -O2 -o radamsa.c rad/main.scm
Cannot compile rad/main.scm because cannot open file
Makefile:36: recipe for target 'radamsa.c' failed
make: *** [radamsa.c] Error 2
This is a big endian issue (at least for ppc64 that is BE)
I verified that no such failure for x86_64 or ppc64le that are LE.
Thanks. I haven't had access to LE machines for a while, so quite possbile that endianess issues have turned up at some point.
Could you also attach the last few lines of strace owl-lisp-0.1.10/bin/vm owl-lisp-0.1.10/fasl/init.fasl -O2 -o radamsa.c rad/main.scm? Seems odd that owl can build itself, but not radamsa.
BE, even. Bug reproduced in Debian running on Qemu/PPC.
There was indeed an endianess bug in tag check when opening files. Fix is now in owl, but I don't have time to check it now, since the build takes a long time on my emulated machine. If you can, you can verify the fix as follows:
$ cd radamsa
$ git clone https://github.com/aoh/owl-lisp.git
$ cd owl-lisp
$ make
$ cd ..
$ owl-lisp/bin/ol -O2 -o radamsa.c rad/main.scm
$ make
$ echo 'HAL 9000' | bin/radamsa -o tmp/rad-%n.hal -n 10 -v && echo ok
Build passed in vm. Assuming fixed. Reopen if the issue persists.
Thanks for the bug.
Thank you for the correction.
I verified on my ppc64 guest the fix with your detailed steps and that succeeded.
My only small comment is that there are still compilation warning, but not a critical problem.
...
# compile the real owl repl binary
cc -Wall -O2 -o bin/olp c/ol.c
c/ol.c: In function 'boot':
c/ol.c:24665:4: warning: call to function 'vm' without a real prototype [-Wunprototyped-calls]
return vm(entry, oargs);
^
c/ol.c:23797:6: note: 'vm' was declared here
word vm();
^
CC=cc tests/run all bin/olp
Vm() prototype now has argument types in owl, so the warning won't turn up in the next release.