Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: digifuzzy on May 03, 2014, 09:50:35 pm

Title: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 03, 2014, 09:50:35 pm
Reporting observations
Environment:
uname -r : 3.14.2-1-ARCH
wxWidgets: last change set 76439 (2014May02)
wxWidgets configure: --prefix=/opt/wx30 --with-sdl --with-opengl --enable-xrc --enable-unicode --enable-mediactrl --enable-webview --enable-precomp-headers
CB: rev 9760
CB configure: --with-contrib-plugins=all --with-wx-config=/opt/wx30/bin/wx-config

Build wxW and CB w/ gcc-4.9.0.1 gcc-libs-4.9.0.1 libtool-2.4.2-13 (latest from Arch)
wxW build would be successful, but CB build would fail with message
Code: [Select]
/bin/sh ../../libtool  --tag=CXX   --mode=link g++  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions  -Wl,--no-undefined -o codeblocks app.o appglobals.o backtracedlg.o breakpointsdlg.o compilersettingsdlg.o cpuregistersdlg.o crashhandler.o debugger_interface_creator.o debuggermenu.o debuggersettingscommonpanel.o debuggersettingsdlg.o debuggersettingspanel.o disassemblydlg.o dlgabout.o dlgaboutplugin.o editkeywordsdlg.o editorconfigurationdlg.o environmentsettingsdlg.o examinememorydlg.o find_replace.o infopane.o main.o notebookstyles.o prefix.o printdlg.o projectmanagerui.o projectdepsdlg.o projectoptionsdlg.o recentitemslist.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o switcherdlg.o threadsdlg.o virtualbuildtargetsdlg.o watchesdlg.o ../sdk/libcodeblocks.la -L/opt/wx30/lib -pthread   -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1  -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype  -lpthread -ldl
libtool: link: g++ -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -Wl,--no-undefined -o .libs/codeblocks app.o appglobals.o backtracedlg.o breakpointsdlg.o compilersettingsdlg.o cpuregistersdlg.o crashhandler.o debugger_interface_creator.o debuggermenu.o debuggersettingscommonpanel.o debuggersettingsdlg.o debuggersettingspanel.o disassemblydlg.o dlgabout.o dlgaboutplugin.o editkeywordsdlg.o editorconfigurationdlg.o environmentsettingsdlg.o examinememorydlg.o find_replace.o infopane.o main.o notebookstyles.o prefix.o printdlg.o projectmanagerui.o projectdepsdlg.o projectoptionsdlg.o recentitemslist.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o switcherdlg.o threadsdlg.o virtualbuildtargetsdlg.o watchesdlg.o -pthread  ../sdk/.libs/libcodeblocks.so -L/opt/wx30/lib -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lpthread -ldl -pthread -Wl,-rpath -Wl,/usr/local/lib
/opt/wx30/lib/libwx_gtk2u_propgrid-3.1.so: undefined reference to `wxCommandEvent::Clone() const'
( full build log is available)

A look at wxWidgets documentation - it appears the wxObject::Clone was replaced around 2012 (wxW2.9.x branch?) with wxObject::Ref (http://docs.wxwidgets.org/3.0/classwx_object.html#a2f6f1aa51fe9fc2b1415ca4211a90e9e).
A search of the CB sources for 'prop' and 'clone' (to address just the build fail encountered) found the following references:
Code: [Select]
src/sdk/wxpropgrid/src/propgrid.cpp:10603:wxEvent* wxPropertyGridEvent::Clone() const
src/sdk/wxpropgrid/samples/propgridsample.cpp:165:    virtual wxObject* Clone() const
src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h:1672:    virtual wxVariantData* Clone() { return new CLASSNAME; } \
src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h:3075:        m_validator = wxDynamicCast(validator.Clone(),wxValidator);
src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h:8437:    virtual wxEvent* Clone() const;

Downgraded gcc and gcc-libs to 4.8.2-8 and libtool to 2.4.2-12 and the CB build would be successful.
( full build log is available)
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 03, 2014, 10:31:10 pm
No one, to my knowledge, except me has tried to build CB with wxWidgets 3.1 AKA wxWidgets trunk.
I would suggest using wxWidgets 3.0 or wxWidgets 3.0 branch, instead.

CB is unstable using wxWidgets 3.0 or wxWidgets 3.0 branch; but, it does build.

Edit: For 3.1 you likely need to make sure wxWidgets configure uses option "--enable-compat28".

Tim S.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: jens on May 03, 2014, 11:33:16 pm
No one, to my knowledge, except me has tried to build CB with wxWidgets 3.1 AKA wxWidgets trunk.
I would suggest using wxWidgets 3.0 or wxWidgets 3.0 branch, instead.

CB is unstable using wxWidgets 3.0 or wxWidgets 3.0 branch; but, it does build.

Edit: For 3.1 you likely need to make sure wxWidgets configure uses option "--enable-compat28".

Tim S.

The problem is not wx3.1, but the combination of gcc 4.9 and wx3.1 .
I buid against wxtrunk regulary and use it, still not as stable as with wx2.8, but it works.
I only have gcc 4.9 on my Fedora 21 (Rawhide) VM, but I did not (yet) use it to build gcc or wx.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 03, 2014, 11:45:03 pm
No one, to my knowledge, except me has tried to build CB with wxWidgets 3.1 AKA wxWidgets trunk.
I would suggest using wxWidgets 3.0 or wxWidgets 3.0 branch, instead.

I looked into the wxW revisions for another issue.
It seems that trunk is the wxW_3_0_0 branch at the moment.
http://trac.wxwidgets.org/browser/wxWidgets/tags?order=date&desc=1 (http://trac.wxwidgets.org/browser/wxWidgets/tags?order=date&desc=1)
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 04, 2014, 02:09:10 am
It seems that trunk is the wxW_3_0_0 branch at the moment.

Very unlikely; but, jens says the issues is gcc 4.9 instead of wx trunk as I guessed.
I just am very surprised that CB does NOT require wx 2.8 compatible mode to be on; I have NOT seen that many wxWidgets 3.0 patches submitted to fix all the places in CB that assumed wx 2.8 compatible mode.

Edit: But, its been about 5 months since I last tried wx trunk; I stopped about one month after the 3.0 branch started.

Edit2: I am using WX_3_0_BRANCH and it is still wxWidgets 3.0.1.0 in wx/version.h.

Tim S.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 04, 2014, 08:46:41 am
It seems that trunk is the wxW_3_0_0 branch at the moment.

I just am very surprised that CB does NOT require wx 2.8 compatible mode to be on; I have NOT seen that many wxWidgets 3.0 patches submitted to fix all the places in CB that assumed wx 2.8 compatible mode.

Edit: But, its been about 5 months since I last tried wx trunk; I stopped about one month after the 3.0 branch started.

Edit2: I am using WX_3_0_BRANCH and it is still wxWidgets 3.0.1.0 in wx/version.h.

Tim S.

So is this something that needs attention? Find wx28/wx26 code in CB and update?
If a patch were submitted, how much effort to maintain reverse-compatibility?
Would there be a need to have #if/#else preprocessor statement to check wx version?
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 04, 2014, 03:00:21 pm
So is this something that needs attention? Find wx28/wx26 code in CB and update?
If a patch were submitted, how much effort to maintain reverse-compatibility?
Would there be a need to have #if/#else preprocessor statement to check wx version?


To find the places is NOT that much effort; but, to fix the places requires research and testing.

And, it would require #if/#else preprocessor statement to check wx version in most places.

But, Jens seems to think that the fixes has been done.

The first thing to do is to build wxWidgets 3.0.0.0 without 2.8 compatible mode (IIRC, it defaults to being enabled).
Then, build CB against that; this would verify the issues are fixed or NOT in CB.

Tim S.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 04, 2014, 04:48:46 pm
The first thing to do is to build wxWidgets 3.0.0.0 without 2.8 compatible mode (IIRC, it defaults to being enabled).
Then, build CB against that; this would verify the issues are fixed or NOT in CB.

Strange, I didn't enable wx28 compatibility. Configure returned the info below (snipped)
Code: [Select]
Configured wxWidgets 3.1.0 for `x86_64-unknown-linux-gnu'
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes

Okay...having already seen a couple of deprecated messages in the build. I think I know where to start.
Thanks, TIm.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 04, 2014, 06:16:18 pm
The first thing to do is to build wxWidgets 3.0.0.0 without 2.8 compatible mode (IIRC, it defaults to being enabled).
Then, build CB against that; this would verify the issues are fixed or NOT in CB.

Strange, I didn't enable wx28 compatibility. Configure returned the info below (snipped)
Code: [Select]
Configured wxWidgets 3.1.0 for `x86_64-unknown-linux-gnu'
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes

Okay...having already seen a couple of deprecated messages in the build. I think I know where to start.
Thanks, TIm.

Can you NOT tell the difference between  3.1 and 3.0?

Edit: Do realize that 3.1 is a development build while 3.0 is a production build?
For this reason, it is NOT likely the CB team will accept patches for 3.1 at this time.
While patches for wx 3.0 without  compatibility for 2.8 will likely be accepted.

Edit2: From wx/setup_inc.h WX_3_0_BRANCH svn 76442
Edit3: Never edit wx/setup_inc.h unless you are making or testing a patch to submit to the wxWidgets dev team!

Code: [Select]
// This setting determines the compatibility with 2.8 API: set it to 0 to
// flag all cases of using deprecated functions.
//
// Default is 1 but please try building your code with 0 as the default will
// change to 0 in the next version and the deprecated functions will disappear
// in the version after it completely.
//
// Recommended setting: 0 (please update your code)
#define WXWIN_COMPATIBILITY_2_8 1

Tim S.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 04, 2014, 08:03:50 pm
I am building CodeBlocks linking against wxWidgets 3.0 branch without 2.8 compat mode.

It appears to be working without any error.

So, I think Jens is completely right and there are no remaining 2.8 wx compat mode issues for the core CB project.

Edit: I am doing a second rebuild and then will test the exe under windows 7 32 bit.

Tim S.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 04, 2014, 08:12:00 pm
Edit2: From wx/setup_inc.h WX_3_0_BRANCH svn 76442
Edit3: Never edit wx/setup_inc.h unless you are making or testing a patch to submit to the wxWidgets dev team!
wow...
All I did was a git clone and and configure. No hand editing of files involved. I understand your point. wxWidgets Tags (http://trac.wxwidgets.org/browser/wxWidgets/tags?order=date&desc=1) doesn't show a release 3.0 or a 3.1 tag. The latest tag from the url is WX_3_0_0 @ change 75176. I have the latest from git and pasted the output of configure to point out that wx28_compat was not explicitly called out and appeared disabled.
Code: [Select]
// This setting determines the compatibility with 2.8 API: set it to 0 to
// flag all cases of using deprecated functions.
//
// Default is 1 but please try building your code with 0 as the default will
// change to 0 in the next version and the deprecated functions will disappear
// in the version after it completely.
From the code snippet you included, not having wx28 compatibility appears to be "expected behaviour" as it is not the next-to-latest build.

Can you NOT tell the difference between  3.1 and 3.0?
I can build against the non-git, downloaded release. Would that alleviate your concerns?
Again, I posted what I had done as using the latest (bleeding edge).
wxWidgets people are making commits to the WX_3_0_0 tag at the moment. And there is no WX_3_1_0 tag right now (assume everything is latest from trunk).
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: jens on May 05, 2014, 01:24:44 am
I just build wxWidgets (newest trunk) with gcc 4.9 and C::B against it (also gcc 4.9) without errors, just the known deprectaion warnings.
All on Fedora 21 (Rawhide) with newest updates.

So it's not the combination of gcc 4.9, wx-trunk and newest C::B, it must  be something different, which leads to the error.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 05, 2014, 02:31:28 am
I just build wxWidgets (newest trunk) with gcc 4.9 and C::B against it (also gcc 4.9) without errors, just the known deprectaion warnings.
All on Fedora 21 (Rawhide) with newest updates.

So it's not the combination of gcc 4.9, wx-trunk and newest C::B, it must  be something different, which leads to the error.

Then I must be using different configure flags which are causing the errors.
Will go back to the build src page and try again.
Details to follow.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 05, 2014, 04:20:18 am
I must not be using the same flags as Jens. I keep getting hung up in the complile.
I have tried:
--enable--precomp-headers (worked in gcc4.8 build)
--disable-optimize (used in Arch wxgtk 2.8 build)
--enable-compat28 (had to try it)

Each build starts with a clean distribution before autogen/bootstrap, configure, make
wxWidgets will build without error.
CB will halt with the message:
Code: [Select]
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/opt/wx30/lib/wx/include/gtk2-unicode-3.1 -I/opt/wx30/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../src/include -I../../../src/sdk/wxscintilla/include -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 -MT parser/expression.lo -MD -MP -MF parser/.deps/expression.Tpo -c parser/expression.cpp  -fPIC -DPIC -o parser/.libs/expression.o
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -module -version-info 0:1:0 -shared -no-undefined -avoid-version -Wl,--no-undefined -o libcodecompletion.la -rpath /opt/cb/lib/codeblocks/plugins ccoptionsdlg.lo ccoptionsprjdlg.lo cctreectrl.lo classbrowser.lo classbrowserbuilderthread.lo codecompletion.lo coderefactoring.lo doxygen_parser.lo insertclassmethoddlg.lo nativeparser.lo nativeparser_base.lo selectincludefile.lo systemheadersthread.lo parser/ccdebuginfo.lo parser/cclogger.lo parser/parser.lo parser/parserthread.lo parser/parserthreadedtask.lo parser/profiletimer.lo parser/token.lo parser/tokenizer.lo parser/tokentree.lo parser/searchtree.lo parser/expression.lo ../../sdk/libcodeblocks.la -L/opt/wx30/lib -pthread   -lwx_gtk2u-3.1  -lpthread -ldl
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtbeginS.o  .libs/ccoptionsdlg.o .libs/ccoptionsprjdlg.o .libs/cctreectrl.o .libs/classbrowser.o .libs/classbrowserbuilderthread.o .libs/codecompletion.o .libs/coderefactoring.o .libs/doxygen_parser.o .libs/insertclassmethoddlg.o .libs/nativeparser.o .libs/nativeparser_base.o .libs/selectincludefile.o .libs/systemheadersthread.o parser/.libs/ccdebuginfo.o parser/.libs/cclogger.o parser/.libs/parser.o parser/.libs/parserthread.o parser/.libs/parserthreadedtask.o parser/.libs/profiletimer.o parser/.libs/token.o parser/.libs/tokenizer.o parser/.libs/tokentree.o parser/.libs/searchtree.o parser/.libs/expression.o   -Wl,-rpath -Wl,/home/scottfurry/localbuild/SRCs/codeblocks/codeblocks-code/src/sdk/.libs -Wl,-rpath -Wl,/opt/cb/lib ../../sdk/.libs/libcodeblocks.so -L/opt/wx30/lib -lwx_gtk2u-3.1 -lpthread -ldl -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtfastmath.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtendS.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib/crtn.o  -O2 -Wl,--no-undefined -pthread   -pthread -Wl,-soname -Wl,libcodecompletion.so -o .libs/libcodecompletion.so
.libs/codecompletion.o: In function `CodeCompletion::FindFunctionAndUpdate(int)':
codecompletion.cpp:(.text+0x256a): undefined reference to `wxCommandEvent::Clone() const'
collect2: error: ld returned 1 exit status


Must be some wx flag I'm not setting in configure.
Looking in ./src/plugins/codecompletion/codecompletion.cpp function FindFunctionAndUpdate, I see a pretty standard custom event setup:
Code: [Select]
           choice->SetStringSelection(g_GlobalScope);
            wxCommandEvent evt(wxEVT_COMMAND_CHOICE_SELECTED, XRCID("chcCodeCompletionScope"));
            wxPostEvent(this, evt);

And this shouldn't cause problems. Will dig some more. Something will jump out at me.

Edit: one thing did...code completion is a plugin. I have --with-contrib-plugins=all set during CB configure.
Edit: configured with --disable-code-completion - build failed during linking - same error.
Code: [Select]
/bin/sh ../../libtool  --tag=CXX   --mode=link g++  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions  -Wl,--no-undefined -o codeblocks app.o appglobals.o backtracedlg.o breakpointsdlg.o compilersettingsdlg.o cpuregistersdlg.o crashhandler.o debugger_interface_creator.o debuggermenu.o debuggersettingscommonpanel.o debuggersettingsdlg.o debuggersettingspanel.o disassemblydlg.o dlgabout.o dlgaboutplugin.o editkeywordsdlg.o editorconfigurationdlg.o environmentsettingsdlg.o examinememorydlg.o find_replace.o infopane.o main.o notebookstyles.o prefix.o printdlg.o projectmanagerui.o projectdepsdlg.o projectoptionsdlg.o recentitemslist.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o switcherdlg.o threadsdlg.o virtualbuildtargetsdlg.o watchesdlg.o ../sdk/libcodeblocks.la -L/opt/wx30/lib -pthread   -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1  -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype  -lpthread -ldl
libtool: link: g++ -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -Wl,--no-undefined -o .libs/codeblocks app.o appglobals.o backtracedlg.o breakpointsdlg.o compilersettingsdlg.o cpuregistersdlg.o crashhandler.o debugger_interface_creator.o debuggermenu.o debuggersettingscommonpanel.o debuggersettingsdlg.o debuggersettingspanel.o disassemblydlg.o dlgabout.o dlgaboutplugin.o editkeywordsdlg.o editorconfigurationdlg.o environmentsettingsdlg.o examinememorydlg.o find_replace.o infopane.o main.o notebookstyles.o prefix.o printdlg.o projectmanagerui.o projectdepsdlg.o projectoptionsdlg.o recentitemslist.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o switcherdlg.o threadsdlg.o virtualbuildtargetsdlg.o watchesdlg.o -pthread  ../sdk/.libs/libcodeblocks.so -L/opt/wx30/lib -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lpthread -ldl -pthread -Wl,-rpath -Wl,/opt/cb/lib
/opt/wx30/lib/libwx_gtk2u_propgrid-3.1.so: undefined reference to `wxCommandEvent::Clone() const'
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: stahta01 on May 05, 2014, 05:05:32 am
I strongly suspect you have a broken wxWidgets installation.
(You might only have a bad Precompiled header (PCH/gch) file.)

