boost issues

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
cracken
Trader
Trader
Posts: 29
Joined: Fri Nov 10, 2006 8:41 am

boost issues

Post by cracken »

Code: Select all

make  all-am
make[1]: Entering directory `/home/andrew/sources/vegastrike/trunk/trunk/vegastrike'
depbase=`echo src/cmd/base_init.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if g++ -DHAVE_CONFIG_H -I. -I. -I.   -I./boost/1_33    -DHAVE_SDL=1 -DSDL_WINDOWING=1      -DHAVE_AL=1   -DHAVE_OGG  -DDATA_DIR=\"/home/andrew/sources/vegastrike/trunk/trunk/data4.x/\"  -I/usr/include/python2.4 -DHAVE_PYTHON=1   -I./src   -g -O2 -pipe  -ggdb3 -falign-loops=2 -falign-jumps=2 -falign-functions=2  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -pipe -MT src/cmd/base_init.o -MD -MP -MF "$depbase.Tpo" -c -o src/cmd/base_init.o src/cmd/base_init.cpp; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from /usr/include/python2.4/Python.h:8,
                 from src/cmd/base_init.cpp:2:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/math.h:27,
                 from src/cmd/base_init.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previous definition
src/cmd/base_init.cpp: In function 'boost::python::dict GetEventDataPython()':
src/cmd/base_init.cpp:17: error: conversion from 'const std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >' to non-scalar type 'boost::python::dict' requested
make[1]: *** [src/cmd/base_init.o] Error 1
make[1]: Leaving directory `/home/andrew/sources/vegastrike/trunk/trunk/vegastrike'
make: *** [all] Error 2

Can't figure out what's going on, I got vegastrike compiled before but now it's broken...

running from svn, this error can be fixed by casting the return value of GetEventDataPython, but then there's more errors with base_util.cpp

using 1.28

Code: Select all

make[1]: Entering directory `/home/andrew/sources/vegastrike/trunk/trunk/vegastrike'
depbase=`echo boost/1_28/src/module.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if g++ -DHAVE_CONFIG_H -I. -I. -I.   -I./boost/1_28    -DHAVE_SDL=1 -DSDL_WINDOWING=1      -DHAVE_AL=1   -DHAVE_OGG  -DDATA_DIR=\"/home/andrew/sources/vegastrike/trunk/trunk/data4.x/\"  -I/usr/include/python2.4 -DHAVE_PYTHON=1   -I./src   -g -O2 -pipe  -ggdb3 -falign-loops=2 -falign-jumps=2 -falign-functions=2  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -pipe -MT boost/1_28/src/module.o -MD -MP -MF "$depbase.Tpo" -c -o boost/1_28/src/module.o boost/1_28/src/module.cpp; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from ./boost/1_28/boost/config.hpp:35,
                 from ./boost/1_28/boost/python/detail/config.hpp:15,
                 from ./boost/1_28/boost/python/reference.hpp:12,
                 from ./boost/1_28/boost/python/detail/module_base.hpp:9,
                 from boost/1_28/src/module.cpp:9:
./boost/1_28/boost/config/compiler/gcc.hpp:57:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results"
./boost/1_28/boost/python/conversions.hpp: In function 'EnumType boost::python::from_python(PyObject*, boost::python::type<X>)':
./boost/1_28/boost/python/conversions.hpp:47: error: there are no arguments to 'from_python' that depend on a template parameter, so a declaration of 'from_python' must be available
./boost/1_28/boost/python/conversions.hpp:47: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
./boost/1_28/boost/python/conversions.hpp: In function 'EnumType boost::python::from_python(PyObject*, boost::python::type<const EnumType&>)':
./boost/1_28/boost/python/conversions.hpp:53: error: there are no arguments to 'from_python' that depend on a template parameter, so a declaration of 'from_python' must be available
./boost/1_28/boost/python/conversions.hpp: In function 'PyObject* boost::python::to_python(EnumType)':
./boost/1_28/boost/python/conversions.hpp:58: error: there are no arguments to 'to_python' that depend on a template parameter, so a declaration of 'to_python' must be available
make[1]: *** [boost/1_28/src/module.o] Error 1
make[1]: Leaving directory `/home/andrew/sources/vegastrike/trunk/trunk/vegastrike'

and using 1.31

Code: Select all

 cd . && /bin/sh /home/andrew/sources/vegastrike/trunk/trunk/vegastrike/missing --run automake-1.9 --gnu  Makefile
