wanderers
wanderers copied to clipboard
Make error on Linux
I am using Arch Linux on Raspberrry Pi with The OCaml toplevel, version 4.02.3
, uname -a
shows:
Linux alarmpi 4.1.6-3-ARCH #1 SMP PREEMPT Tue Sep 8 19:52:33 MDT 2015 armv7l GNU/Linux
make -f makefile.inc nc
make[1]: Entering directory '/home/ivan/Downloads/wanderers'
make[2]: Entering directory '/home/ivan/Downloads/wanderers'
ocamlopt -c -I lib/ -I src/ src/global.ml
ocamlopt -c -I lib/ -I src/ lib/glcaml.ml
ocamlopt -c -I lib/ -I src/ src/global.ml
ocamlopt -c -I lib/ -I src/ src/trade.ml
ocamlopt -c -I lib/ -I src/ src/trade.ml
ocamlopt -c -I lib/ -I src/ src/simtrade.ml
ocamlopt -c -I lib/ -I src/ src/org.ml
File "src/simtrade.ml", line 78, characters 20-45:
Error: Unbound module Org
OCamlMakefile:951: recipe for target 'src/simtrade.cmi' failed
make[2]: *** [src/simtrade.cmi] Error 2
make[2]: *** Waiting for unfinished jobs....
File "lib/glcaml.ml", line 164, characters 9-22:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "lib/glcaml.ml", line 166, characters 2-16:
Warning 3: deprecated: String.set
Use Bytes.set instead.
File "lib/glcaml.ml", line 3038, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 3049, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 3061, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 3674, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 4164, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 4174, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 4538, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 4580, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
File "lib/glcaml.ml", line 5172, characters 11-23:
Warning 3: deprecated: Array.create
Use Array.make instead.
make[2]: Leaving directory '/home/ivan/Downloads/wanderers'
OCamlMakefile:701: recipe for target 'native-code' failed
make[1]: *** [native-code] Error 2
make[1]: Leaving directory '/home/ivan/Downloads/wanderers'
Makefile:8: recipe for target 'sdl' failed
make: *** [sdl] Error 2
Can you check that you have "ocamldep" executable please?
I'm running Arch Linux too, but currently have version 4.02.1 of the compiler. I will check it with the new version now.
Can you check that you have "ocamldep" executable please?
Yes, ocamldep is /usr/bin/ocamldep
.
It all compiled successfully on my computer with the compiler version 4.02.3.
The reason why I'm asking to check "ocamldep" is that even though it's a part of the "ocaml" package, when I build the game it first starts by finding the dependencies: http://sprunge.us/dCYA While when you compile it, it immediately jumps into building the source code, and this is somewhat strange.
Why ocaml
and not c
? Your other games made in c
is great.
Because OCaml is more fun, and I would not try to make such a complex game in C. My C games are significantly simpler. And it's just a nice language, really.
Aslo, if you have a Windows machine, I have Win32 build: https://dl.dropboxusercontent.com/u/70985178/wanderers-2015-01-20.zip http://forums.roguetemple.com/index.php?topic=3888.0
Well, I am still learning c
and doesn't know about ocaml? I hope there is a easy book which teaches c
.
Back to the topic, what should I do to compile that?
That's no good that compilation breaks for no reason.. It would be really interesting to see if it will work on a Raspberry Pi, because I think it should be able to do that.
What puzzles me is that I have no idea what goes wrong. Can you show me, what ls -a
is saying? In particular, do you have the ._d
directory there? Because when ocamldep
runs, it puts the dependencies there. And I suspect that it did not run in your case.
The other games works well in Raspberry Pi, I haven't tested this yet. ls -a
shows:
./ COPYING data/ .gitignore lib/ makefile.inc OCamlMakefile src/
../ ._d/ .git/ info/ Makefile ._ncdi/ README.markdown
Ok, I don't know what the issue is. I think, the only solution for me is to ask OCaml gurus, you can do that too, if you want. Maybe OCamlMakefile
does not do things correctly on your machine. It is a complex makefile, which I appropriated from OCaml OpenGL library, and almost all project building machinery is in there. There were no issues before, so I did not care how it actually works.. I don't have a good solution at the moment, but I will try to figure it out.
Also, thank you for playing the games, and for the feedback too )