Author Topic: Compiler error possibly related to cURLlib  (Read 1463 times)

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Compiler error possibly related to cURLlib
« on: June 24, 2010, 02:11:38 pm »
I used to run a binary install of PS on my HP EliteBook 8530w:

Ubuntu 10.04 LTS kernel Linux 2.6.32-22-generic
2x Intel(R) Core(TM)2 Duo CPU     T9600  @ 2.80GHz
32-bits architecture with 4 GB RAM (Including the 512MB that is dedicated to the video card)
nVidia Quadro FX 770M 512 MB RAM

I could only run in lowest graphics configurations or my GPU would overheat, though I had no such problems with games I ran under Windows with DirectX on this machine. The Quadro card is designed to work with OpenGL instead of DirectX and according to internet benchmarks, it should run approximately twice as good with OpenGL as with DirectX. For me it is strangely quite the other way around.

This is the error I get when I'm compiling the client with
Code: [Select]
jam -aq client
Code: [Select]
LinkApplication pslaunch
./out/linuxx86/optimize/src/pslaunch/download.o: In function `Downloader':
/home/user/planeshift/planeshift/src/pslaunch/download.cpp:151: undefined reference to `curl_easy_init'

Note: It keeps on giving very similar errors for a while before it quits, but I only posted the first one, since I guess there is one common cause.
« Last Edit: June 25, 2010, 07:09:15 am by Blodskaal »

RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #1 on: June 24, 2010, 02:17:36 pm »
make sure you have the dev(el) package for (lib)curl installed, else it won't find it and therefore error out.
as for graphic card load: make sure to pick games with similiar graphical capabilities as something to compare with.
a rather good comparision imo would be Oblivion for example ;)

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #2 on: June 24, 2010, 03:51:57 pm »
Ah certainly, Oblivion ran fine on this machine. Though after playing for a while I began to abhor the gameplay, I consider Morrowind far superior in gameplay, only Oblivion's combat system is better. Note that Oblivion ran without problems, on medium/high graphical settings, and PlaneShift is running slightly less fine on the very lowest settings, while sound is disabled (because of Linux issues).

I'm not sure which packages I should install for cURLlib. I've got the following installed:


