Code::Blocks Forums

User forums => Help => Topic started by: kelo81 on April 04, 2007, 12:18:00 am

Title: Problem building SVN revision 3810
Post by: kelo81 on April 04, 2007, 12:18:00 am
Hello everybody. I'm trying to compile SVN 3810 from zero under slackware 11 and wxGTK 2.6.4 and all seems to be OK, but at the end of the compiling task I'm getting this error:

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -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 -I../../../../src/include -I../../../../src/include/wxscintilla/include -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT codesnippets.lo -MD -MP -MF .deps/codesnippets.Tpo -c codesnippets.cpp  -fPIC -DPIC -o .libs/codesnippets.o
In file included from codesnippetswindow.h:31,
                 from codesnippets.cpp:38:
snippetsconfig.h:42: error: new declaration `wxCharBuffer cbU2C(const wxString&)'
./globals.h:146: error: ambiguates old declaration `const wxCharBuffer cbU2C(const wxString&)'
make[5]: *** [codesnippets.lo] Error 1
make[5]: Leaving directory `/sdk/codeblocks/src/plugins/contrib/codesnippets'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/sdk/codeblocks/src/plugins/contrib/codesnippets'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/sdk/codeblocks/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/sdk/codeblocks/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/sdk/codeblocks/src'
make: *** [all-recursive] Error 1


Wha't could be happening?  :(

Thanks in advance!
Title: Re: Problem building SVN revision 3810
Post by: TDragon on April 04, 2007, 12:26:21 am
CodeSnippets Version 1.1.53 2007/04/3
...
Note: Killerbot believes this commit has broken the Linux build.
Until we can figure this out, Linux users using "make" should wait to update.
Apparently Killerbot is correct. Let me take a minute to look up a good revision to revert to.

-----

Yep, 3810 is the breaking one. Try 3809 ("svn update -r 3809"). Alternatively, reconfiguring with --disable-contrib and rebuilding should work too, I think.
Title: Re: Problem building SVN revision 3810
Post by: Pecan on April 04, 2007, 12:37:40 am
Ok, I think I know the problem. Somebody stuck a const onto

Code
const wxWX2MBbuf cbU2C(const wxString& str);

since I updated via SVN giving linux const(ipation).

I'll update and correct.

thanks
pecan
Title: Re: Problem building SVN revision 3810
Post by: kelo81 on April 04, 2007, 01:35:41 am
Well, thank you  :D

Now I'm able to compile the revision 3809, but after running the make install command, if I try to start Codeblocks I get this error:

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.6 (no debug,Unicode,compiler with C++ ABI 102,wx containers,compatible with 2.4),
and your program used 2.6 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4).
Aborted

Rememeber that I used wxGTK 2.6.4 and I'm using Slackware 11 (with a  recompiled 2.6 kernel). I've just followed the WIKI instructions to make CB from sources...

Any Idea?
Title: Re: Problem building SVN revision 3810
Post by: TDragon on April 04, 2007, 01:53:49 am
Seems like your wxGTK library may have been compiled with a different compiler (== different version of GCC) than the one you're using. Your options in that case are to downgrade to whichever version it was, or (a better choice) compile wxGTK from sources with your current compiler.

The fact that you're using a different kernel build might have something to do with it, though I doubt it.

Note: Before trying these more drastic measures, I'd make absolutely sure that a fresh checkout and build from scratch really doesn't work. Stranger things have happened...
Title: Re: Problem building SVN revision 3810
Post by: Pecan on April 04, 2007, 02:27:33 am
Ok, I think I know the problem. Somebody stuck a const onto

Code
const wxWX2MBbuf cbU2C(const wxString& str);

since I updated via SVN giving linux const(ipation).

I'll update and correct.

thanks
pecan


I added the const to: "wxWX2MBbuf cbU2C(const wxString& str);"
and re-commited (SVN 3811) but I was never able to duplicate the error with either the newest or my older SVN revisions.

I don't understand why the error didn't happen to my andLinux system in the first place.

Thanks for reporting it.
Title: Re: Problem building SVN revision 3810
Post by: kelo81 on April 04, 2007, 04:33:37 am
OK, I was using a precompiled wxGTK package. I just recompiled it again and I didn't have anymore this problem. And regarding the 3811 commit, It's working OK now!, thanks!!

Kind regards,

Ezequiel
Title: Re: Problem building SVN revision 3810
Post by: Biplab on April 04, 2007, 06:55:35 am
Ok, I think I know the problem. Somebody stuck a const onto

Code
const wxWX2MBbuf cbU2C(const wxString& str);

Please read the following bug-report for more details on why it was added. This has been fixed recently. :)

Quote
https://developer.berlios.de/bugs/?func=detailbug&bug_id=10669&group_id=5358

Regards,

Biplab
Title: Re: Problem building SVN revision 3810
Post by: killerbot on April 04, 2007, 08:05:56 am
rev 3811 builds ok again.
Title: Re: Problem building SVN revision 3810
Post by: thomas on April 05, 2007, 03:13:30 pm
This may seem like a stupid question, but is there an urgent reason why the CodeSnippets plugin has to shadow a SDK function at all? Why not use the one that's there?
Title: Re: Problem building SVN revision 3810
Post by: Pecan on April 05, 2007, 04:46:41 pm
This may seem like a stupid question, but is there an urgent reason why the CodeSnippets plugin has to shadow a SDK function at all? Why not use the one that's there?

I have my own convertion routines, but had copied the header etc from globals.h

I should have changed the names, but since I've never gotten  the problem on my linux setup, I didn't know the compile error would happen.

I don't know why it IS happening to other systems, but not to mine.

Next time around, I'll change the names.
Title: Re: Problem building SVN revision 3810
Post by: thomas on April 05, 2007, 05:24:09 pm
But what is wrong with just using the identical SDK functions?
Is there a problem with them, don't they work correctly? If they don't work correctly, we need to fix them...