Author Topic: Compiling, Ubuntu Gutsy, problems  (Read 1814 times)

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Compiling, Ubuntu Gutsy, problems
« on: November 15, 2007, 06:05:48 pm »
Hello!
Surprise, surprise, I'm trying to compile everything and encountered some problems. I've managed to get to the point where I'm suppose to compile the actual PS-client. The configure goes well, but jamming produces this weird problem:
jam -aq client

...a ton of printing...

LinkApplication psclient
./out/linuxx86/optimize/libs/libpsnet-0.3.a(messages.o): In function `psMsgStringsMessage':
/home/timo/developement/planeshift/src/common/net/messages.cpp:3146: undefined reference to `inflateInit_'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3153: undefined reference to `inflate'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3154: undefined reference to `inflateEnd'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3146: undefined reference to `inflateInit_'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3153: undefined reference to `inflate'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3154: undefined reference to `inflateEnd'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3079: undefined reference to `deflateInit_'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3083: undefined reference to `deflate'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3085: undefined reference to `deflateEnd'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3079: undefined reference to `deflateInit_'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3083: undefined reference to `deflate'
/home/timo/developement/planeshift/src/common/net/messages.cpp:3085: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status

...some printing...

...failed LinkApplication psclient ...
...failed updating 1 target(s)...
...updated 222 target(s)...

It seems to me that in function psMsgStringsMessage it tries to call methods or macros that are not declared anywhere. These seem to be among the ones provided by the zlib. Though zlib is not included in this file and even if I would include it, it still complains about the same thing. It is included in the file cs/include/csutil/zip.h so I suppose it's suppose to get them from there. My C++ knowledge is rather limited so that's probably the reason I'm not getting this.. I've also checked the zlib.h and it contains the macros/functions:

for exmaple:
ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
                                     const char *version, int stream_size));

Anybody has any ideas?

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #1 on: November 28, 2007, 02:39:43 am »
Ok. Well, I suppose nobody has any ideas. Well I hope I have some free time at Christmas time so that I can get it compiled and perhaps post some tips for others to use. We'll see what happens, but one thing is for sure: some day I'm going to compile this game what ever it takes! :)

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Compiling, Ubuntu Gutsy, problems
« Reply #2 on: November 28, 2007, 03:32:17 am »
What revision of CrystalSpace are you using?

if all else fails give my build guide a go:

http://vaalnor.mine.nu/psdoc/?q=node/51

Rayken

  • Hydlaa Citizen
  • *
  • Posts: 378
  • postcount--;
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #3 on: November 28, 2007, 09:58:51 pm »
I had a similar issue in Gentoo, and it turned out that my binutils had been upgraded by portage but I'd failed to switch to the right version (it's slotted, so more than one can exist on your system at the same time).  I don't know how this translates into Debian, but it's something to check for.
"Here's to lowering caskets of old friends choice and consequence we'll birth a new day with the death of an old and start over, start over.  Here's to burying hatchets in those who you'd never call your friend...we'll birth a new day with the death of an old day and start over, start over!"

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #4 on: November 28, 2007, 11:06:32 pm »
Hey thanks!
I tried your guide and got a bit further this time. It compiles, but wont start..
timo@timo-desktop:/opt/planeshift_svn/planeshift$ ./runpsclient
WARNING: could not load plugin 'crystalspace.graphics3d.opengl'
DEBUG: Sound System Software Renderer Initializing...
WARNING: could not load plugin 'crystalspace.sndsys.software.driver.alsa'
WARNING: could not load plugin 'crystalspace.sndsys.software.driver.crystalspace.sndsys.software.driver.alsa'
ERROR: Failed to load driver as [crystalspace.sndsys.software.driver.alsa] or [crystalspace.sndsys.software.driver.crystalspace.sndsys.software.driver.alsa].
WARNING: failed to initialize plugin 'crystalspace.sndsys.renderer.software'
WARNING: could not load plugin 'crystalspace.sndsys.element.ogg'
No 3D driver!
WARNING: could not load plugin 'crystalspace.font.server.freetype2'
WARNING: could not load plugin 'crystalspace.font.server.freetype2'
ERROR: Couldn't load plugin with class 'crystalspace.font.server.freetype2'!
psclient:  No 3d driver (iGraphics3D) plugin!

Also I'm a bit curious 'cos there's no updater. There is no file called updater. And in fact as far as I have understood correctly the linux updater is actually named just up, but it's missing too. But I suppose this all doesn't really matter since the updater doesn't work as far as I know. I copied the data and art from a previous package install.

I also didn't quite understand your instructions about editing the updaterconfig.xml file. If my eyes are not deceiving me there's nothing highlighted in blue?