Code: [Select]
sudo aptitude search cURL | grep ^i
i   curl                            - Get a file from an HTTP, HTTPS or FTP serv
i   gnupg-curl                      - GNU privacy guard - a free PGP replacement
i   libcurl3                        - Multi-protocol file transfer library (Open
i   libcurl3-dbg                    - libcurl compiled with debug symbols       
i   libcurl3-gnutls                 - Multi-protocol file transfer library (GnuT
i   libcurl4-gnutls-dev             - Development files and documentation for li
i   liblua5.1-curl-dev              - libcURL development files for the Lua lang
i   liblua5.1-curl0                 - libcURL bindings for the Lua language vers
i   libwww-curl-perl                - Perl bindings to libcurl                 
i   python-pycurl                   - Python bindings to libcurl               
i   spl-curl                        - SPL Programming Language -- curl adapter

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Compiler error possibly related to cURLlib
« Reply #3 on: June 24, 2010, 04:40:55 pm »
looks like you have the libs did you configure the package before installing them maybe?

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #4 on: June 24, 2010, 05:31:56 pm »
good call, I installed the development headers for cURLlib after the configure.
NOTE: It's about ten minutes into compilation that the error shows up, so I'll have to wait for the results.
Code: [Select]
successfully compiledNow it won't run pslaunch because of some error with CS.
Code: [Select]
recompiling Crystal Space... finished all right
Code: [Select]
recompiling PS just to be sure...finishedNow I'm stuck with this
Code: [Select]
./pslaunch: error while loading shared libraries: libcrystalspace-1.9.so: cannot open shared object file: No such file or directory
I'm pretty sure I set $CRYSTAL right
« Last Edit: June 25, 2010, 06:52:57 am by Blodskaal »

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #5 on: June 25, 2010, 07:09:01 am »
It seems I didn't set LD_LIBRARY_PATH right, now that that's done, I still have a problem with finding CS.
Code: [Select]
planeshift/planeshift/pslaunch --verbose
SCF_NOTIFY: scanning plugin directory: /home/user/planeshift/planeshift (context `app'; recursive no)
SCF_NOTIFY: registering plugin /home/user/planeshift/planeshift/bgloader.so in context `app'
SCF_NOTIFY: registering class crystalspace.bgloader in context `app' (from /home/user/planeshift/planeshift/bgloader.so)
SCF_NOTIFY: scanning plugin directory: /home/user (context `{none}'; recursive no)
NOTIFY: loading plugin instance for crystalspace.kernel.vfs
WARNING: could not load plugin 'crystalspace.kernel.vfs'
 * This likely means that the plugins could not be found.
 If you're a user: Check the working directory the application starts from -
  usually, it is the same as the directory with the executable.
  If in doubt, contact the vendor.
 If you're a developer: Check if the CRYSTAL environment var points to the
  correct location - usually the directory CS was built in.
  You can also use the '--verbose' command line switch to troubleshoot
  where CS looks for plugins.
NOTIFY: loading plugin instance for crystalspace.kernel.vfs
WARNING: could not load plugin 'crystalspace.kernel.vfs'
 * This likely means that the plugins could not be found.
 If you're a user: Check the working directory the application starts from -
  usually, it is the same as the directory with the executable.
  If in doubt, contact the vendor.
 If you're a developer: Check if the CRYSTAL environment var points to the
  correct location - usually the directory CS was built in.
  You can also use the '--verbose' command line switch to troubleshoot
  where CS looks for plugins.
NOTIFY: loading plugin instance for crystalspace.kernel.vfs
WARNING: could not load plugin 'crystalspace.kernel.vfs'
Segmentation fault

EDIT:
It all comes down to the fact that when I use the export command the variables aren't persistent. I'm now checking things and recompiling with the variables set in the right way, since even when the variables were set correctly I still got an error:
Code: [Select]
./planeshift/planeshift/pslaunchWARNING: could not load plugin 'crystalspace.window.x.extf86vm'
WARNING: could not load plugin 'crystalspace.sndsys.renderer.openal'
WARNING: could not load plugin 'crystalspace.sndsys.renderer.openal'
Couldn't open xml file '/this/updateservers.xml'!
Unable to get root node!
Checking for updates to the updater: Using mirror http://testing.xordan.com/ for updaterinfo.xml
Segmentation fault

Ok did this:
Set the variables CRYSTAL and LD_LIBRARY_PATH
Code: [Select]
~/planeshift/autoreconf.sh
~/planeshift/configure --with-cal3d=$HOME/planeshift/cal3d --enable-cpu-specific-optimizations=native
~/sudo -q client
Now it works.

I can really recommend https://planeshift.svn.sf.net/svnroot/planeshift/trunk/docs/compiling.html. It tells you clearly what to do.
One thing I didn't get was this: exported variables don't persist, so you have to follow this entire tutorial in one terminal, no closing it and opening a new one.
« Last Edit: June 25, 2010, 08:20:59 am by Blodskaal »

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #6 on: June 25, 2010, 08:19:23 am »
A "live support" might be available in the IRC channel #planeshift-build on FreeNode. May be more convenient than waiting for replies in the forum.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #7 on: June 25, 2010, 08:22:57 am »
I managed to fix it. I followed this tutorial https://planeshift.svn.sf.net/svnroot/planeshift/trunk/docs/compiling.html the whole time, but I didn't realize that exported variables aren't persistent. I closed the terminal and opened a new one halfway, messing up my install configurations.

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Compiler error possibly related to cURLlib
« Reply #8 on: June 25, 2010, 08:24:50 am »
yes the only way to make them persistent is adding them to the script which are run just before giving you control of the terminal

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #9 on: June 25, 2010, 11:32:07 am »
For some odd reason PS wouldn't launch anymore (clicking Play in the loader gave a segmentation fault) I managed to fix that by commenting out this line ;System.Plugins.iSndSysRenderer = crystalspace.sndsys.renderer.openal in psclient.cfg
EDIT: I managed to fix it, I wrote a shell script that I run to start planeshift, with these lines:

Code: [Select]
#!/bin/bash
export CRYSTAL=$HOME/planeshift/cs
export LD_LIBRARY_PATH=$HOME/planeshift/cal3d/src/cal3d/.libs/:$HOME/planeshift/cs
$HOME/planeshift/planeshift/pslaunch

The error was because I had forgotten the forward slash shown below.
export LD_LIBRARY_PATH=$HOME/planeshift/cal3d/src/cal3d/.libs/:$HOME/planeshift/cs
« Last Edit: June 25, 2010, 11:50:28 am by Blodskaal »

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #10 on: June 25, 2010, 12:15:02 pm »
That was working, after I closed planeshift it won't play anymore, but quits when I hit the "play" button O_o I'm officially getting weirded out by this. It still shows lots of errors when I run in terminal, but none of those were fatal before.

I'm getting closer to the source of the problem.
I can't seem to play when I start it like this:
Code: [Select]
~/planeshift/planeshift/pslauncher.shbut I can play when I start like this:
Code: [Select]
cd ~/planeshift/planeshift; ./pslauncher.shBut then there's still a chance that it will fail.
« Last Edit: June 25, 2010, 01:08:42 pm by Blodskaal »

Sen

  • Hydlaa Notable
  • *
  • Posts: 746
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #11 on: June 25, 2010, 01:01:16 pm »
I'd just put psclient instead of pslaunch in the script you pasted before and use the script :)

Sen
.....also a saddle that won't pinch the tail. One day!

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #12 on: June 25, 2010, 01:08:03 pm »
Thanks! now it runs fine every time.

EDIT: minor problem, see edit of the next post.
« Last Edit: June 27, 2010, 04:49:44 pm by Blodskaal »

Blodskaal

  • Traveller
  • *
  • Posts: 12
    • View Profile
Re: Compiler error possibly related to cURLlib
« Reply #13 on: June 26, 2010, 02:43:56 pm »
I added two lines to my shell script, since I run compiz, which isn't necessary whilst I play Planeshift, but does take a lot of resources.
 
Code: [Select]
#!/bin/bash
metacity --replace
export CRYSTAL=$HOME/planeshift/cs
export LD_LIBRARY_PATH=$HOME/planeshift/cal3d/src/cal3d/.libs/:$HOME/planeshift/cs/:$LD_LIBRARY_PATH
$HOME/planeshift/planeshift/psclient
compiz --replace ccp&
This makes sure that compiz is replaced by the less resource hogging metacity, during the game.

EDIT: This system has one problem. Once I run this shell script, it hangs at the launch of psclient, then when I run it again, the first script starts PS. When I close PS, the second script starts PS, which is annoying. I wonder why this happens, and I'll try to fix this.
« Last Edit: June 27, 2010, 04:55:55 pm by Blodskaal »