Author Topic: Linux build - Tools Node Regression?  (Read 24782 times)

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Linux build - Tools Node Regression?
« on: April 30, 2014, 07:33:28 pm »
svn info
Code
Path: .
Working Copy Root Path: /home/me/codeblocks-code
URL: svn://svn.code.sf.net/p/codeblocks/code/trunk
Relative URL: ^/trunk
Repository Root: svn://svn.code.sf.net/p/codeblocks/code
Repository UUID: 2a5c6006-c6dd-42ca-98ab-0921f2732cef
Revision: 9760
Node Kind: directory
Schedule: normal
Last Changed Author: fuscated
Last Changed Rev: 9760
Last Changed Date: 2014-04-26 08:23:22 -0600 (Sat, 26 Apr 2014)

uname -r: 3.14.1-1-ARCH
installed from Arch wxgtk 3.0.0-3 (stock not customized)

ran ./bootstrap and ./configure without problems
make fails with error
Code
g++ -DHAVE_CONFIG_H  -I/usr/lib/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -I../../src/include/mozilla_chardet/mfbt -I../../src/include/mozilla_chardet/nsprpub/pr/include -I../../src/include/mozilla_chardet/xpcom -I../../src/include/mozilla_chardet/xpcom/base -I../../src/include/mozilla_chardet/xpcom/glue -ansi -DTIXML_USE_STL  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o ../../src/include/sdk_precomp.h.gch -xc++-header ./sdk_precomp.h
In file included from ./sdk_common.h:144:0,
                 from ./sdk_precomp.h:13:
./toolsmanager.h:46:32: error: ‘ToolsList::Node’ has not been declared
   void DoRemoveTool(ToolsList::Node* node);
                                ^
Makefile:967: recipe for target '../../src/include/sdk_precomp.h.gch' failed

Google search shows reference to forum thread:
http://forums.codeblocks.org/index.php?topic=18201.0;wap2
discussion was about using custom wxWidgets build.

Using stock wxWidgets from Arch.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Linux build - Tools Node Regression?
« Reply #1 on: April 30, 2014, 07:44:31 pm »
C::B is not fully ported to wx3.0.
So if the only purpose of this compilation is to use C::B to develop other software then please build it against wx2.8.
There is a configure flag which controls what wx-config to use.

BTW: As far as I remember there was a PKGBUILD for the svn version in AUR.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Linux build - Tools Node Regression?
« Reply #2 on: April 30, 2014, 08:01:07 pm »
Hm, probably your versoin of wxGTK 3.0 is configured in a wrong way, because here it builds just fine with the wx3.0 from a gentoo default install.

Edit:
Code
Note that if you compile wxWidgets in STL mode (wxUSE_STL defined as 1) then wxList<T> will actually derive from std::list and just add a legacy compatibility layer for the old wxList class.
Probably this is the problematic part.
« Last Edit: April 30, 2014, 08:04:06 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #3 on: April 30, 2014, 10:42:33 pm »
There is a configure flag which controls what wx-config to use.
the configure flags I found were to the paths of wxWidgets, not to wx-config.  But thanks

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #4 on: April 30, 2014, 10:45:17 pm »
Hm, probably your versoin of wxGTK 3.0 is configured in a wrong way, because here it builds just fine with the wx3.0 from a gentoo default install.

Edit:
Code
Note that if you compile wxWidgets in STL mode (wxUSE_STL defined as 1) then wxList<T> will actually derive from std::list and just add a legacy compatibility layer for the old wxList class.
Probably this is the problematic part.

That was one of the possibilities I reached. But I wanted to check with the studio audience first.
Will look into this more.

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #5 on: April 30, 2014, 11:20:46 pm »
found it...
Arch maintainer used the STL flag to build

