Fails to compile at GLSLCopyState.cpp

Fails to compile at GLSLCopyState.cpp

Discuss everything related to compiling and running Spring on Mac OS X.

Moderator: Moderators

Post Reply
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

Hi, now it fails to compile at this point
[ 54%] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Rendering/Shaders/GLSLCopyState.cpp.o
/Users/herecomethej/spring/rts/Rendering/Shaders/GLSLCopyState.cpp: In function 'void CopyShaderState_TransformFeedback(GLuint, GLuint)':
/Users/herecomethej/spring/rts/Rendering/Shaders/GLSLCopyState.cpp:361:97: error: invalid conversion from 'GLint {aka int}' to 'GLint* {aka int*}' [-fpermissive]
glGetTransformFeedbackVarying(oldProgID, i, maxNameLength, &nameLength, &size, &type, &name[0]);
^
/Users/herecomethej/spring/rts/Rendering/Shaders/GLSLCopyState.cpp:361:97: error: too many arguments to function
make[2]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Rendering/Shaders/GLSLCopyState.cpp.o] Error 1
make[1]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/all] Error 2
make: *** [all] Error 2
Any ideas?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

this error should be fixed in current development version...
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

Wow that was fast, Thanks!

Just a minor thing. Anyway we could have cmake in Spring do all of its build work in a ./build folder as oppose to the root directory? It would make it much easier to sync if I only had to trash that folder as oppose to trashing my entire spring src folder and re-downloading from scratch. Spring Lobby is this way. And I'm pretty sure you can have github ignore the ./build folder when syncing. If that helps.
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

Strange, I don't see any new comments in the development branch

https://github.com/spring/spring/tree/develop
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

aw, sorry mixed lines in repos (this is why i thought it is fixed, but its not).
darklord42 wrote:Just a minor thing. Anyway we could have cmake in Spring do all of its build work in a ./build folder as oppose to the root directory?
you already can do that:

Code: Select all

mkdir build
cd build
cmake ..
make
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

I know I can make a build folder, but after doing cmake .., it still does all of it's building in the root directory.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

then i still don't understand what you want. maybe "git clean" helps?!
cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: Fails to compile at GLSLCopyState.cpp

Post by cleanrock »

darklord42 wrote:I know I can make a build folder, but after doing cmake .., it still does all of it's building in the root directory.
http://www.cmake.org/Wiki/CMake_FAQ#I_r ... ay._Why.3F
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

Ah you were absolutely right. Thanks guys. I should just assume I'm doing something wrong. Be a lot quicker. :oops:

On that note, I'm a little further in compiling spring but hit this.

Code: Select all

[ 69%] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/ExternalAI/SkirmishAIHandler.cpp.o
In file included from /Users/herecomethej/spring/rts/System/creg/creg.h:336:0,
                 from /Users/herecomethej/spring/rts/System/creg/creg_cond.h:16,
                 from /Users/herecomethej/spring/rts/Game/Players/TeamController.h:6,
                 from /Users/herecomethej/spring/rts/ExternalAI/SkirmishAIBase.h:6,
                 from /Users/herecomethej/spring/rts/ExternalAI/SkirmishAIData.h:6,
                 from /Users/herecomethej/spring/rts/ExternalAI/SkirmishAIHandler.h:6,
                 from /Users/herecomethej/spring/rts/ExternalAI/SkirmishAIHandler.cpp:3:
/Users/herecomethej/spring/rts/System/creg/TypeDeduction.h: In instantiation of 'boost::shared_ptr<creg::IType> creg::DeduceType<T>::Get() [with T = long unsigned int]':
/Users/herecomethej/spring/rts/System/creg/STL_Map.h:105:104:   required from 'boost::shared_ptr<creg::IType> creg::DeduceType<std::map<TKey, TValue> >::Get() [with TKey = long unsigned int; TValue = int]'
/Users/herecomethej/spring/rts/System/creg/TypeDeduction.h:126:20:   required from 'boost::shared_ptr<creg::IType> creg::GetType(T&) [with T = std::map<long unsigned int, int>]'
/Users/herecomethej/spring/rts/ExternalAI/SkirmishAIHandler.cpp:22:1:   required from here
/Users/herecomethej/spring/rts/System/creg/TypeDeduction.h:20:111: error: 'StaticClass' is not a member of 'long unsigned int'
  boost::shared_ptr<IType> Get() { return boost::shared_ptr<IType>(IType::CreateObjInstanceType(T::StaticClass())); }
                                                                                                               ^
make[2]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/ExternalAI/SkirmishAIHandler.cpp.o] Error 1
make[1]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/all] Error 2
make: *** [all] Error 2
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

related to http://springrts.com/mantis/view.php?id=4347

not sure how to fix in this case
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: Fails to compile at GLSLCopyState.cpp

Post by darklord42 »

dang
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Fails to compile at GLSLCopyState.cpp

Post by abma »

which error do you get currently?

current full output of a build would be useful...
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Fails to compile at GLSLCopyState.cpp

Post by lamer »

The issue

Code: Select all

/Users/herecomethej/spring/rts/System/creg/TypeDeduction.h:20:111: error: 'StaticClass' is not a member of 'long unsigned int'
  boost::shared_ptr<IType> Get() { return boost::shared_ptr<IType>(IType::CreateObjInstanceType(T::StaticClass())); }
still remains.

For some reason macport's gcc uses "long unsigned int" that was not declared here.

Add CREG_SUPPORT_BASIC_TYPE(long unsigned int, crUInt64)? Actually i'm not sure if its UInt64, have to write a small sizeof() app to check...
Post Reply

Return to “Mac OS X”