Do you do an make uninstall before each make install?

NOTE: I have learned that wxWidgets does a very poor job of MonoLib versus MultiLib builds.

So, I use "/opt/wx/multilib" and "/opt/wx/monolib" when doing MSys configure build on windows.

I suggest building wxWidgets "samples/event" code to verify your wxWidgets is valid.

Tim S.

Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 05, 2014, 05:43:46 am
I strongly suspect you have a broken wxWidgets installation.
(You might only have a bad Precompiled header (PCH/gch) file.)
Do you do an make uninstall before each make install?
Quite possible. The sequence I used was
- sudo make uninstall
- make distclean
- configure
- make

Anything is possible. For some reason, the event clone is causing grief.
I'm going to take a day, do a full clean of sources and try again.
I want to believe its a silly switch or configure setting that's causing the problem.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: jens on May 05, 2014, 06:26:12 am
Thta's the configure-line to build wx:
Code: [Select]
../../wxwidgets.dev/configure --with-zlib=sys --disable-reserved_virtual --enable-debug --enable-debug_info --enable-debug_gdb --enable-unicode --with-gtk=2 --enable-sound --with-sdl --enable-display --enable-geometry --enable-graphics_ctx --with-libjpeg=builtin --with-libpng=sys --with-libtiff=sys  --with-openglRunning configure ends with:
Code: [Select]
Configured wxWidgets 3.1.0 for `x86_64-unknown-linux-gnu'
  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for GTK+ printing libnotify
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                yes

I build wx in an own directory and I do not install it.
That makes it easier to clean the build-folder before a new build, just delete and recreate it or delete everything in it, including the hidden-folders (very important, pch's go there !!).
I use the wx-config inside the build-folder. Either by setting C::B's "--with-wx-config"-parameter (when using automake) or by using manipulated versions of C::B's  wx30-project-files, which use it in the "Custom variables" tab.

As I wrote, lots of deprecated warnings (without my opatch for it), but build works (nore or less) fine (C::B still has issues with wx >= 2.9) .
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 05, 2014, 05:22:23 pm
already I see a few differences between my setup and yours.
What jumps out at me...
- explicitly calling out zlib, png and tiff (xpm is also available but you don't list it - these are detected on my system and default to "sys" here)
- jpeg builting ( same as above - detected and defaults to "sys" here)
--- the catch to the above is that there is now a dependency on libjpeg, libtiff, libxpm, libpng and libzlib - I've seen debian list these libraries as dependencies, but not Arch.
- verbose debug settings
- enabling display | geometry ( must research )
- enable-graphics_ctx ( arch PKGBUILD calls this - must research)
- disable-reserved_virtual ( must research )

I build wxW in a seperate directory also. But install to /opt/wx30. But hey, both methods work.

My object::Clone() issue must be related to a flag, but I'll dig into it more and report back shortly.
Taking a day...
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 06, 2014, 06:13:12 pm
@Jens - no joy.  >:(

I reset both CB and WX. Used your CB and WX configure settings.

make would still fail in the same place.
Code: [Select]
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/local/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../src/include -I../../../src/sdk/wxscintilla/include -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 -MT parser/expression.lo -MD -MP -MF parser/.deps/expression.Tpo -c parser/expression.cpp  -fPIC -DPIC -o parser/.libs/expression.o
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -module -version-info 0:1:0 -shared -no-undefined -avoid-version -Wl,--no-undefined -o libcodecompletion.la -rpath /usr/local/lib/codeblocks/plugins ccoptionsdlg.lo ccoptionsprjdlg.lo cctreectrl.lo classbrowser.lo classbrowserbuilderthread.lo codecompletion.lo coderefactoring.lo doxygen_parser.lo insertclassmethoddlg.lo nativeparser.lo nativeparser_base.lo selectincludefile.lo systemheadersthread.lo parser/ccdebuginfo.lo parser/cclogger.lo parser/parser.lo parser/parserthread.lo parser/parserthreadedtask.lo parser/profiletimer.lo parser/token.lo parser/tokenizer.lo parser/tokentree.lo parser/searchtree.lo parser/expression.lo ../../sdk/libcodeblocks.la -L/usr/local/lib -pthread   -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1  -lpthread -ldl
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtbeginS.o  .libs/ccoptionsdlg.o .libs/ccoptionsprjdlg.o .libs/cctreectrl.o .libs/classbrowser.o .libs/classbrowserbuilderthread.o .libs/codecompletion.o .libs/coderefactoring.o .libs/doxygen_parser.o .libs/insertclassmethoddlg.o .libs/nativeparser.o .libs/nativeparser_base.o .libs/selectincludefile.o .libs/systemheadersthread.o parser/.libs/ccdebuginfo.o parser/.libs/cclogger.o parser/.libs/parser.o parser/.libs/parserthread.o parser/.libs/parserthreadedtask.o parser/.libs/profiletimer.o parser/.libs/token.o parser/.libs/tokenizer.o parser/.libs/tokentree.o parser/.libs/searchtree.o parser/.libs/expression.o   -Wl,-rpath -Wl,/home/scottfurry/localbuild/SRCs/codeblocks/codeblocks/src/sdk/.libs -Wl,-rpath -Wl,/usr/local/lib ../../sdk/.libs/libcodeblocks.so -L/usr/local/lib -lwx_gtk2u_aui-3.1 -lwx_gtk2u_propgrid-3.1 -lwx_gtk2u_richtext-3.1 -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_webview-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -lpthread -ldl -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtfastmath.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/crtendS.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib/crtn.o  -O2 -Wl,--no-undefined -pthread   -pthread -Wl,-soname -Wl,libcodecompletion.so -o .libs/libcodecompletion.so
.libs/codecompletion.o: In function `CodeCompletion::FindFunctionAndUpdate(int)':
codecompletion.cpp:(.text+0x256a): undefined reference to `wxCommandEvent::Clone() const'

need to re-evaluate.
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 07, 2014, 02:24:47 am
I have made a couple attempts at building with gcc49 and wx31. I cannot reproduce Jens success with his WX config settings.

Each attempt, CB make will fail pointing at codecompletion.cpp with the message that "undefined reference to `wxCommandEvent::Clone() const". A quick search of the WX documentation found this link wxEvent::Clone (http://"http://docs.wxwidgets.org/trunk/classwx_event.html#a26878097a702e8d0368da150125d4158").
The docs suggest...
Quote
All wxWidgets events fully implement this method, but any derived events implemented by the user should also implement this method just in case they (or some event derived from them) are ever posted.

From the src code, wxPropertyGridEvent is derived from wxCommandEvent and
Code: Text
  1. wxEvent* wxPropertyGridEvent::Clone() const
  2. {
  3.     return new wxPropertyGridEvent( *this );
  4. }
  5.  

Since this clone method is being implemented and I've ensured I have clean sources (both WX and CB) for the build, I'm at a loss to explain the consistent build failure at exactly the same point. As I cannot proceed at the moment, I'm going to follow up on oBFusCATed's suggestion in another thread and go bug hunting for a bit...



[attachment deleted by admin]
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: digifuzzy on May 07, 2014, 04:32:38 am
Attaching configure logs for both CB and WX from Jens settings.

[attachment deleted by admin]
Title: Re: Building CB - bleeding edge - gcc49 wxW30
Post by: WinterMute on May 22, 2014, 01:17:24 pm
gcc 4.9 has issues with wxWidgets.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61214