JediOutcastLinux
JediOutcastLinux copied to clipboard
x86_64 build support
Hello:
Thank you so much for this wonderful work! I am so thankful that somebody took an opportunity to get this into a repository and begin working with it. Many kind thanks to the developers and contributors for this project.
I have been a fan of this particular game since its release over 10 years ago, and I have been a GNU/Linux user for longer so I think this is a win/win and my hat is off to those people who are working on this. Thank you.
I did have some questions and I am needing some help. I was able to get this to run perfectly on x86 but I am having a difficult time getting it to compile against x86_64. I have pasted the error messages I am seeing thus far.
[ 6%] Building CXX object CMakeFiles/jk2gamex86.dir/code/cgame/cg_camera.cpp.o
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp: In function ‘void CGCam_Track(const char_, float, float)’:
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp:523:26: error: cast from ‘char__’ to ‘int’ loses precision [-fpermissive]
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp:565:43: error: cast from ‘char__’ to ‘int’ loses precision [-fpermissive]
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp: In function ‘void CGCam_FollowUpdate()’:
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp:651:39: error: cast from ‘char__’ to ‘int’ loses precision [-fpermissive]
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp: In function ‘void CGCam_TrackEntUpdate()’:
/tmp/jk2/JediOutcastLinux/code/cgame/cg_camera.cpp:822:32: error: cast from ‘char__’ to ‘int’ loses precision [-fpermissive]
gmake[2]: *_* [CMakeFiles/jk2gamex86.dir/code/cgame/cg_camera.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/jk2gamex86.dir/all] Error 2
gmake: *** [all] Error 2
Googling around, I see lots of posts for this kind of problem, and many different recommendations on what should be used instead of it, for 64bit systems. Some have suggested replacing the integer call with a call to "intptr_t" instead. There are lots of discussions about it, some heated - because I am not a code person, I don't know how to correctly implement this, nor do I know or understand what this call would do, so I think it's better for me to ask for help here and get people's ideas about it from here before I start tinkering.
Another poster on this project mentioned that they installed multilib (I suppose that this must be a arch linux or gentoo linux system for that user); this system I am working with here is an openSUSE GNU/Linux system that I am using and multilib was not available to me, but I did try to install 32bit compatible packages and I was able to get close, but I wasn't able to get a 32bit compatible binary/driver for my openGL driver/binary (that's compiled for x86_64 against this kernel). I am using the proprietary NVidia driver.
So I am hoping that the developers and maintainers for this project could examine these lines and perhaps decide if there is a way for the code to detect system architecture and be able to compensate for these cast / integers calls so they are compatible/successful on 64bit systems. I would be willing to test any patches and report my findings.
Please let me know your thoughts and if there is anything I could try then that would be great.
Thank you so much again for your work on this project.
I'm sorry. I don't provide a 64bit build of this project. I just don't have the time and I don't think a few line changes will do the trick. This is at least a full 5 days work (a very rough and optimistic estimate). And this is without testing the whole game again. The project is huge, and there are a lot of loading/saving of assets which (I guess) rely on specific sizes of value types. Even if this is not a problem at all, at least somebody has to check this and a lot of other stuff.
On Ubuntu it runs really good on a 64bit system with the multilibs. Maybe this is possible for openSUSE as well. Have another look at this.
I know this is not the answer you were hoping for, but maybe somebody else out there will make the 64bit port and post it for everybody to use.