Can't build Ogre3d 1.12.0 with SWIG 4.0

Problems building or running the engine, queries about how to use features etc.
Post Reply
lockywolf
Gnoblar
Posts: 3
Joined: Mon May 06, 2019 5:44 am

Can't build Ogre3d 1.12.0 with SWIG 4.0

Post by lockywolf » Mon May 06, 2019 10:35 am

Ogre Version: :?: 1.12.0
Operating System: :?: Linux 3.19.40
Render System: :?: not builds

config

Code: Select all

  CXXFLAGS+=' -Wno-deprecated-declarations' \
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
        -DOGRE_LIB_DIRECTORY=lib${LIBDIRSUFFIX} \
        -DOGRE_BUILD_SAMPLES=$OGRE_BUILD_SAMPLES \
        -DOGRE_INSTALL_SAMPLES=$OGRE_BUILD_SAMPLES \
        -DOGRE_INSTALL_DOCS=$OGRE_INSTALL_DOCS \
        -DOpenGL_GL_PREFERENCE=$OpenGL_GL_PREFERENCE \
        -DOGRE_GLSUPPORT_USE_EGL=ON \
        -DOGRE_BUILD_TESTS=ON \
        -DOGRE_BUILD_RENDERSYSTEM_GLES2=ON \
        -DOGRE_CONFIG_ENABLE_QUAD_BUFFER_STEREO=ON \
        -DOGRE_BUILD_DEPENDENCIES=OFF \
        -DOGRE_STATIC=OFF \
        -DOGRE_CONFIG_THREADS=3 \
        .. .
The error log is quite big, but it certainly mostly about Java JNI-SWIG stuff.

Code: Select all

/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:57: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:66: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:82: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:85: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator
      removeUnchecked(itr);
                      ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:96: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = begin();
                        ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:97: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    final Iterator end = end();
                            ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:98: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator
    while (itr.isNot(end)) {
                     ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/NameValuePairList.java:121: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__string_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
      itr = itr.getNextUnchecked();
                                ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:57: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:66: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:82: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:85: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator
      removeUnchecked(itr);
                      ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:96: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = begin();
                        ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:97: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    final Iterator end = end();
                            ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:98: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator
    while (itr.isNot(end)) {
                     ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/AnimationStateMap.java:121: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_Ogre__AnimationState_p_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
      itr = itr.getNextUnchecked();
                                ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/OverlayElement.java:27: error: cannot find symbol
    super.swigSetCMemOwn(own);
         ^
  symbol: method swigSetCMemOwn(boolean)
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:57: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:66: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:82: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = find((String) key);
                       ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:85: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator
      removeUnchecked(itr);
                      ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:96: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    Iterator itr = begin();
                        ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:97: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
    final Iterator end = end();
                            ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:98: error: incompatible types: Iterator cannot be converted to SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator
    while (itr.isNot(end)) {
                     ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/SettingsBySection.java:121: error: incompatible types: SWIGTYPE_p_std__mapT_std__string_std__multimapT_std__string_std__string_t_std__lessT_std__string_t_t__iterator cannot be converted to Iterator
      itr = itr.getNextUnchecked();
                                ^
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/Font.java:27: error: cannot find symbol
    super.swigSetCMemOwn(own);
         ^
  symbol: method swigSetCMemOwn(boolean)
/tmp/SBo/ogre-1.12.0/build/java/src/org/ogre/OverlaySystem.java:27: error: cannot find symbol
    super.swigSetCMemOwn(own);
         ^
  symbol: method swigSetCMemOwn(boolean)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
27 errors

 
I tried playing with including std_string.i to OgreMain.h, but to no avail.

If someone knows some cool tweak I should tell SWIG to properly convert the types, I would be grateful.
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 924
Joined: Sun Mar 30, 2014 2:51 pm
x 209
Contact:

Re: Can't build Ogre3d 1.12.0 with SWIG 4.0

Post by paroj » Mon May 06, 2019 1:50 pm

ogre was only tested with SWIG 3.0.12, so I suggest sticking with that for now
0 x

lockywolf
Gnoblar
Posts: 3
Joined: Mon May 06, 2019 5:44 am

Re: Can't build Ogre3d 1.12.0 with SWIG 4.0

Post by lockywolf » Mon May 06, 2019 2:05 pm

paroj wrote:
Mon May 06, 2019 1:50 pm
ogre was only tested with SWIG 3.0.12, so I suggest sticking with that for now
Thanks for responding so fast!

Well, I don't get to choose what the distro maintainers decide. Apparently they decide that SWIG 4.0 is stable enough.
0 x

Post Reply