Bug #8132 2006-07-18 10:31
berli
compilation does not work with with gcc 4.1.2 in debian
I'm using Debian Linux, and the wxwidgets included with it (2.6.3). gcc version is 4.1.2. I did a clean checkout from: svn://svn.berlios.de/codeblocks/trunk ./bootstrap and ./configure succeed, but make stops with the below error message after some time. Making all in bindings make[5]: Entering directory `/home/elias/src/codeblocks/src/sdk/scripting/bindings' if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -I../../../../src/sdk -I../../../../src/sdk/wxscintilla/include -I../../../../src/sdk/scripting/include -I../../../../src/sdk/scripting/sqplus -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT scriptbindings.lo -MD -MP -MF ".deps/scriptbindings.Tpo" -c -o scriptbindings.lo scriptbindings.cpp; \ then mv -f ".deps/scriptbindings.Tpo" ".deps/scriptbindings.Plo"; else rm -f ".deps/scriptbindings.Tpo"; exit 1; fi mkdir .libs g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -I../../../../src/sdk -I../../../../src/sdk/wxscintilla/include -I../../../../src/sdk/scripting/include -I../../../../src/sdk/scripting/sqplus -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT scriptbindings.lo -MD -MP -MF .deps/scriptbindings.Tpo -c scriptbindings.cpp -fPIC -DPIC -o .libs/scriptbindings.o ../../../../src/sdk/scripting/sqplus/SqPlusConst.h: In static member function 'static int SqPlus::ReturnSpecialization<RT>::Call(Callee&, RT (Callee::*)()const, SQVM*, int) [with Callee = CompileOptionsBase, RT = const wxArrayString&]': ../../../../src/sdk/scripting/sqplus/SqPlusConst.h:281: instantiated from 'int SqPlus::Call(Callee&, RT (Callee::*)()const, SQVM*, int) [with Callee = CompileOptionsBase, RT = const wxArrayString&]' ../../../../src/sdk/scripting/sqplus/sqplus.h:1315: instantiated from 'static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = CompileOptionsBase, Func = const wxArrayString& (CompileOptionsBase::*)()const]' ../../../../src/sdk/scripting/sqplus/sqplus.h:1383: instantiated from 'void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = CompileOptionsBase, Func = const wxArrayString& (CompileOptionsBase::*)()const]' ../../../../src/sdk/scripting/sqplus/sqplus.h:1467: instantiated from 'void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = CompileOptionsBase, Func = const wxArrayString& (CompileOptionsBase::*)()const]' ../../../../src/sdk/scripting/sqplus/sqplus.h:1817: instantiated from 'SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = const wxArrayString& (CompileOptionsBase::*)()const, TClassType = CompileOptionsBase]' scriptbindings.cpp:337: instantiated from here ../../../../src/sdk/scripting/sqplus/SqPlusConst.h:46: error: no matching function for call to 'Push(SQVM*&, const wxArrayString&)' ../../../../src/sdk/scripting/sqplus/sqplus.h:595: note: candidates are: void SqPlus::Push(SQVM*, char) ../../../../src/sdk/scripting/sqplus/sqplus.h:596: note: void SqPlus::Push(SQVM*, unsigned char) ../../../../src/sdk/scripting/sqplus/sqplus.h:597: note: void SqPlus::Push(SQVM*, short int) ../../../../src/sdk/scripting/sqplus/sqplus.h:598: note: void SqPlus::Push(SQVM*, short unsigned int) ../../../../src/sdk/scripting/sqplus/sqplus.h:599: note: void SqPlus::Push(SQVM*, int) ../../../../src/sdk/scripting/sqplus/sqplus.h:600: note: void SqPlus::Push(SQVM*, unsigned int) ../../../../src/sdk/scripting/sqplus/sqplus.h:601: note: void SqPlus::Push(SQVM*, long int) ../../../../src/sdk/scripting/sqplus/sqplus.h:602: note: void SqPlus::Push(SQVM*, long unsigned int) ../../../../src/sdk/scripting/sqplus/sqplus.h:603: note: void SqPlus::Push(SQVM*, double) ../../../../src/sdk/scripting/sqplus/sqplus.h:604: note: void SqPlus::Push(SQVM*, float) ../../../../src/sdk/scripting/sqplus/sqplus.h:605: note: void SqPlus::Push(SQVM*, const SQChar*) ../../../../src/sdk/scripting/sqplus/sqplus.h:606: note: void SqPlus::Push(SQVM*, const SqPlus::SquirrelNull&) ../../../../src/sdk/scripting/sqplus/sqplus.h:607: note: void SqPlus::Push(SQVM*, SQInteger (*)(SQVM*)) ../../../../src/sdk/scripting/sqplus/sqplus.h:608: note: void SqPlus::Push(SQVM*, SqPlus::SQAnything*) ../../../../src/sdk/scripting/sqplus/sqplus.h:609: note: void SqPlus::Push(SQVM*, SquirrelObject&) ../../../../src/sdk/scripting/sqplus/sqplus.h:618: note: void SqPlus::Push(SQVM*, bool) ../../../../src/sdk/scripting/sqplus/sqplus.h:619: note: void SqPlus::Push(SQVM*, const void*) ../../../../src/sdk/scripting/sqplus/sqplus.h:620: note: void SqPlus::Push(SQVM*, void* const&) make[5]: *** [scriptbindings.lo] Error 1 make[5]: Leaving directory `/home/elias/src/codeblocks/src/sdk/scripting/bindings'
- Category
- Group
- Status
- Closed
- Close date
- 2006-08-31 21:41
- Assigned to
History
yes, it seems this is a gcc 4.1.x problem, gcc 3.4.x and gcc 4.0.x have no problem with it.
downgrading seems to be the solution :-(
Hm, that's really bad. Well, I hope you can figure it out.
I tried to fix it, but this place, taht the error occures is totally wicked.
I'm not sure, why doesn't gcc let the pointer to be stored, cause the function returns wxArrayString&, which is an int, and there is a int overloaded Push...
this patch makes the compile work on gcc-4.1.1 from Fedora Development
--- src/sdk/scripting/bindings/scriptbindings.cpp.orig 2006-07-09 13:54:49.000000000 +0200
+++ src/sdk/scripting/bindings/scriptbindings.cpp 2006-07-09 13:55:13.000000000 +0200
@@ -13,6 +13,9 @@
#include <globals.h>
#endif
+class SQVM;
+namespace SqPlus { void Push(SQVM*, const wxArrayString&); }
+
#include "scriptbindings.h"
#include <cbexception.h>
#include "sc_base_types.h"
That indeed does fix it, thanks. Should be applied to SVN I guess.
this has been fixed in the meantim (a 100% correct fix, no workaround).