PlaneShift

Support => Linux Specific Issues => Topic started by: Akeliukas on July 05, 2009, 08:39:09 pm

Title: Stupid error while compiling
Post by: Akeliukas on July 05, 2009, 08:39:09 pm
It's not even a planeshift error, but I don't think I could get help enywhere else. So, I'm compiling Planeshift according to the PS Compiling Guide. The first one to compile is the cal3d. autoreconf goes well, as well as the ./configure. But make spits out  a stupid error:
 hardwaremodel.cpp: In member function ‘int CalHardwareModel::addVertex(CalHardwareModel::CalHardwareMesh&, int, CalCoreSubmesh*, int)’:
hardwaremodel.cpp:754: error: ‘memcpy’ was not declared in this scope
hardwaremodel.cpp:765: error: ‘memset’ was not declared in this scope
hardwaremodel.cpp:776: error: ‘memset’ was not declared in this scope
hardwaremodel.cpp:793: error: ‘memset’ was not declared in this scope
make[3]: *** [hardwaremodel.lo] Error 1
make[3]: Leaving directory `/home/liudvikas/development/cal3d/src/cal3d'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/liudvikas/development/cal3d/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/liudvikas/development/cal3d'
make: *** [all] Error 2

Any ideas why this is happening and how to avoid it?
Title: Re: Stupid error while compiling
Post by: TheRingmaster on July 05, 2009, 09:16:20 pm
This guide is from the Peragro Tempus wiki, but since the game is founded on the same technologies as PlaneShift, It should answer your questions.

http://wiki.peragro.org/index.php/Generic_linux
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 12:08:33 am
Really thanks, guide you gave me got me through that problem. Yet another one came up - planeshift version I downloaded requires crystalspace 1.4 or higher, yet mine is 1.2. Seems like a very stupid thing too, but still. Any help?
Title: Re: Stupid error while compiling
Post by: Nykolai Raskaniov on July 06, 2009, 12:44:45 am
Are you sure you're following the compiling guide to the letter?

http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html (http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html)

It says in there how to download the correct CS version and export variables.
Title: Re: Stupid error while compiling
Post by: TheRingmaster on July 06, 2009, 04:04:25 am
Really thanks, guide you gave me got me through that problem. Yet another one came up - planeshift version I downloaded requires crystalspace 1.4 or higher, yet mine is 1.2. Seems like a very stupid thing too, but still. Any help?


the guide for planeshift gives this svn address
Quote
svn co -r 32140 https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.4 cs
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 10:16:06 am
Well, eventually I figured that out myself. But I can assure you that in the guide I was following (http://planeshift.cvs.sourceforge.net/*checkout*/planeshift/planeshift/docs/compiling.html), it was clearly written:
svn co -r 27904 https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.2 cs
I removed all -r's and changed both cs and cel versions to 1.4, then downloaded the source again. I'm compiling cs right now, so far everything is good. But still, the guide was wrong. Someone should fix it.
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 10:20:05 am
Are you sure you're following the compiling guide to the letter?

http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html (http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html)

It says in there how to download the correct CS version and export variables.
It seems I've been following the wrong guide :). Then what the heck is that guide I was using? (link in post above). As I remember, planeshift.it directed me into it. What a shame.
Title: Segfault?
Post by: Akeliukas on July 06, 2009, 11:18:47 am
Great! PS has actually started. Yet, another problem :(. About in the middle of game area loading (just after logging in and choosing the character) it crashes with a segfault. ****! What can I do now?
Title: Re: Stupid error while compiling
Post by: Mordraugion on July 06, 2009, 01:08:23 pm
Well, eventually I figured that out myself. But I can assure you that in the guide I was following (http://planeshift.cvs.sourceforge.net/*checkout*/planeshift/planeshift/docs/compiling.html), it was clearly written:

Someone should fix it.
We havent used cvs for quite some time now and that guide is nolonger updated and please watch your language
Title: Re: Stupid error while compiling
Post by: Sen on July 06, 2009, 01:36:18 pm
Hi,

if I understand right it happens after you click the join button. In this case please check in the setup if you have vertex buffer object turned to off.

Sen
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 01:40:39 pm
Alright, I'm sorry. Won't swear no more.

What should I use then? Linux binary won't even show a game window: it crashes with a segfault immediately. Seems like I'm stuck.
I didn't probably provide you with all the information: Arch Linux, kernel 2.6.30, Radeon X1200 (integrated), AMD Athlon Dual Core 4450B, 2GB RAM.
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 01:42:54 pm
Hi,

if I understand right it happens after you click the join button. In this case please check in the setup if you have vertex buffer object turned to off.

Sen

Hi and thanks for your advice, but I don't know how to do this since planeshift-setup isn't compiled. Is it possible to do this by editing a file or something, since I cannot use planeshift-setup?
Title: Re: Stupid error while compiling
Post by: Sen on July 06, 2009, 03:08:21 pm
Yes, Im just not sure in which file (And I don't have a client right here) - maybe someone else knows for sure.
It should be an entry in either <ps/installation/dir>/psclient.cfg or in ~/PlaneShift/planeshift.cfg
Maybe you see it in one of these files before I get to my client :) (Btw, I think the settings in ~/PlaneShift override the settings in the installation directory.

Sen
Title: Re: Stupid error while compiling
Post by: weltall on July 06, 2009, 04:46:30 pm
i see you have an updated kernel so probably even using opensource drivers: planeshift doesn't always work correctly with such drivers because they are missing relevant needed features. In any case i'd suggest running it with gdb it will probably point you to the x.org drivers or some opengl function. Also try walktest before planeshift if one doesn't run the other won't either
Title: Re: Stupid error while compiling
Post by: Akeliukas on July 06, 2009, 09:44:15 pm
Well this'll have to wait since another problem came up. ./pslaunch displays a black window, named Crystal Space Application, and everything that is in there are white letters in the upper left corner :
Server status
All servers are up!
And that's all. Previously it also showed something like "updates available" and it seems that I clicked yes (it still was a simple black screen without anything on it), because I saw in console that updating began. Any ideas?

Edited

Alrgiht, got it fixed. Let's head back to the older problem - the segfault :). Now PS crashes just after I press PLAY button or just after I ./psclient instead of ./pslaunch. Seems that ./psclient directly launches the game, but that doesn't matter since the game won't work anyway. psclient also shows some interesting error messages:

DEBUG: Initializing OpenAL sound system
DEBUG: Retrieving available devices.
DEBUG: Default OpenAL device: '((sampling-rate 44100) (device '(native))
DEBUG: No device specified
DEBUG: Falling back on default device
DEBUG: Can't retrieve attributes size: OpenAL error ALC_INVALID_DEVICE
Segmentation fault


real classy, isn't it?
Seems that the sound is srewing the whole thing, not the video. Anyway, how to fix it?
Title: Re: Stupid error while compiling
Post by: weltall on July 07, 2009, 08:02:03 am
you could try going with software but i doubt.
open psclient.cfg search openal and change with software.
i'd really use gdb.
do gdb ./psclient then when it crashes do bt and bt full and post it
Title: Re: Stupid error while compiling
Post by: Oromir on July 07, 2009, 01:03:53 pm
I run this on Arch Linux reliably, and updated both the CS and cal3d AUR pkgbuild scripts. However, the CS build script does not account for the sticky road bug. To remove that, you need to run configure, then edit the jamconfig file, and change optimisation to -O0.

To install PS properly, first off, install the downloadable linux binary package, which will install itself into /opt. DO NOT RUN IT.

Then build cal3d from the pkgbuild, it will install into /usr/local.

Then manually build and install CS -- you need to install system wide, so remove the switch that tells it what dir to install to when running configure, then edit jamconfig file and change line for optimisation (cannot remember the exact key) to -O0 (it will have -O3 in it beforehand) before running make.

Then download PS client from svn, and build it in your home dir somewhere as user, but DO NOT install it.

Copy the psclient binary into /opt/PlaneShift, replacing the old client binary. If you did this right, the dir should have data and art subdirs in it.

Now, planeshift starts by using a shellscript placed in /usr/bin, that needs to be modified to point it to the new CS and cal3d libs.

Mine looks like this:
Code: [Select]
#!/bin/bash
cd /opt/PlaneShift
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
exec ./psclient $@

I hope this will be of some help to you, its what I did to get the client running reasonably reliably on my system. If you need any help, please find me on irc as bonzodog in #planeshift and #archlinux.





Title: Re: Stupid error while compiling
Post by: Akeliukas on July 07, 2009, 02:55:09 pm
Apparently, that wasn't a problem too. Planeshift wanted libopenal.so.0, so I symlinked libopenal.so.1 to it. :D
Frankly, running simply psclient.bin worked just fine. Yes, Planeshift did work! Thanks for advise, it was really nice. If I face any other problems, I'll make a new post, but for now - problem solved.