Building rev 1018 on Linux

0 views
Skip to first unread message

Ivan Vučica

unread,
Nov 10, 2009, 6:34:02 AM11/10/09
to python-ogre...@googlegroups.com
Cheers,

after getting Mac builds to work for us, Cateia is boldly going into the GNU/Linux territory! (No, we cannot use prebuilt binaries because we need to be able to fix problems that may arise on older distros.)

First here's a patch. Boost 1.40 no longer includes autotools-based build system, that is, there is no 'configure', and 'make' and 'make install' do not make[1] sense. However nobody updated the build commands for Mac and GNU/Linux, so the fix is below

Additionally, a reference is made to .../include/boost-1.40 where it should actually refer to .../include/boost.

I admit that fixes are lousy but they do their job. I'd love to see how this should be done properly.

$ svn diff

========= START PATCH ===============

Index: environment.py
===================================================================
--- environment.py    (revision 1018)
+++ environment.py    (working copy)
@@ -547,15 +547,24 @@
                 [0, "mkdir -p %s/bin/" % PREFIX, os.path.join(os.getcwd(), bjambase)],
             ]
 
+        if BOOST_STATIC:
+            _link = "static"
+        else:
+            _link = "shared"
+
         buildCmds += [
             [0, cp + " bjam %s/bin/" % PREFIX, os.path.join(os.getcwd(), bjambase, bjambuilddir)],
 
             ## and now boost
-            [0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''],
+            #[0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''],
             [0, 'chmod -R +rw *', os.path.join(os.getcwd(), base)],
-            [0, "./configure --with-libraries=python,thread,date_time --prefix=%s --without-icu --with-bjam=../root/usr/bin/bjam" % PREFIX, os.path.join(os.getcwd(), base)],
-            [0, 'make', os.path.join(os.getcwd(), base)],
-            [0, 'make install', os.path.join(os.getcwd(), base)],
+            [0, "./bootstrap.sh --with-libraries=python,thread,date_time --prefix=%s --without-icu --with-bjam=../root/usr/bin/bjam" % PREFIX, os.path.join(os.getcwd(), base)],
+            #[0, 'make', os.path.join(os.getcwd(), base)],
+            #[0, 'make install', os.path.join(os.getcwd(), base)],
+
+            [0, os.path.join(PREFIX, 'bin', 'bjam') + (' release --prefix=%s --with-python --with-thread --with-date_time link=' % PREFIX) + _link, os.path.join(os.getcwd(), base)],
+            [0, os.path.join(PREFIX, 'bin', 'bjam') + (' release --prefix=%s --with-python --with-thread --with-date_time link=' % PREFIX) + _link + ' install', os.path.join(os.getcwd(), base)]
+
         ]
 
     if isMac():
@@ -600,7 +609,7 @@
 
     # If we are not given a LIB path, use the version we are building.
     if Config.PATH_Boost is None:
-        PATH = os.path.join(Config.LOCAL_INCLUDE, "boost-%s" % versionBase)
+        PATH = os.path.join(Config.LOCAL_INCLUDE, "boost") #% versionBase)
     else:
         PATH = Config.PATH_Boost

====== END PATCH ========




Then, here's an error.

$ python python-ogre/BuildModule.py -c ogre

g++ -o build_dir_2.5/ogre_1.6.1/ResourceGroupManager.pypp.os -c `pkg-config --cflags OGRE` -I -O3 -I./ -DBOOST_PYTHON_MAX_ARITY=19 -DBOOST_PYTHON_NO_PY_SIGNATURES -I/home/ivucica/development/python-ogre/generated/ogre_1.6.1 -D__PYTHONOGRE_BUILD_CODE -I/home/ivucica/development/root/usr/include -L/home/ivucica/development/root/usr/lib -fPIC -I/home/ivucica/development/root/usr/include/boost -I/home/ivucica/development/root/usr/include/OGRE -I/usr/include/python2.5 -I/usr/include/python2.5 -Ibuild_dir_2.5/ogre_1.6.1/None -Igenerated/ogre_1.6.1/None generated/ogre_1.6.1/ResourceGroupManager.pypp.cpp
/home/ivucica/development/root/usr/include/OGRE/OgreResourceGroupManager.h: In function ‘void register_ResourceGroupManager_class()’:
/home/ivucica/development/root/usr/include/OGRE/OgreResourceGroupManager.h:289: error: ‘struct Ogre::ResourceGroupManager::ResourceGroup’ is protected
generated/ogre_1.6.1/ResourceGroupManager.pypp.cpp:394: error: within this context

scons: *** [build_dir_2.5/ogre_1.6.1/ResourceGroupManager.pypp.os] Error 1
scons: building terminated because of errors.
PythonOgre.BuildModule: WARNING  Task Failed


Since I have zero idea how to fix this apart from removing "protected", can someone give an official version on how this kind of stuff is fixed?

[1] This pun is accidental, but welcome :-)

--
Regards,

Ivan Vučica

Enrico Zschemisch

unread,
Nov 10, 2009, 6:42:19 AM11/10/09
to python-ogre...@googlegroups.com

Hi,

I have a similar patch I wanted to submit, but I have problems running
python-ogre on Linux (see my previous email - no solution so far). My patch
fixes these changes, too.

> Since I have zero idea how to fix this apart from removing "protected",
can
> someone give an official version on how this kind of stuff is fixed?

See python-ogre/patches/ogre_1.6.1.patch
Some files are modified. Have you applied this patch?


Regards,
Enrico

Krešimir Špes

unread,
Nov 10, 2009, 10:17:16 AM11/10/09
to Python Ogre Developers
@ivucica: please keep updating the wiki as you have with the Mac
version.

Ivan Vučica

unread,
Nov 10, 2009, 1:14:21 PM11/10/09
to python-ogre...@googlegroups.com
Cheers!

On Tue, Nov 10, 2009 at 12:42, Enrico Zschemisch <enr...@vicampus.com> wrote:
Hi,

I have a similar patch I wanted to submit, but I have problems running
python-ogre on Linux (see my previous email - no solution so far). My patch
fixes these changes, too.

I see you are working on getting 1.6.4 to work. We are currently interested in 1.6.1 since our games were written with 1.6.0 and work good on Mac with 1.6.1 (pythonogre rev 996). So we're sticking with 1.6.1 for now!

Otherwise, does your patch fix any other significant pieces of the build process? If so, I'd love to see it even in its incomplete form!
 
See python-ogre/patches/ogre_1.6.1.patch
Some files are modified. Have you applied this patch?

That file is applied during the build process, as far as I know; I remember having to direct Mac version to download 1.6.1 instead of 1.6.4 because patch was for 1.6.1 so the build broke.

Otherwise I'll look there for details on what to change. It's just strange that 1.6.1 would break after being so extensively tested, patched and worked on.

--
Regards,

Ivan Vučica

Andy Miller

unread,
Nov 10, 2009, 7:46:58 PM11/10/09
to python-ogre...@googlegroups.com
And please continue to submit patches via the source forge tracker as this ensures I don't miss any and that they are tracked...

Thanks
Andy

2009/11/11 Ivan Vučica <ivu...@gmail.com>

Enrico Zschemisch

unread,
Nov 11, 2009, 2:48:51 AM11/11/09
to python-ogre...@googlegroups.com
Hi Ivan,

my patch is attached. It is nothing big so far, as I am fighting with
getting a working version...


Any comments and changes are welcome :-)

When my build works, I will submit this patch at sourceforce.


Regards,
Enrico

python-ogre.patch
Reply all
Reply to author
Forward
0 new messages