News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Linux build - Tools Node Regression?

Started by digifuzzy, April 30, 2014, 07:33:28 PM

Previous topic - Next topic

digifuzzy

svn info

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

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.next.codeblocks.org/index.php?topic=18201.0;wap2
discussion was about using custom wxWidgets build.

Using stock wxWidgets from Arch.

oBFusCATed

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!]

oBFusCATed

#2
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:

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.
(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!]

digifuzzy

Quote from: oBFusCATed on April 30, 2014, 07:44:31 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

digifuzzy

Quote from: oBFusCATed 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:

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.

digifuzzy

found it...
Arch maintainer used the STL flag to build

from the pkgbuild file...

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

oBFusCATed

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!]

digifuzzy

Quote from: oBFusCATed 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

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.

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);
                                    ^

digifuzzy

Quote from: digifuzzy on May 01, 2014, 01:36:01 AM
Quote from: oBFusCATed 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
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

digifuzzy

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.

digifuzzy

 ;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

/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):
../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:
./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):
../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...

stahta01

#11
Quote from: digifuzzy on May 01, 2014, 09:28:01 AM
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

wxUSE_STD_CONTAINERS
wxUSE_STD_IOSTREAM
wxUSE_STD_STRING
wxUSE_STL


The first option "--enable-stl" sets the other three.
Configure options.

--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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

digifuzzy

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?

stahta01

You have to find out what poedit needs to build correctly.

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

digifuzzy

Quote from: stahta01 on May 03, 2014, 10:28:06 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