[SOLVED] Cyphesis 0.5.24 building error
  • Hi,
    I have tried to build Cyphehis, but i got these errors:


    ...
    Making all in physics
    make[2]: Wejście do katalogu `/home/piotr/projekty/worldforge/cyphesis-0.5.24/physics'
    g++ -DHAVE_CONFIG_H -I.. -I/usr/include/python2.6 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/local/include/Atlas-C++-0.6 -I/usr/local/include/varconf-1.0 -I/usr/local/include/Mercator-0.2 -I/usr/local/include/wfmath-0.3 -I/usr/local/include/skstream-0.3 -I/usr/local/lib/skstream-0.3/include -D_REENTRANT -g -O2 -fno-strict-aliasing -Wall -DNDEBUG -pthread -MT BBox.o -MD -MP -MF .deps/BBox.Tpo -c -o BBox.o BBox.cpp
    In file included from BBox.h:29:0,
    from BBox.cpp:20:
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In instantiation of ‘WFMath::AxisBox<3>’:
    BBox.h:41:35: instantiated from here
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:182:14: error: ‘WFMath::AxisBox<dim>::m_low’ has incomplete type
    /usr/local/include/wfmath-0.3/wfmath/const.h:57:31: error: declaration of ‘struct WFMath::Point<3>’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:182:21: error: ‘WFMath::AxisBox<dim>::m_high’ has incomplete type
    /usr/local/include/wfmath-0.3/wfmath/const.h:57:31: error: declaration of ‘struct WFMath::Point<3>’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘bool WFMath::AxisBox<dim>::isValid() const [with int dim = 3]’:
    BBox.cpp:29:22: instantiated from here
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:94:66: error: using invalid field ‘WFMath::AxisBox<dim>::m_high’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:94:66: error: using invalid field ‘WFMath::AxisBox<dim>::m_low’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘const WFMath::Point<dim>& WFMath::AxisBox<dim>::highCorner() const [with int dim = 3]’:
    BBox.cpp:33:34: instantiated from here
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:106:48: error: using invalid field ‘WFMath::AxisBox<dim>::m_high’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘const WFMath::Point<dim>& WFMath::AxisBox<dim>::lowCorner() const [with int dim = 3]’:
    BBox.cpp:33:56: instantiated from here
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:103:47: error: using invalid field ‘WFMath::AxisBox<dim>::m_low’
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘const WFMath::Point<dim>& WFMath::AxisBox<dim>::highCorner() const [with int dim = 3]’:
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:106:55: warning: control reaches end of non-void function
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘const WFMath::Point<dim>& WFMath::AxisBox<dim>::lowCorner() const [with int dim = 3]’:
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:103:53: warning: control reaches end of non-void function
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h: In member function ‘bool WFMath::AxisBox<dim>::isValid() const [with int dim = 3]’:
    /usr/local/include/wfmath-0.3/wfmath/axisbox.h:94:68: warning: control reaches end of non-void function
    make[2]: *** [BBox.o] Błąd 1 //Błąd = English "error"
    make[2]: Opuszczenie katalogu `/home/piotr/projekty/worldforge/cyphesis-0.5.24/physics'
    make[1]: *** [all-recursive] Błąd 1
    make[1]: Opuszczenie katalogu `/home/piotr/projekty/worldforge/cyphesis-0.5.24'
    ...


    I would be glad if anyone could help me.
    I am using latest gcc (4.5) and WorldForge libraries (wfmath 0.3.10).

    Thanks,
    Peter
  • This is a very confusing error. I would expect this problem if you were using old code. Are you sure you don't have two versions of wfmath installed? The version it is using is in /usr/local.
  • Looking deeper, it is possible gcc has got stricter about declarations again. Can you try swapping the order of the two wfmath includes in BBox.cpp so that point.h comes first as follows;

    #include <wfmath/point.h>
    #include <wfmath/axisbox.h>

    and see if that fixes the problem?

    Al
  • Thank you for quick answer.

    I am sure that i have one version of wfmath ( after your post i deleted wfmath form /usr/local and builded again - errors were still the same ).

    After #include lines reordered.
    now errors are almost the same:

    Making all in physics
    make&#91;2&#93;&#58; Wejście do katalogu `/home/piotr/projekty/worldforge/cyphesis-0&#46;5&#46;24/physics'
    g++ -DHAVE_CONFIG_H -I&#46;&#46; -I/usr/include/python2&#46;6 -I/usr/include/sigc++-2&#46;0 -I/usr/lib/sigc++-2&#46;0/include -I/usr/local/include/Atlas-C++-0&#46;6 -I/usr/local/include/varconf-1&#46;0 -I/usr/local/include/Mercator-0&#46;2 -I/usr/local/include/wfmath-0&#46;3 -I/usr/local/include/skstream-0&#46;3 -I/usr/local/lib/skstream-0&#46;3/include -D_REENTRANT -g -O2 -fno-strict-aliasing -Wall -DNDEBUG -pthread -MT Collision&#46;o -MD -MP -MF &#46;deps/Collision&#46;Tpo -c -o Collision&#46;o Collision&#46;cpp
    In file included from Collision&#46;h&#58;25&#58;0,
    from Collision&#46;cpp&#58;20&#58;
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In instantiation of ‘WFMath&#58;&#58;AxisBox&lt;3&gt;’&#58;
    &#46;&#46;/physics/BBox&#46;h&#58;37&#58;35&#58; instantiated from here
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;182&#58;14&#58; error&#58; ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_low’ has incomplete type
    /usr/local/include/wfmath-0&#46;3/wfmath/const&#46;h&#58;57&#58;31&#58; error&#58; declaration of ‘struct WFMath&#58;&#58;Point&lt;3&gt;’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;182&#58;21&#58; error&#58; ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_high’ has incomplete type
    /usr/local/include/wfmath-0&#46;3/wfmath/const&#46;h&#58;57&#58;31&#58; error&#58; declaration of ‘struct WFMath&#58;&#58;Point&lt;3&gt;’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In member function ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&amp; WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;operator=(const WFMath&#58;&#58;AxisBox&lt;dim&gt;&amp;) &#91;with int dim = 3, WFMath&#58;&#58;AxisBox&lt;dim&gt; = WFMath&#58;&#58;AxisBox&lt;3&gt;&#93;’&#58;
    &#46;&#46;/modules/Location&#46;h&#58;106&#58;18&#58; instantiated from here
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;88&#58;4&#58; error&#58; ‘const class WFMath&#58;&#58;AxisBox&lt;3&gt;’ has no member named ‘m_low’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;88&#58;4&#58; error&#58; using invalid field ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_low’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;88&#58;21&#58; error&#58; ‘const class WFMath&#58;&#58;AxisBox&lt;3&gt;’ has no member named ‘m_high’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;88&#58;21&#58; error&#58; using invalid field ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_high’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In member function ‘const WFMath&#58;&#58;Point&lt;dim&gt;&amp; WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;lowCorner() const &#91;with int dim = 3&#93;’&#58;
    Collision&#46;cpp&#58;241&#58;54&#58; instantiated from here
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;103&#58;47&#58; error&#58; using invalid field ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_low’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In member function ‘const WFMath&#58;&#58;Point&lt;dim&gt;&amp; WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;highCorner() const &#91;with int dim = 3&#93;’&#58;
    Collision&#46;cpp&#58;242&#58;55&#58; instantiated from here
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;106&#58;48&#58; error&#58; using invalid field ‘WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;m_high’
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In member function ‘const WFMath&#58;&#58;Point&lt;dim&gt;&amp; WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;lowCorner() const &#91;with int dim = 3&#93;’&#58;
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;103&#58;53&#58; warning&#58; control reaches end of non-void function
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58; In member function ‘const WFMath&#58;&#58;Point&lt;dim&gt;&amp; WFMath&#58;&#58;AxisBox&lt;dim&gt;&#58;&#58;highCorner() const &#91;with int dim = 3&#93;’&#58;
    /usr/local/include/wfmath-0&#46;3/wfmath/axisbox&#46;h&#58;106&#58;55&#58; warning&#58; control reaches end of non-void function
    make&#91;2&#93;&#58; *** &#91;Collision&#46;o&#93; Błąd 1
    make&#91;2&#93;&#58; Opuszczenie katalogu `/home/piotr/projekty/worldforge/cyphesis-0&#46;5&#46;24/physics'
    make&#91;1&#93;&#58; *** &#91;all-recursive&#93; Błąd 1
    make&#91;1&#93;&#58; Opuszczenie katalogu `/home/piotr/projekty/worldforge/cyphesis-0&#46;5&#46;24'
    make&#58; *** &#91;all&#93; Błąd 2





    Regards,
    Peter
  • It looks like my second guess was right. The rules in gcc for templates have changed a bit, and now have a different dependency ordering. The correct fix is in wfmath, but it will be really hard for me to fix the code correctly until I have access to such a compiler. What Linux distro are you running?

    Until then you should be able to get cyphesis to build by using the same re-ordering hack in each file you get the error in. The new error you report is in a different file, so it looks like the BBox.cpp file is now compiling. Sorry for the fix being so manual.
  • Thanks, i will reoreder #include directives, and I am using Arch linux.

    #added

    For next generations dealing with similar errors:
    In Collision.cpp i moved #include "modules/Location.h" directive to the top (Location.h have wfmath parts included)
    and now Cyphesis is working :)

    So, once more, Thank you alriddoch!
  • You're welcome. I hope you enjoy using the software. :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID