Author Topic: Compiling Crystal Space  (Read 641 times)

GunChleoc

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Compiling Crystal Space
« on: March 25, 2017, 03:35:26 am »
Hi all,

I tried compiling the project on Ubuntu 16.04 following the compile guide, and I'm stuck with compiling Crystal Space. I'd thought I better ask here before I ask them, in case somebody else has had the same problem here.

First of all, using https with SourceForge is mandatory now, so the checkout line needs to be:

Code: [Select]
svn co -r 39798 http://svn.code.sf.net/p/crystal/code/CS/trunk cs
After checking out the code, I ran

Code: [Select]
$HOME/development/cs$ ./configure --without-java --without-perl --without-python --without-3ds --with-cal3d=$HOME/development/cal3d
and got stuck at:

Code: [Select]
config.status: creating Jamfile
config.status: executing include/csconfig.h commands
config.status: executing Jamconfig commands
config.status: executing Makefile commands
crystal@crystalspace3d.org's password:

I did some digging and this is used fot some MSI stuff for Windows, so I edited mk/jam/build.jam and commented out the line # include $(jamrulesdir)/msi.jam ;. Now the project will configure, but with a warning:

Code: [Select]
config.status: creating Jamfile
config.status: executing include/csconfig.h commands
config.status: executing Jamconfig commands
config.status: executing Makefile commands
config.status: WARNING: failed to create makefile emulation layer
configure:
******************************************************************************
***                 Crystal Space -- Configuration Summary                 ***
******************************************************************************
Build mode: optimize
Version: 2.1 (SVN: yes)

Optional Dependencies
---------------------
Found
  alsa                 (audio)
  cairo                (image)
  cal3d                (models)
  cg                   (rendering)
  freetype2            (other)
  jpeg                 (image)
  linux-joystick       (other)
  ogg                  (audio)
  opengl               (rendering)
  oss                  (audio)
  png                  (image)
  vorbis               (audio)
  x11                  (rendering)
  zlib                 (other)

Missing
  3ds                  (models)
  assimp               (models)
  bullet               (physics)
  cairomm              (image)
  cegui                (gui)
  curl                 (other)
  gtk                  (other)
  jackasyn             (audio)
  java                 (bindings)
  lcms                 (image)
  mng                  (image)
  ode                  (physics)
  openal               (audio)
  perl                 (bindings)
  python               (bindings)
  speex                (audio)
  theoradec            (image)
  vgvm                 (image)
  wxwidgets            (gui)

Then I ran

Code: [Select]
$HOME/development/cs$ jam -aq libs plugins cs-config walktest
And got the following output:

Code: [Select]
Jamfile: No such file or directory
don't know how to make walktest
...found 5 target(s)...
...can't find 1 target(s)...

If I remove walktest from the call, I still have a missing target.

Ravna

  • Hydlaa Resident
  • *
  • Posts: 65
  • Insane
    • View Profile
Re: Compiling Crystal Space
« Reply #1 on: March 30, 2017, 12:59:48 pm »

This question is a duplicate of: http://207.244.96.64/PlaneShift/smf/index.php?topic=42174.0
As redhound mention there:
Quote
It seems that CrystalSpace 3D need to be configured with --enable-make-emulation="no" flag to skip Makefiles generation and use Jamfiles only. This solve configuration issue on Debian Jessie (for me).

So that would be the best advice probably. The fact he's using Debian shouldn't matter.
Find me on IRC if you need me, don't use pms.

GunChleoc

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Re: Compiling Crystal Space
« Reply #2 on: April 23, 2017, 03:56:55 am »
That solved it, it's started compiling now.

Trying to solve this problem myself cost me many hours of my time. Please add this hint to the official compiling guide.

Also,
Code: [Select]
$HOME/development$ svn co -r 39798 http://svn.code.sf.net/p/crystal/code/CS/trunk cs needs https.
« Last Edit: April 23, 2017, 05:24:14 am by GunChleoc »

GunChleoc

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Re: Compiling Crystal Space
« Reply #3 on: April 23, 2017, 05:41:15 am »
OK, next problem. I ran

Code: [Select]
./configure --without-java --without-perl --without-python --without-3ds --with-cal3d=$HOME/development/cal3d  --enable-make-emulation="no" --without-wx
and the compiler output ends with:

Code: [Select]
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/texture.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/portal.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/impman.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/material.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/sector.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/reflectomotron3000.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/campos.o
MkDir1 ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/meshgen.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/densityfactormap.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/meshgen_positionmap.o
C++ ./out/linuxx86_64/optimize/plugins/engine/3d/plugin_impl.o
LinkPlugin engine.so
./out/linuxx86_64/optimize/plugins/engine/3d/engine.o: In function `csEngine::CreateBlackTexture(char const*, int, int, csColor*, int)':
/home/bratzbert/development/cs/plugins/engine/3d/engine.cpp:2308: warning: undefined reference to `non-virtual thunk to csImageBase::SetName(char const*)'
/usr/bin/ld: ./out/linuxx86_64/optimize/plugins/engine/3d/engine.o: relocation R_X86_64_PC32 against undefined symbol `_ZThn24_N11csImageBase7SetNameEPKc' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

    g++ -Wl,--as-needed -o engine.so ./out/linuxx86_64/optimize/plugins/engine/3d/camera.o ./out/linuxx86_64/optimize/plugins/engine/3d/engine.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshfact.o ./out/linuxx86_64/optimize/plugins/engine/3d/light.o ./out/linuxx86_64/optimize/plugins/engine/3d/halogen2.o ./out/linuxx86_64/optimize/plugins/engine/3d/impmesh.o ./out/linuxx86_64/optimize/plugins/engine/3d/halogen.o ./out/linuxx86_64/optimize/plugins/engine/3d/lightmgr.o ./out/linuxx86_64/optimize/plugins/engine/3d/sharevar.o ./out/linuxx86_64/optimize/plugins/engine/3d/lghthalo.o ./out/linuxx86_64/optimize/plugins/engine/3d/portalcontainer.o ./out/linuxx86_64/optimize/plugins/engine/3d/objwatch.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshlod.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshobj.o ./out/linuxx86_64/optimize/plugins/engine/3d/texture.o ./out/linuxx86_64/optimize/plugins/engine/3d/portal.o ./out/linuxx86_64/optimize/plugins/engine/3d/impman.o ./out/linuxx86_64/optimize/plugins/engine/3d/material.o ./out/linuxx86_64/optimize/plugins/engine/3d/sector.o ./out/linuxx86_64/optimize/plugins/engine/3d/reflectomotron3000.o ./out/linuxx86_64/optimize/plugins/engine/3d/campos.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/meshgen.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/densityfactormap.o ./out/linuxx86_64/optimize/plugins/engine/3d/meshgen/meshgen_positionmap.o ./out/linuxx86_64/optimize/plugins/engine/3d/plugin_impl.o  -lc -lm -ldl -lnsl -L/usr/local/lib -Wl,-z,defs -Wl,--warn-unresolved-symbols -g2 -shared -Wl,--gc-sections -fPIC ./out/linuxx86_64/optimize/libs/libcrystalspace-2.1.so -lz -lpthread -lpthread -lc -lm -ldl -lnsl -L/usr/local/lib -Wl,-z,defs -Wl,--warn-unresolved-symbols -g2 \
      -Wl,-soname,engine.so
 
...failed LinkPlugin engine.so ...
...failed updating 1 target(s)...
...updated 496 target(s)...