Makefile.am:12: BOOSTSOURCES was already defined in condition TRUE, which includes condition BOOST1_33 ...
Makefile.am:8: ... `BOOSTSOURCES' previously defined here
Makefile.am:39: BOOSTSOURCES was already defined in condition TRUE, which includes condition BOOST1_31 and !BOOST1_33 ...
Makefile.am:8: ... `BOOSTSOURCES' previously defined here
Makefile.am:66: BOOSTSOURCES was already defined in condition TRUE, which includes condition BOOST1_28 and !BOOST1_31 and !BOOST1_33 ...
Makefile.am:8: ... `BOOSTSOURCES' previously defined here
Makefile.am:83: BOOSTSOURCES was already defined in condition TRUE, which includes condition !BOOST1_28 and !BOOST1_31 and !BOOST1_33 ...
Makefile.am:8: ... `BOOSTSOURCES' previously defined here
 cd . && /bin/sh ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
Makefile:9333: *** missing separator.  Stop.
andrew@dakken:~/sources/vegastrike/trunk/trunk/veg
cracken
Trader
Trader
Posts: 29
Joined: Fri Nov 10, 2006 8:41 am

dirty hack

Post by cracken »

I pretty much used guess and check to "fix" these errors.

It compiles like that for me, appears to work fine...

I think i probably should have left the "const" in, cbf recompiling now tho.
You do not have the required permissions to view the files attached to this post.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

What you did is disable the #ifdefs which were supposed to catch boost-less configurations.

It worked here on Windows, but apparently not with gcc, and I can't build boost on my linux box (too little RAM to do that), so I'd ask of anyone with boost experience and a working linux build environment to take a look at base_util.h, at the beginning, the ifdeffed typedef for Dictionary seems to be broken on some boost/python configurations.

BTW: Hold on a minute with that rebuild, I'm fixing an error in a recent commit of mine (oops).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
cracken
Trader
Trader
Posts: 29
Joined: Fri Nov 10, 2006 8:41 am

Post by cracken »

oic

I can fix that. (probably)
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

BTW: Fixed that problem, you can now safely build or whatever.
A bugfix had turned into its own bug ;-)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
geoscope
Bounty Hunter
Bounty Hunter
Posts: 205
Joined: Thu Jun 29, 2006 1:58 am
Contact:

Post by geoscope »

I still see this error, and posted a bug report to SF two days ago... don't see any update to svn yet.
-- My days of not taking you seriously are certainly coming to a middle.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

just updated my version of boost from the fedora repos so cross my fingers but it may make a difference.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
cracken
Trader
Trader
Posts: 29
Joined: Fri Nov 10, 2006 8:41 am

Post by cracken »

still doesn't work.

obviously the "have_boost" or "have_python" things aren't defined. I don't know how to track down what is supposed to be setting these flags.
Zeog
ISO Party Member
ISO Party Member
Posts: 453
Joined: Fri Jun 03, 2005 10:30 am
Location: Europe

Post by Zeog »

klauss, for me the changes you made in revision 10788 broke compilation on linux (10787 compiles fine, 10788 and following revisions don't). Boost 1.33 was always compiling fine. Now, errors appear like in the first posting in cmd/base_init.cpp complaining about boost:python:dict. I don't think it has anything to do with that physics stuff you introduced and fixed later.

http://vegastrike.svn.sourceforge.net/v ... sion=10788

Hope that helps...
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Did you try Cracken's solution?

Basically, force the usage of:

namespace boost { namespace python { class dict; } }

...

typedef boost::python::dict Dictionary;

The ifdefs are all wrong, apparently. I would think that HAVE_PYTHON and HAVE_BOOST are true when... well... you have python and boost, but there must be a catch somewhere. Sadly, I can't build any of that because the only computer I have with linux will not build anything with boost on it - memory problems.

In short: remove the ifdefs, leave the lines above (assume you do have boost and python), and see if it builds. If it does, then we'd have to find better ifdefs, that's all.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

This compile error is coming from a silly problem--HAVE_BOOST is never used.

Under windows, HAVE_BOOST and HAVE_PYTHON are always defined, which is a mistake.

Linux, on the other hand, only ever defines HAVE_PYTHON--boost is only ever used in conjunction with python, so HAVE_BOOST is unnecessary anywhere.

I committed the simple fix in revision 10793

I still don't think that there is any point in using HAVE_PYTHON. If python/boost don't exist, VS isn't going to compile, and even if it does, it's not going to be very functional at all (bases are completely dependent on python, and so are many other things)
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

ace123 wrote:This compile error is coming from a silly problem--HAVE_BOOST is never used.

Under windows, HAVE_BOOST and HAVE_PYTHON are always defined, which is a mistake.
Should I remove HAVE_BOOST, then, to better match linux builds under Windows?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

No, don't do that.
My opinion is to not touch something unless it is broken.
Removing the HAVE_BOOST define can only break the windows builds, not fix it. And it still won't nearly match the Linux build.

Project Settings have a tendency to get messy and disorganized anyway, so don't trust them for anything. So don't bother with removing it and all of the other useless/unused defines in Project Settings.

If you want to spend time clearing up the available defines, a much better way is to write a Wiki page that lists all the currently used #defines/#ifdefs--that way it's in a readable format that people on non-Windows OS's can look at as a reference.
Post Reply