[Bf-committers] scons/freebsd with gameengine question

Hans Lambermont hans at lambermont.dyndns.org
Thu Apr 14 23:12:41 CEST 2005


Hans Lambermont wrote:

> Kester Maddock wrote:
...
>> 3. Try and isolate it - create an empty file with just #include
>> <iostream> in it and see if that compiles.   Keep adding (system)
>> include files from KX_IpoConvert.cpp until it breaks.
> 
> Good idea ;-) I'll do that and report back.

This is fun. I can reproduce the error with this :

in source/gameengine/Converter/
create a file a.cpp with just one line :

    #include "BL_ActionActuator.h"

g++ -c -I/usr/X11R6/include -I/home/hans/src/blender_cvs01/blender/../lib/freebsd-5.3-i386/string/include -I/home/hans/src/blender_cvs01/blender/../lib/freebsd-5.3-i386/SoundSystem/include -I/usr/local/include/python2.4 -I/home/hans/src/blender_cvs01/blender/source/gameengine/Physics/Sumo/Fuzzics/include -I/home/hans/src/blender_cvs01/blender/source/gameengine/Physics/Sumo -I/home/hans/src/blender_cvs01/blender/../lib/freebsd-5.3-i386/moto/include -I/home/hans/src/blender_cvs01/blender/../lib/freebsd-5.3-i386/solid/include -I../../blender -I../../blender/imbuf -I../../blender/makesdna -I../../blender/include -I../../blender/blenlib-I../../blender/blenkernel -I../../blender/render/extern/include -I/home/hans/src/blender_cvs01/blender/../lib/freebsd-5.3-i386/guardedalloc/include -I../Expressions -I../Rasterizer -I../GameLogic -I../Ketsji -I../BlenderRoutines -I../SceneGraph -I../../kernel/gen_system -I../Rasterizer/RAS_OpenGLRasterizer -I../Network -I../Ketsji/KXNetwork -I../Physics/common -I../Physics/Dummy -I../Physics/BlOde a.cpp -o a.o

and also with creating an a.cpp with these two lines in it :

    #include "SCA_IActuator.h"
    #include "MT_Point3.h"

and also with this :

    #include "SCA_ILogicBrick.h"
    #include "MT_Point3.h"

Ugh ! there are multiple MT_Point3.h files in the tree :-( (and they differ)

/home/hans/src/blender_cvs01/lib/freebsd-5.3-i386/moto/include/MT_Point3.h
is the first one in the include list.

    #include "SCA_ILogicBrick.h"
    #include "MT_Vector3.h"

and

    #include "BoolValue.h"
    #include "MT_Vector3.h"

and

    #include "Value.h"
    #include "MT_Vector3.h"

and

    #include "STR_String.h"
    #include "PyObjectPlus.h"
    #include "MT_Vector3.h"

These are all minimal sets.

    #include <vector>
    #include "PyObjectPlus.h"
    #include "MT_Vector3.h"

and

    #include <vector>
    #include "KX_Python.h"
    #include "MT_Vector3.h"

and thus

    #include <vector>
    #include "Python.h"
    #include "MT_Vector3.h"

I use python-2.4

    #include <vector>
    #include "Python.h"
    #include "MT_Tuple3.h"

and

    #include <vector>
    #include "Python.h"
    #include "MT_Scalar.h"

and

    #include <vector>
    #include "Python.h"
    #include "NM_Scalar.h"

and here's the out-of-blender's-scope weird set :

    #include <vector>
    #include "Python.h"
    #include <iostream.h>

Here's the start of the output again :

In file included from /usr/include/c++/3.4/backward/iostream.h:31,
                 from a.cpp:7:
/usr/include/c++/3.4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
...

Ok, I replaced iostream with iostream.h, here's the other set :

    #include <vector>
    #include "Python.h"
    #include <iostream>

In file included from /usr/include/c++/3.4/ios:48,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iostream:45,
                 from a.cpp:7:
/usr/include/c++/3.4/bits/localefwd.h:58:34: macro "isspace" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/3.4/ios:48,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iostream:45,
                 from a.cpp:7:
/usr/include/c++/3.4/bits/localefwd.h:58: error: `std::isspace' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:58: error: template declaration of `bool std::isspace'
/usr/include/c++/3.4/bits/localefwd.h:70:34: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:70: error: `std::isupper' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:70: error: template declaration of `bool std::isupper'
/usr/include/c++/3.4/bits/localefwd.h:74:34: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:74: error: `std::islower' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:74: error: template declaration of `bool std::islower'
/usr/include/c++/3.4/bits/localefwd.h:78:34: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:78: error: `std::isalpha' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:78: error: template declaration of `bool std::isalpha'
/usr/include/c++/3.4/bits/localefwd.h:94:34: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:94: error: `std::isalnum' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:94: error: template declaration of `bool std::isalnum'
/usr/include/c++/3.4/bits/localefwd.h:102:34: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:102: error: `std::toupper' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:102: error: template declaration of `_CharT std::toupper'
/usr/include/c++/3.4/bits/localefwd.h:106:34: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:106: error: `std::tolower' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:106: error: template declaration of `_CharT std::tolower'
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iostream:45,
                 from a.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h:226: error: expected `;' before '(' token
/usr/include/c++/3.4/bits/locale_facets.h:240: error: expected `;' before "const"
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iostream:45,
                 from a.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h:241:53: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:241: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:254: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:255: error: expected `;' before '(' token
/usr/include/c++/3.4/bits/locale_facets.h:269: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:270:53: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:270: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:286: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:796: error: expected `;' before '(' token
/usr/include/c++/3.4/bits/locale_facets.h:812: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:813:53: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:813: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:828: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:829: error: expected `;' before '(' token
/usr/include/c++/3.4/bits/locale_facets.h:845: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:846:53: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:846: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:865: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:4498:44: macro "isspace" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iostream:45,
                 from a.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h:4499: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4513:44: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4514: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4517:56: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4518: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4522:44: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4523: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4542:44: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4543: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4552:44: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4553: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4557:44: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4558: error: invalid function declaration

New ideas ?

-- Hans


More information about the Bf-committers mailing list