Anyways heres the contents of the planeshift folder:
timo@timo-desktop:/opt/planeshift_svn/planeshift$ ls | cat
art
autogen.sh
autom4te.cache
backup
cal3d
cel
config.log
config.status
configure
configure.ac
cs
data
docs
eedit.cfg
include
Jamconfig
Jamfile
Jamfile.in
Jamrules
lang
mk
npcclient.cfg
out
planeshift.cfg
profile
psclient
psclient.cfg
psclient.cfg~
psclient.cfg.bak
psclient.cfg.bak~
psclient.dbg
psserver.cfg
pssetup
pssetup.cfg
pssetup.dbg
psupdater.cfg
runpsclient
src
tools
updaterconfig.xml
updaterconfig.xml~
updaterconfig.xml.bak
vfs.cfg

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Compiling, Ubuntu Gutsy, problems
« Reply #5 on: November 28, 2007, 11:41:33 pm »
for the updater issue, assuming you are using stable from svn make sure you have cURL installed and then reconfigure ps and jam updater. it also seems like your CS build did work right.

Rayken

  • Hydlaa Citizen
  • *
  • Posts: 378
  • postcount--;
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #6 on: November 29, 2007, 01:01:10 am »
For the error message, check to make sure that you have the OpenGL libs properly installed.  I had this happen once too, and that was the fix.  Though I have seen it come up other times where that wasn't the issue...
"Here's to lowering caskets of old friends choice and consequence we'll birth a new day with the death of an old and start over, start over.  Here's to burying hatchets in those who you'd never call your friend...we'll birth a new day with the death of an old day and start over, start over!"

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #7 on: November 29, 2007, 07:53:03 am »
I already have cURL installed.
timo@timo-desktop:/opt/planeshift_svn/planeshift$ jam updater
don't know how to make updater
...found 1 target(s)...
...can't find 1 target(s)...

And for the other reply: What libs do you mean?  apt-cache search opengl libs gives a long list from which of I can not figure out what should I install. If you simply meant the dirvers I do have the nvidia 100.14.19 drivers installed.

timo@timo-desktop:/opt/planeshift_svn/planeshift$ svn info
Path: .
URL: https://planeshift.svn.sourceforge.net/svnroot/planeshift/stable
Repository Root: https://planeshift.svn.sourceforge.net/svnroot/planeshift
Repository UUID: 2752fbe2-5038-0410-9d0a-88578062bcef
Revision: 315
Node Kind: directory
Schedule: normal
Last Changed Author: mgist
Last Changed Rev: 279
Last Changed Date: 2007-11-17 23:24:43 +0200 (Sat, 17 Nov 2007)


Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Compiling, Ubuntu Gutsy, problems
« Reply #8 on: November 29, 2007, 12:03:36 pm »
when you configure ps it seems to not find curl so either you have it in a place configure cant find or it is not the right version for ps.

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #9 on: November 29, 2007, 11:57:30 pm »
Hmm.. I'm having some problems at replying.. I've tried to reply all day and I finally figured out what was the problem:
It was this line:
Protocols: t_ftp ftp telnet dict ldap http file https ftps
For some reason removing that _ will result in this:
Forbidden
You don't have permission to access /smf/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at www.hydlaa.com Port 80


timo@timo-desktop:/opt/planeshift_svn/planeshift$ curl --version
curl 7.16.4 (i486-pc-linux-gnu) libcurl/7.16.4 OpenSSL/0.9.8e zlib/1.2.3.3 libidn/1.0
Protocols: t_ftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

timo@timo-desktop:/opt/planeshift_svn/planeshift$ whereis curl
curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz

timo@timo-desktop:/opt/planeshift_svn/planeshift$ ./configure --with-libcal3d=$CAL3D >> config.log
timo@timo-desktop:/opt/planeshift_svn/planeshift$ cat config.log | grep curl
configure:18820: checking for curl
checking for curl... configure:18836: result: no
my_cv_curl_vers=NONE

Ok you're right. The configure can't find curl.

The configure file lines 18809-18840:

#----------------------------------------------------------------------------
# Check for Curl
#----------------------------------------------------------------------------


 if test "${my_cv_curl_vers+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 my_cv_curl_vers=NONE
  check="7.7.2"
 { echo "$as_me:$LINENO: checking for curl" >&5
echo $ECHO_N "checking for curl... $ECHO_C" >&6; }
 if eval curl-config --version 2>/dev/null >/dev/null; then
   ver=`curl-config --version | sed -e "s/libcurl //g"`
   CURL_CFLAG=`curl-config --cflags `
   CURL_LIBS=`curl-config --libs `
   CURL_VERSION=`curl-config --version | sed -e "s/libcurl //g"`
   cs_jamconfig_text="${cs_jamconfig_text}CURL.AVAILABLE ?= \"yes\" ;
"
   cs_jamconfig_text="${cs_jamconfig_text}CURL.CFLAGS ?= \"$CURL_CFLAG\" ;
"
   cs_jamconfig_text="${cs_jamconfig_text}CURL.LFLAGS ?= \"$CURL_LIBS\" ;
"
   { echo "$as_me:$LINENO: result: $CURL_VERSION" >&5
echo "${ECHO_T}$CURL_VERSION" >&6; }
 else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
 fi

fi

This goes beyond my understanding of bash. Though, I was able to understand that it would like to run a command called curl-config. Such command was not present on my computer but I soon enough learnt that libculr4-openssl-dev and libcurl4-guntls-dev provide such a command.
So I tried:
timo@timo-desktop:/opt/planeshift_svn/planeshift$ sudo apt-get install libssl-dev libidn11-dev libkadm55 libkrb5-dev libcurl4-openssl-dev
timo@timo-desktop:/opt/planeshift_svn/planeshift$ ./configure --with-libcal3d=$CAL3D >> config.log
timo@timo-desktop:/opt/planeshift_svn/planeshift$ cat config.log | grep curl
configure:18820: checking for curl
checking for curl... configure:18833: result: 7.16.4
my_cv_curl_vers=NONE

Now it seems to find the curl but the same errors persist. Then I also tried:
sudo apt-get remove libssl-dev libidn11-dev libkadm55 libkrb5-dev libcurl4-openssl-dev
sudo apt-get install libcurl4-gnutls-dev libgcrypt11-dev libgnutls-dev libgnutlsxx13 libgpg-error-dev libidn11-dev libkadm55 libkrb5-dev liblzo2-dev libopencdk8-dev libpopt-dev libtasn1-3-dev
But the result was the same..

Then I realized there's one thing I could do get more information (how come I didn't think of it sooner.. :) )
timo@timo-desktop:/opt/planeshift_svn/planeshift$ cat config.log | grep error
and
timo@timo-desktop:/opt/planeshift_svn/planeshift$ cat config.log | grep no
The printings are rather long so I'm not going to bloat the post with it. Here's the entire config.log if somebody has the time to check it out.
http://www.cs.helsinki.fi/u/tglehto/tmp/config.log


Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Compiling, Ubuntu Gutsy, problems
« Reply #10 on: December 03, 2007, 03:29:27 pm »
looks to me like you need curls dev packages so you get the header files. It appears that gusty includes curl4 now so the command (I've updated it on the guide) should actually read:

Code: [Select]
sudo apt-get --assume-yes install libjpeg62-dev x11proto-gl-dev autoconf jam bison flex-old automake1.9 libcurl4-openssl-dev libmng-dev libmikmod2-dev libogg-dev libvorbis-dev zlib1g-dev libpng12-dev build-essential libtool libglu1-mesa-dev libglu1-xorg-dev xserver-xorg-dev libxt-dev libopenal0a libopenal-dev subversion zlibc libttf2 libfreetype6-dev libfreetype6 libasound2-dev alsa-oss libxxf86vm-dev libxext-dev x11proto-xext-dev
So first, I would run the above command to make sure all dependencies are installed.  What I'm not sure of is if the configure is setup correctly to detect a newer version of libcurl than curl3 so thats up in the air and I don't have time to check atm (I'm at work).  This is something to find out though.

Also to consider is (unless something has changed recently) the updater repositories are not current and so will not get current art.  Unfortunately this means you need to download the art from another source such as the binary and copy it over.  I leave the guide on my site as it is because its the correct way of doing it but atm it doesn't work (hasn't in a while). This means really I should have a footnote describing the process somewhere on the site.  The process basically entails copying over the art and data directories.  Its possible that someone has an art zip up somewhere for download.


And on a fun sidenote:

Code: [Select]
cat config.log | grep curl
isn't necessary.

Code: [Select]
<config.log grep curl
Is faster, particularly on large files so its more useful in shell scripts. ;)
« Last Edit: December 03, 2007, 04:26:56 pm by Induane »

Alcareru

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: Compiling, Ubuntu Gutsy, problems
« Reply #11 on: December 08, 2007, 01:02:28 pm »
Hi.
Sorry I've been away from my computer so haven't been able to try this out.. I tired the updated apt-get command, but still the same errors persists. I'll try to do it all again right from the very beginning, just to be sure..
Btw is the gutsy-backports repository necessary? I don't feel quite comfortable enabling it. I suppose I have to try it out..

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Compiling, Ubuntu Gutsy, problems
« Reply #12 on: December 10, 2007, 08:02:05 am »
If I recall correctly I had to do it because I needed a dependency that wasn't met with the standard repo's (wasn't new enough or some such but I already forgot :) ).  That said I always operate with backports enabled and have had no issues as a result of it.