from the pkgbuild file...
Code
build() {
  cd wxWidgets-${pkgver}
  ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
    --enable-graphics_ctx --enable-mediactrl --enable-webview --enable-stl --with-regex=builtin \
    --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
    --disable-precomp-headers
  make
  make -C locale allmo

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Linux build - Tools Node Regression?
« Reply #6 on: April 30, 2014, 11:43:36 pm »
Can you try this patch (I've tried if it will compile, but not if it runs correctly):

http://cmpt.benbmp.org/codeblocks/patches/wx3.stl.patch
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #7 on: May 01, 2014, 01:36:01 am »
Can you try this patch (I've tried if it will compile, but not if it runs correctly):

http://cmpt.benbmp.org/codeblocks/patches/wx3.stl.patch

patching was painful. I'm assuming you were outside the codeblocks folder when you made it?
anyway...

I can get make to build past the point of the previous error.
However, the build process balks at SQL.
Code
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:27:0,
                 from sc_wxtypes.cpp:18:
../../../../src/include/scripting/sqplus/sqplus.h: In instantiation of 'static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(HSQUIRRELVM) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); SQInteger = long int; HSQUIRRELVM = SQVM*]':
../../../../src/include/scripting/sqplus/sqplus.h:1313:86:   required from 'void SqPlus::sq_pushdirectinstanceclosure(HSQUIRRELVM, const Callee&, Func, SQUnsignedInteger) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); HSQUIRRELVM = SQVM*; SQUnsignedInteger = long unsigned int]'
../../../../src/include/scripting/sqplus/sqplus.h:1397:47:   required from 'void SqPlus::RegisterInstance(HSQUIRRELVM, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); HSQUIRRELVM = SQVM*; HSQOBJECT = tagSQObject; SQChar = char]'
../../../../src/include/scripting/sqplus/sqplus.h:1751:79:   required from 'SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = void (wxArrayStringBase::*)(); TClassType = wxArrayString; SQChar = char]'
sc_wxtypes.cpp:253:52:   required from here
../../../../src/include/scripting/sqplus/sqplus.h:1244:36: error: no matching function for call to 'Call(wxArrayString&, void (wxArrayStringBase::*&)(), SQVM*&, int)'
     return Call(*instance,*func,v,2);
                                    ^
 

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #8 on: May 01, 2014, 01:45:45 am »
Can you try this patch (I've tried if it will compile, but not if it runs correctly):
http://cmpt.benbmp.org/codeblocks/patches/wx3.stl.patch
patching was painful. I'm assuming you were outside the codeblocks folder when you made it?
my bad. I did a checkout of the trunk folder only not the whole branch. will fix. :) thanks

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Arch - wxGTK 3.0
« Reply #9 on: May 01, 2014, 02:11:34 am »
my bad - I had been working in git and forgot svn commands.
oBFusCATed: your patch worked. I just didn't use `patch` correctly.

did a clean svn checkout of the trunk - get a consistent error.
Make complains: "recipe for target 'sc_wxtypes.lo' failed" and gives verbose messages revolving around src/include/scripting/sqplus/SqPlusConst.h and src/include/scripting/bindings/sc_base_types.h. I'm thinking I've got a missing dependency or there is some other code issue.

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
[SOLVED] Re: Linux build - Tools Node Regression?
« Reply #10 on: May 01, 2014, 09:28:01 am »
 ;D ;D ;D ;D ::) ::) :P
touchdown...crowd goes wild!!!

@oBFusCATed - patch worked great
and you were right about the wx-config switch. again, my bad. apologies

build successful
wx-widgets
Code
/opt/wx30/bin/wx-config --version-full
3.1.0.0
(latest from github)

code::blocks - Revision: 9760

found references for using PCH and bad build environment
ended up building and installing own wxW version using  linux source build instructions

wxWidgets configure (bad):
Code
../configure --prefix=/opt/wx30 --with-sdl --with-opengl --enable-stl --enable-xrc --enable-unicode --enable-mediactrl --enable-webview --enable-precomp-headers 

applied wx3.stl.patch
C::B configure:
Code
./configure --with-wx-config=/opt/wx30/bin/wx-config
configure would run to the end, but make would fail with all sorts of errors about undefined references to wx containers ( and there were vast numbers and varying types ).

I rebuilt wx but this time without STL
wxWidgets configure (good):
Code
../configure --prefix=/opt/wx30 --with-sdl --with-opengl --enable-xrc --enable-unicode --enable-mediactrl --enable-webview --enable-precomp-headers 

cleaned out C::B and the patch, used the same C::B configure line as above.
make ran to the end without errors (although a couple of warnings about deprecated wxFont scrolled by really fast  ;) )

The two big differences noticed:
- STL containers flag
- the need to explicitly set pre-compiled headers. C::B make would fail on building the SDK - the error I was encountering after applying the patch
-> the first link hints at the need to explicitly set WX_PRECOMP value.

Once the configure lines were set up. Everything ran well.

Of note, someone did file a bug report in late March about wxGTK using "--enable-stl".
The maintainer's answer was that another application needed the flag. I can't see Arch having two versions of the same library with different flag settings...

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: [SOLVED] Re: Linux build - Tools Node Regression?
« Reply #11 on: May 03, 2014, 08:35:11 pm »
Of note, someone did file a bug report in late March about wxGTK using "--enable-stl".
The maintainer's answer was that another application needed the flag. I can't see Arch having two versions of the same library with different flag settings...


FYI: IIRC, there is 2 to 4 options selecting STL in multiple ways.

Macros
Code
wxUSE_STD_CONTAINERS
wxUSE_STD_IOSTREAM
wxUSE_STD_STRING
wxUSE_STL

The first option "--enable-stl" sets the other three.
Configure options.
Code
--enable-stl
--enable-std_containers
--enable-std_iostreams
--enable-std_string

I remember one more weird testing macro that I could NOT find to add to this post had something to do with STL and archive streams.
Edit: Found the test macro WX_TEST_ARCHIVE_ITERATOR.

Edit: It is likely that the app did NOT need all three options set; you might try to research it. I would see if just --enable-std_iostreams and --enable-std_string was enough to fix it. This part of wxWidgets is poorly documented so I can see it being missed.

Tim S.
« Last Edit: May 04, 2014, 08:10:57 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: [SOLVED] Re: Linux build - Tools Node Regression?
« Reply #12 on: May 03, 2014, 10:02:26 pm »
Tim,
Thanks!
wxGTK maintainer is Eric Belanger
The affected application is poedit maintained by Sergej Pupykin.
Not sure how to broach this one...I'm not a wxW dev, so I'm curious how my approach would be received.
Suggestions?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #13 on: May 03, 2014, 10:28:06 pm »
You have to find out what poedit needs to build correctly.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: [SOLVED] Re: Linux build - Tools Node Regression?
« Reply #14 on: May 03, 2014, 10:47:40 pm »
You have to find out what poedit needs to build correctly.
Tim S.

Grabbing source from github now. Will look.

Its almost like we need an "Office of wxWidgets Coordination" to keep all these configurations up to date :P ::) ;) :D