Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error on Linux #2

Open
pickfire opened this issue Sep 15, 2015 · 10 comments
Open

Make error on Linux #2

pickfire opened this issue Sep 15, 2015 · 10 comments

Comments

@pickfire
Copy link

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
@a-nikolaev
Copy link
Owner

Can you check that you have "ocamldep" executable please?

@a-nikolaev
Copy link
Owner

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.

@pickfire
Copy link
Author

Can you check that you have "ocamldep" executable please?

Yes, ocamldep is /usr/bin/ocamldep.

@a-nikolaev
Copy link
Owner

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.

@pickfire
Copy link
Author

Why ocaml and not c? Your other games made in c is great.

@a-nikolaev
Copy link
Owner

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

@pickfire
Copy link
Author

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?

@a-nikolaev
Copy link
Owner

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.

@pickfire
Copy link
Author

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

@a-nikolaev
Copy link
Owner

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 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants