#4 2.0.0_alpha3 problems

closed
nobody
None
5
2005-04-30
2005-04-21
Chris Bainbridge
No

Hi, I'm not sure if this is deliberate or not, but
cgkit no longer picks up cflags from the ones used to
build python. In particular, it needs -fPIC to compile,
otherwise we get errors loading the python modules on
some computers.

Also possibly related; on import cgkit I get:

>>> import cgkit
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/lib/python2.3/site-packages/cgkit/__init__.py",
line 39, in ?
import pluginmanager, cmds, preferences, eventmanager
File
"/usr/lib/python2.3/site-packages/cgkit/cmds.py", line
35, in ?
from scene import getScene
File
"/usr/lib/python2.3/site-packages/cgkit/scene.py", line
10, in ?
from Interfaces import ISceneItem
File
"/usr/lib/python2.3/site-packages/cgkit/Interfaces/__init__.py",
line 23, in ?
from isceneitem import ISceneItem, ISceneItemContainer
File
"/usr/lib/python2.3/site-packages/cgkit/Interfaces/isceneitem.py",
line 23, in ?
from protocols import Interface
ImportError: No module named protocols

Any ideas? I'm using the current alpha3 ebuild under
gentoo.

Discussion

  • Matthias Baas
    Matthias Baas
    2005-04-21

    Logged In: YES
    user_id=211477

    cflags: I'm not aware I changed something that led to this
    behavior. I don't even know where I would have to change that?
    Should the distutils pick that up automatically? Did that work in
    alpha1 or alpha2? What did you do to make it work?

    As for the second problem, you haven't installed PyProtocols
    which is a requirement (see http://cgkit.sourceforge.net/doc2/
    node4.html for a link to the PyProtocols site).

    - Matthias -

     
  • Logged In: YES
    user_id=428581

    1. Distutils picks up the correct CFLAGS from python. The
    SCons stuff doesn't. You need -fPIC into the SConstruct CFLAGS.

    2. Error building with lib3ds support, this is lib3ds-1.2.0:

    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -march=pentium3 -fomit-frame-pointer -msse -mfpmath=sse
    -fPIC -DLIB3DS_AVAILABLE -DOGRE_AVAILABLE
    -Isupportlib/include -I/usr/include/python2.3 -c
    wrappers/lib3ds/light.cpp -o build/t\ emp.linux-i686-2.3/wrappers/lib3ds/light.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -march=pentium3 -fomit-frame-pointer -msse -mfpmath=sse
    -fPIC -DLIB3DS_AVAILABLE -DOGRE_AVAILABLE
    -Isupportlib/include -I/usr/include/python2.3 -c
    wrappers/lib3ds/material.cpp -o buil\ d/temp.linux-i686-2.3/wrappers/lib3ds/material.o
    wrappers/lib3ds/material.cpp: In function `void
    class_Lib3dsMaterial()':
    wrappers/lib3ds/material.cpp:51: error: `self_ilpct' is not
    a member of type `
    _Lib3dsMaterial'
    error: command 'gcc' failed with exit status 1

    3. Error building with ogre support:

    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -march=pentium3 -fomit-frame-pointer -msse -mfpmath=sse
    -fPIC -DOGRE_AVAILABLE -Isupportlib/include
    -I/usr/include/python2.3 -c wrappers/py_quat.cpp -o
    build/temp.linux-i686-2.3/wrapp\ ers/py_quat.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -march=pentium3 -fomit-frame-pointer -msse -mfpmath=sse
    -fPIC -DOGRE_AVAILABLE -Isupportlib/include
    -I/usr/include/python2.3 -c wrappers/py_gldistantlight.cpp
    -o build/temp.linux-i686\ -2.3/wrappers/py_gldistantlight.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -march=pentium3 -fomit-frame-pointer -msse -mfpmath=sse
    -fPIC -DOGRE_AVAILABLE -Isupportlib/include
    -I/usr/include/python2.3 -c wrappers/ogre/OgreCore.cpp -o
    build/temp.linux-i686-2.3\ /wrappers/ogre/OgreCore.o
    gcc: wrappers/ogre/OgreCore.cpp: No such file or directory
    gcc: no input files
    error: command 'gcc' failed with exit status 1

     
  • Matthias Baas
    Matthias Baas
    2005-04-22

    Logged In: YES
    user_id=211477

    1. -fPIC: I've added the flag to the SConstruct file.

    2. Error building with lib3ds v1.2.0: The problem is that you would
    actually need a newer version than v1.2.0. Unfortunately, there
    hasn't been an official release yet. Anyway, as the next lib3ds
    release will contain a symbol with the version number I can now
    check at compile time which version is available. I've just added
    an appropriate #ifdef, so that you can also use v1.2.0 (however,
    you won't be able to access the "self illumination percentage"
    attribute of the materials).

    3. Error building with ogre support: Oops, some source files are
    actually missing in the source archive (the .tar.gz even misses
    some entire directories). I've fixed that for the next release.

    The changes will be available with the next release. In the
    meantime, you can download an updated source archive directly
    from here: http://cgkit.sourceforge.net/cgkit-2.0.0alpha3.tar.gz
    This archive should fix all of the above problems (let me know
    whether it really does).

    - Matthias -

     
  • Logged In: YES
    user_id=428581

    1.2. ok :-)

    3. include dir missing - /usr/include/OGRE (maybe Gentoo
    specific?). Even when added I get:

    building '_core' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC
    -DOGRE_AVAILABLE -Isupportlib/include -I/usr/include/OGRE
    -I/usr/include/python2.3 -c wrappers/ogre/OgreCore.cpp -o
    build/temp.linux-i686-2.3/wrappers/ogre/OgreCore.o
    In file included from /usr/include/OGRE/OgrePrerequisites.h:77,
    from /usr/include/OGRE/Ogre.h:28,
    from wrappers/ogre/OgreCore.h:31,
    from wrappers/ogre/OgreCore.cpp:26:
    /usr/include/OGRE/OgreStdHeaders.h:30:23: hash_set: No such
    file or directory
    /usr/include/OGRE/OgreStdHeaders.h:31:23: hash_map: No such
    file or directory
    In file included from /usr/include/OGRE/OgreException.h:31,

    This is ogre-0.15.1.

     
  • Matthias Baas
    Matthias Baas
    2005-04-26

    Logged In: YES
    user_id=211477

    Extra include dirs have to be added via the config.cfg file
    (otherwise the setup script just assumes that everything will be
    found in the standard include paths).

    As to the hash_set/hash_map stuff, I already got a report from
    another Linux user who had to define the symbol EXT_HASH
    which makes Ogre include other header files. See the file
    OgreStdHeaders.h:

    // Note - not in the original STL, but exists in SGI STL and STLport
    #ifdef EXT_HASH
    # include <ext/hash_map>
    # include <ext/hash_set>
    #else
    # include <hash_set>
    # include <hash_map>
    #endif

    You can define that symbol in your config.cfg like this:

    MACROS += [("EXT_HASH", None)]

    (by the way, maybe we should move this thread into the mailing
    list as it might be useful to other users as well and as it's not a
    particular bug anymore...?)

    - Matthias -

     
    • status: open --> closed
     
  • Logged In: YES
    user_id=428581

    Thanks. That fixed it. FYI I also had to remove #include
    <Math.h> from OgreCore.h.