Closed Dentosal closed 9 years ago
I suspect this happens because in game_control.h
the bind
function is not declared to be override
in those classes inheriting from input::InputContext
.
If you like, you may try adding missing methods inherited from the InputContext
of input/input_context.h
to the game_control.h
classes. Just copy the header file entry of the bind
function to the inheriting classes, remove the virtual
keyword and append override
at the end.
I experienced the same issue with clang. Here is a workaround:
@darrenstrash what compiler did you try to use before when it failed?
The build failed with clang 3.6.0: OSX Yosemite 10.10.4 (14E46) Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.4.0
This particular error is actually easy to fix, as there is no method matching the signature bind(action_t, const action_check_t). However, there are several other build errors. One of the more difficult errors is that clang does not have support for thread_local variables with "non-trivial destructors".
Yep, it worked with g++-5
.
Make still failed:
Scanning dependencies of target run
[ 91%] Building CXX object CMakeFiles/run.dir/run.cpp.o
Linking CXX executable run
ld: library not found for -lpython3.4
collect2: error: ld returned 1 exit status
make[3]: *** [run] Error 1
make[2]: *** [CMakeFiles/run.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build] Error 2
Started to research, and turned out that compiler needs to be started with flag -L/Library/Frameworks/Python.framework/Versions/3.4/lib/
in order to work. Despite of my search I was unable to find place to insert this flag.
You can use ccmake
to modify cmake variables (e.g. link include dir) in a ncurses gui. But the actual solution is of course to fix the link path finding for python once again.
@Dentosal There is an open issue for this error, which I am currently working on. In the meantime, here is a super kludgy solution: edit the file ./bin/build-name/CMakeFiles/run.dir/link.txt
to include your -Ldir
statement. Then run make
. This is incredibly ugly, but it works.
Ok, thanks. I'll close this issue now. Maybe this should be included in building instructions?
Bwahaha, not that hack :D
Did you try the ccmake
configuration?
No I didn't. I have no experience with ccmake, so I will just wait somebody to fix it. (Laziness works always).
And I mean the thing about using g++-5
instead of g++
.
The spirit of this bug still applies, since the clang build fails. We should probably open a new ticket for that.
Go for it. If you can fix it with a pullreq, even better.
Agreed; however, "make test" is also failing on Mac, so I'll need to do it from Linux. I've opened an issue for this too.
I was trying to follow instructions from https://github.com/SFTtech/openage/blob/master/doc/building.md, but I was unable to compile. I installed all the prerequisites, but build failed with error message:
OS stats:
./configure --compiler=clang