Jump to content
Sign in to follow this  
HalosGhost

Compiling Tile World 2.0 on Fedora x86

Recommended Posts

Hey everyone! I've been playing the original levelset (cc-ms) for a while now on 1.3.0. It's been a great nostalgia trip and I've loved it. I recently (I know, I know; I'm out of the loop) heard that Tworld 2.0 had been released and instantly went to compile it.

 

I originally had issues that g++ and qmake weren't installed (using not my primary machine right now), but that was easily fixed. However, now I run into an issue where the following error output is posted ending with make erroring out, so the build never finishes.

 

../generic/in.c: In function ‘const tablespec* keyboardhelp(int)’:
../generic/in.c:570:5: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Compiling _sdlsfx.c...
cc -Wall -I. -DNDEBUG '-DROOTDIR="/usr/local/share/tworld"' -D__TWPLUSPLUS -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -c -o _sdlsfx.o _sdlsfx.c
Compiling oshwbind.cpp...
g++ -Wall -I. -DNDEBUG '-DROOTDIR="/usr/local/share/tworld"' -D__TWPLUSPLUS -I/usr/include -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml   -c -o oshwbind.o oshwbind.cpp
oshwbind.cpp: In function ‘void TW_DebugSurface(TW_Surface*, const char*)’:
oshwbind.cpp:333:57: error: invalid conversion from ‘const Qt_Surface*’ to ‘Qt_Surface*’ [-fpermissive]
make[1]: *** [oshwbind.o] Error 1
make[1]: Leaving directory `/home/Perichor/Downloads/tworld-2.0.0/oshw-qt'
make: *** [liboshw-qt.a] Error 2

 

The second line, "warning: deprecated conversion..." is posted around 25 times without change. Having read a few threads about this, it would seem one of the fixes I need is to add -fpermissive to g++, but I am unfamiliar with how to do that. I am also unfamiliar with what to do to fix the other errors.

 

Any and all help is appreciated!

 

All the best,

 

-HG

Share this post


Link to post
Share on other sites

Just remove the "const" on line 333 of oshw-qt/oshwbind.cpp.

 

- Madhav.

 

I am sorry to say that did not solve the problem. The compile still errored out. This time, it also reported that "uic: command not found." An error it did not post before. Do you feel as though that is the root problem?

 

Unrelated question. I just compiled 1.3 on an x86_64 build of Fedora 16, and in trying to transfer all my progress, my tws files read as invalid. Is this because it's an x64 machine rather than an x86? And if so, is there any way to fix that? I really don't want to start over on my levels, but I would really rather play on the other computer.

 

All the best,

 

-HG

Share this post


Link to post
Share on other sites

Did you back up your TWS files? There's a known bug in 1.3 that corrupts TWS files in the original Tile World when it tries to load them on a 64-bit system. Any TWS you loaded in the 64-bit unpatched Tile World probably got irrevocably broken. It really sucks!

 

Someone years ago wrote a patch to fix it, it ended up on the Debian bugtracker and didn't get adopted until I and some others prodded the maintainer. Since by that point the original TW developer had long abandoned the project, the upstream never got the patch. The patch can be found here. I'm surprised Fedora doesn't seem to have ever packaged Tile World.

 

If you're missing uic, you probably don't have the full Qt 4 development libraries installed or something. Or it's possible that Fedora packaged Qt in a way that put uic in a separate package.

Share this post


Link to post
Share on other sites

This time, it also reported that "uic: command not found." An error it did not post before. Do you feel as though that is the root problem?

This is unrelated to the previous error. Perhaps there's another package that you need to install which contains Qt Designer and uic.

 

 

I am sorry to say that did not solve the problem. The compile still errored out.

Are you sure you got the same error message? Or only the one about uic?

 

 

- Madhav.

Share this post


Link to post
Share on other sites

Did you back up your TWS files? There's a known bug in 1.3 that corrupts TWS files in the original Tile World when it tries to load them on a 64-bit system. Any TWS you loaded in the 64-bit unpatched Tile World probably got irrevocably broken. It really sucks!

 

Someone years ago wrote a patch to fix it, it ended up on the Debian bugtracker and didn't get adopted until I and some others prodded the maintainer. Since by that point the original TW developer had long abandoned the project, the upstream never got the patch. The patch can be found here. I'm surprised Fedora doesn't seem to have ever packaged Tile World.

 

If you're missing uic, you probably don't have the full Qt 4 development libraries installed or something. Or it's possible that Fedora packaged Qt in a way that put uic in a separate package.

 

I figured that might be the case, so I do have the TWS file backed up. And thank you for the patch information. I'll see if I can't figure out how to add that to my build so I can at least continue on 1.3.

This is unrelated to the previous error. Perhaps there's another package that you need to install which contains Qt Designer and uic.

 

 

 

Are you sure you got the same error message? Or only the one about uic?

 

 

- Madhav.

No, I did not get the same error message, that change resolved at least that much. As for uic, I do have the full qt4-devel libraries as provided by one of my repos, but I still do not have that command, given that, I could just compile qt4 from source, then I should have all of it available. I'll give that a go later. I cannot do so now because the machine I'd really prefer to build on (the x64 machine) has no working internet connection for now. So, I'm having to side-load all the source-code of everything I want to build, haha.

 

[EDIT]: I went searching through my libraries for qt4, and it turns out I do have uic, it just wasn't in-PATH. I'm changing that now, and we'll see if that solves the issue.[/EDIT]

 

[EDIT2]: Having done that, I ran make again, and faced the same error but with moc. Same problem, same fix. The build now functions perfectly on my x86 machine (excepting the bugs everyone is familiar with). I will attempt to do the same on my x64 machine, but if there is a patch for it to handle tws files better, that'd be much appreciated.[/EDIT]

 

By the way, thank you all for your help. I am very excited to be able to play on 2.0. Though, from what I hear, x64 builds of 2.0 on linux don't handle TWS files correctly anyway. Is there a patch for 2.0 that fixes it?

 

All the best,

 

-HG

Share this post


Link to post
Share on other sites

... x64 builds of 2.0 on linux don't handle TWS files correctly anyway. Is there a patch for 2.0 that fixes it?

The problem and patch are the same for both 1.3 and 2.0.

In the filereadint32 function in fileio.c, change all 4 instances of "(unsigned char)byte" to "(unsigned int)byte".

 

- Madhav.

Share this post


Link to post
Share on other sites

The problem and patch are the same for both 1.3 and 2.0.

In the filereadint32 function in fileio.c, change all 4 instances of "(unsigned char)byte" to "(unsigned int)byte".

 

- Madhav.

 

Fabulous. Both builds are up and running now, perfectly. Thank you Madhav!

 

All the best,

 

-HG

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...