core-code / CoreBreach

CoreBreach is THE brand-new futuristic "anti-gravity" racing game with combat-based gameplay.
Other
33 stars 5 forks source link

Compilation error: called object type 'int' is not a function or function pointer #2

Closed ckorn closed 11 years ago

ckorn commented 11 years ago

Hello,

trying to compile CoreBreach for the Ubuntu gaming site playdeb.net there is this compilation error: (quantal-amd64)korn@pc:~/packages/corebreach/corebreach-0.0.0+git20121126/CoreBreach$ CC=clang GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles make This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help. Making all for app CoreBreach... Compiling file ../Core3D/_DEPENDENCIES/sources/freetype-gl/texture-atlas.c ... Compiling file ../Core3D/_DEPENDENCIES/sources/freetype-gl/texture-font.c ... Compiling file ../Core3D/_DEPENDENCIES/sources/freetype-gl/vector.c ... Compiling file ../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c ... In file included from ../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:38: ../Core3D/_DEPENDENCIES/sources/freetype-gl//vertex-buffer.h:442:3: error: expected identifier or '(' GL_TYPE( char ctype ); ^ /usr/include/GL/glext.h:2972:43: note: expanded from:

define GL_TYPE 0x92FA

                                      ^

../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:592:34: error: called object type 'int' is not a function or function pointer GLenum type = GL_TYPE( ctype );


../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:600:34: error: 
      called object type 'int' is not a function or function pointer
            GLenum type = GL_TYPE( ctype );
                          ~~~~~~~^
../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:612:30: error: 
      called object type 'int' is not a function or function pointer
        GLenum type = GL_TYPE( ctype );
                      ~~~~~~~^
../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:586:31: warning: 
      array index of '2' indexes past the end of an array (that contains 2
      elements) [-Warray-bounds]
        p = strpbrk ( format, "n" );
            ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:1097:39: note: expanded from:
               : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0')       \
                                             ^        ~
../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:586:31: warning: 
      array index of '3' indexes past the end of an array (that contains 2
      elements) [-Warray-bounds]
        p = strpbrk ( format, "n" );
            ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:1099:27: note: expanded from:
                  : (((__const char *) (accept))[3] == '\0'                   \
                                        ^        ~
../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c:745:1: error: 
      expected identifier or '('
GL_TYPE( char ctype )
^
/usr/include/GL/glext.h:2972:43: note: expanded from:
# define GL_TYPE                           0x92FA

```
                                      ^
```

2 warnings and 5 errors generated.
make[3]: **\* [obj/CoreBreach.obj/../Core3D/_DEPENDENCIES/sources/freetype-gl/vertex-buffer.c.o] Error 1
make[2]: **\* [internal-app-run-compile-submake] Error 2
make[1]: **\* [CoreBreach.all.app.variables] Error 2
make: **\* [internal-all] Error 2
core-code commented 11 years ago

it seems there is an incompatibility between one of our dependencies (freetype-gl) and your version of glext.h. i've reported the problem upstream and tried to include an fix. you could update Core3D and try again.

ckorn commented 11 years ago

Thank you, now I do not get this error any longer.

But unfortunately the libgnustep-gui-dev package in Ubuntu 12.10 is not new enough: libgnustep-gui-dev: Installed: (none) Candidate: 0.20.0-3ubuntu1 Version table: 0.20.0-3ubuntu1 0 500 http://de.archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages

(quantal-amd64)korn@pc:~/packages/corebreach/corebreach-0.0.0+git20121126/CoreBreach$ CC=clang GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles makeThis is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help. Making all for app CoreBreach... Compiling file Classes/UpgradeHandler.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file Classes/ApplicationSubclass.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file Classes/ApplicationDelegate.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/NSTextField+AutoFontsize.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/NSView+Snapshot.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/NSView+GridCalculation.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/ClickableImageView.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/HIDSupport_SDL.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file OtherSources/HostInformation.m ... In file included from :141: In file included from :13: ../Core3D/Utilities/Core3D_Prefix.pch:167:18: warning: #warning need gnustep base 1.24.0 or later [-W#warnings]

warning need gnustep base 1.24.0 or later

             ^

../Core3D/Utilities/Core3D_Prefix.pch:172:18: warning: #warning need gnustep gui 0.22 or later [-W#warnings]

warning need gnustep gui 0.22 or later

             ^

2 warnings generated. Compiling file ../Core3D/Utilities/opengl_linux.cpp ... g++: error: unrecognized command line option ‘-Qunused-arguments’

core-code commented 11 years ago

But unfortunately the libgnustep-gui-dev package in Ubuntu 12.10 is not new enough:

yes you need packages that aren't older than a year.

Compiling file ../Core3D/Utilities/opengl_linux.cpp ... g++: error: unrecognized command line option ‘-Qunused-arguments’

here is the reason compilation aborts, you didn't set the c++ compiler to clang.

try adding CXX=clang to you command line.

ckorn commented 11 years ago

Thank you.

There is this error now: ../Core3D/CoreEngine/Scene.mm:103:34: error: cannot initialize a parameter of type 'float *' with an lvalue of type 'CGFloat [4]' [value getComponents:c];

core-code commented 11 years ago

On 01.12.2012, at 20:50, Christoph Korn notifications@github.com wrote:

Thank you.

There is this error now: ../Core3D/CoreEngine/Scene.mm:103:34: error: cannot initialize a parameter of type 'float *' with an lvalue of type 'CGFloat [4]' [value getComponents:c];

hello again

weird, your clang version is more strict.

a simple cast, i.e. changing the line to "[value getComponents:(float *)c];" should fix it, but i can only test it and update the repository in about a day…

core-code commented 11 years ago

weird, it seems your clang version is more strict. a simple cast should fix that, but i can only update the repository in about a day.

Thank you.

There is this error now: ../Core3D/CoreEngine/Scene.mm:103:34: error: cannot initialize a parameter of type 'float *' with an lvalue of type 'CGFloat [4]' [value getComponents:c];

— Reply to this email directly or view it on GitHub.

core-code commented 11 years ago

after more investigation this is not a difference of the compiler version, but because of the too-old gnustep version you are using.

i've tried to add a fix but i'm not sure there is any worth in trying to get it to compile on versions of gnustep that are too old anyway.

ckorn commented 11 years ago

Ok, I think then I have to wait until Ubuntu 13.04 which has a more recent gnustep package.

core-code commented 11 years ago

i'm looking forward to it ;)