[SOLVED] Building spring: problem with boost

[SOLVED] Building spring: problem with boost

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
bluewagon
Posts: 6
Joined: 08 Mar 2009, 01:59

[SOLVED] Building spring: problem with boost

Post by bluewagon »

Hello all,

I'm new to this project and it seems nice so I wanted to check out the code but I'm in a bit of a trouble here :)

My setup:
Crosscompiling from a virtual ubuntu, following loosely the cross-compilation wiki.

Here's the show stopper:
[ 14%] Building CXX object rts/lib/CMakeFiles/hpiutil2.dir/hpiutil2/hpifile.cpp.obj
In file included from /home/fdemesma/spring-xcompile/spring/rts/lib/hpiutil2/hpifile.cpp:26:
/home/fdemesma/spring-xcompile/spring/rts/lib/hpiutil2/hpifile.h:27:32: error: boost/shared_ptr.hpp: No such file or directory

Yes, I installed boost (libboost-dev to be precise, I also tried 1.35, to no avail)

Thanks guys,
Last edited by bluewagon on 11 Mar 2009, 06:02, edited 1 time in total.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Building spring: problem with boost (boost/shared_ptr)

Post by lurker »

1. Is there such a file in the boost source dir?
2. Turn on verbose mode and see what directories are being used.
bluewagon
Posts: 6
Joined: 08 Mar 2009, 01:59

Re: Building spring: problem with boost (boost/shared_ptr)

Post by bluewagon »

/usr/include/boost/shared_ptr.hpp does exist

What do you mean by "Turn on verbose mode" ?

Thanks
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Building spring: problem with boost (boost/shared_ptr)

Post by lurker »

Are you using cmake? Turn on CMAKE_VERBOSE_MAKEFILE.
bluewagon
Posts: 6
Joined: 08 Mar 2009, 01:59

Re: Building spring: problem with boost (boost/shared_ptr)

Post by bluewagon »

Ok, I just did. :)

Here's the monster:

[ 14%] Building CXX object rts/lib/CMakeFiles/hpiutil2.dir/hpiutil2/hpifile.cpp.obj
cd /home/fdemesma/spring-xcompile/win32/build/rts/lib && /usr/bin/i586-mingw32msvc-g++ -DSYNCCHECK -DDIRECT_CONTROL_ALLOWED -DSPRING_DATADIR=\"//.://.\" -DSTREFLOP_SSE -D_SZ_ONE_DIRECTORY -mwindows -march=i686 -msse -mfpmath=sse -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -pipe -fno-strict-aliasing -I/home/fdemesma/spring-xcompile/spring/rts/System -I/home/fdemesma/spring-xcompile/spring/rts/lib/lua/include -I/home/fdemesma/spring-xcompile/spring/rts/lib/streflop -I/home/fdemesma/spring-xcompile/win32/libs/include -I/home/fdemesma/spring-xcompile/win32/libs/include/SDL -I/home/fdemesma/spring-xcompile/spring/rts -o CMakeFiles/hpiutil2.dir/hpiutil2/hpifile.cpp.obj -c /home/fdemesma/spring-xcompile/spring/rts/lib/hpiutil2/hpifile.cpp
In file included from /home/fdemesma/spring-xcompile/spring/rts/lib/hpiutil2/hpifile.cpp:26:
/home/fdemesma/spring-xcompile/spring/rts/lib/hpiutil2/hpifile.h:27:32: error: boost/shared_ptr.hpp: No such file or directory
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Building spring: problem with boost (boost/shared_ptr)

Post by hoijui »

as you are cross-compiling with mingw, you need the boost libs and includes from mingwlibs, not the linux/ubuntu ones.
you either forgot these at all, or have old ones, most likely.
they are available on jobjol.nl (search for mingwlibs) or there is a link on the wiki page for cross-compiling spring.
i think the latest version of mingwlibs is v13.
http://spring.jobjol.nl/show_file.php?id=1102
bluewagon
Posts: 6
Joined: 08 Mar 2009, 01:59

Re: Building spring: problem with boost (boost/shared_ptr)

Post by bluewagon »

Well, that's exactly what I used.

I followed that tutorial:
http://spring.clan-sy.com/wiki/Building ... s_Compiled

and have the mingw32libs_v13 extracted under:
~/spring-xcompile/win32/libs/

me@kaminari [~/spring-xcompile/win32/libs] $ ls
include lib reimp_new.zip

does that make sense?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Building spring: problem with boost (boost/shared_ptr)

Post by hoijui »

yeah, that should work then.

in your failed compile command, i see:

Code: Select all

-I/home/fdemesma/spring-xcompile/win32/libs/include
and it is not finding:

Code: Select all

boost/shared_ptr.hpp
i just checked my mingwlibs_v13, and it includes this file in that location.
in other words, it looks like something went wrong when installing mingwlibs.
make sure that you have the path include/boost/shared_ptr.hpp under /home/fdemesma/spring-xcompile/win32/libs.
bluewagon
Posts: 6
Joined: 08 Mar 2009, 01:59

Re: Building spring: problem with boost (boost/shared_ptr)

Post by bluewagon »

Holy... I can't believe this.

IZArc just unpacks a part of the 7z archive. Worse thing is that the selection seems to be random: sometimes some files, sometimes some other.

Thanks, it works now, gonna try it tonite

Fred
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: [SOLVED] Building spring: problem with boost

Post by SpliFF »

I see for v16:

Code: Select all

Version 15, 13.3.2009:
- removed lots of the static (import?) libraries
- make directory structure so it works with cmake Find_Module() (hopefully without breaking scons)
I'm getting:

Code: Select all

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:57 (MESSAGE):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindZLIB.cmake:22 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  rts/lib/CMakeLists.txt:22 (FIND_PACKAGE)

Code: Select all

$ ls win32/libs/lib/
libSDLmain.a              libboost_regex-mt.a   libdevil.a  libilut.a
libboost_filesystem-mt.a  libboost_thread-mt.a  libilu.a    libjvm.dll.a
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: [SOLVED] Building spring: problem with boost

Post by Auswaschbar »

Code: Select all

> ls mingwlibs_v16/dll/
...   zlib1.dll   ...
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: [SOLVED] Building spring: problem with boost

Post by Auswaschbar »

Fixed. When I modified the mingwlibs, I wanted to commit a modified FindZLIB.cmake. I failed, (because baczek added *.cmake to .gitignore)
but did that now. Should work again.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: [SOLVED] Building spring: problem with boost

Post by imbaczek »

sorry ;p must've had a reason.
Post Reply

Return to “Engine”