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

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #15 on: May 04, 2014, 08:16:54 pm »
poedit "explicity" calls out the "--use-stl" flag.

from github README https://github.com/vslavik/poedit
Code
 Installing from sources
=========================
Requirements:
  * Boost
  * Unicode build of wxWidgets library, version >= 3.0, with --enable-stl    (see http://www.wxwidgets.org)
  * ICU
  * LucenePlusPlus
  * expat
  * Berkeley DB >= 4.7 if you need legacy (pre-1.6) translation memory
  * If on Unix, GtkSpell for spell checking support

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #16 on: May 04, 2014, 09:20:46 pm »
poedit "explicity" calls out the "--use-stl" flag.

from github README https://github.com/vslavik/poedit

I think you have three choices.
Give up.
Verify that poedit really needs the "--use-stl" flag.
Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)

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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Linux build - Tools Node Regression?
« Reply #17 on: May 04, 2014, 09:25:49 pm »

Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)

some hint where? At the moment i don't have the resources to compile wx again...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #18 on: May 04, 2014, 09:30:13 pm »

Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)

some hint where? At the moment i don't have the resources to compile wx again...

It was months ago, IIRC it was in the script binding section.

I do NOT really have the harddisk space to compile wxWidgets right now either.
Next time I try I will try to post the errors.
Edit: trying to compile it now; I hope to get the error before the data/build disk is full.
Edit2: Made to sdk before error happened.

Tim S.
« Last Edit: May 05, 2014, 01:32:22 am 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: Linux build - Tools Node Regression?
« Reply #19 on: May 04, 2014, 09:32:36 pm »
poedit "explicity" calls out the "--use-stl" flag.

from github README https://github.com/vslavik/poedit

I think you have three choices.
Give up.
Verify that poedit really needs the "--use-stl" flag.
Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)
I don't use poedit and I'm not digging into this source code. The dev is setup at github and forces uses to clone the stable branch.The github has an https problem with large repos (https://gitlab.com/gitlab-org/gitlab-ce/issues/232). After talking with the dev, he seems to have set ideas about STL.

Seems lately a lot of people have differing ideas about wxWidgets/compile flags.

Actually, these are not my choices....this isn't my fight. I don't represent nor speak for this project.
Do the developers of CB want to have a conflict with wxGTK package on Linux distributions because poedit got there first?
Your call.
« Last Edit: May 05, 2014, 12:56:03 am by digifuzzy »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Linux build - Tools Node Regression?
« Reply #20 on: May 04, 2014, 09:42:30 pm »
As far as I know poedit is on all major distros.
I build packages of C::B for CentOS 5 + 6, Fedora 18 - 21 and Debian stable and unstable and I do not have any issues there.
So I think poedit can either be linked against wxWidgets without "--use-stl" as it is or it is patched to build this way. It might (of course) also be a wx3.0 problem with poedit.
But C::B builds fine with wx3.0 (and wxtrunk) without "--use-stl", it builds even again wx3.1 with gtk3 (with some patches), but it looks really ugly and is not stable.

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #21 on: May 04, 2014, 09:48:54 pm »
it builds even again wx3.1 with gtk3 (with some patches), but it looks really ugly and is not stable.
I also got deprecated messages during the build. The change I was looking at doing was #75565 from wxWidgets (font/brush/and other constants are changed from int to a typed value). But that's in 3.1 as Tim has pointed out.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Linux build - Tools Node Regression?
« Reply #22 on: May 04, 2014, 10:14:50 pm »
As I said, C::B builds fine with wxtrunk (which is wx3.1).
I know there are a lot of deprectation warnings, I have fixed almost all of them in my working copy and will commit the fixes as soon as possible.
If I forget it, you can remember me to do it.
There is some private (family) stuff that takes a lot of my power the last weeks and will do it the next time (nothing I can influence).

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Linux build - Tools Node Regression?
« Reply #23 on: May 04, 2014, 11:16:28 pm »
As I said, C::B builds fine with wxtrunk (which is wx3.1).
I know there are a lot of deprectation warnings, I have fixed almost all of them in my working copy and will commit the fixes as soon as possible.
If I forget it, you can remember me to do it.
There is some private (family) stuff that takes a lot of my power the last weeks and will do it the next time (nothing I can influence).

Here...let me help...
Attached is all the warnings/deprecations I got from gcc48 build.
Should note: there is a warning message (starting line 117 ) for ExpressionExecutor.cpp and ExpressionTestCases.cpp
Code
ExpressionExecutor.cpp:119:32: note: the ABI of passing union with long double has changed in GCC 4.4
     Value Executor::GetResult( )
                                ^

And the deprecation warnings stem from...
Just deprecate but don't schedule for removal wxNORMAL and friends.

Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

I don't know if can help you more than that, Jens.

[attachment deleted by admin]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #24 on: May 05, 2014, 02:25:01 am »

Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)

some hint where? At the moment i don't have the resources to compile wx again...

It was months ago, IIRC it was in the script binding section.

I do NOT really have the harddisk space to compile wxWidgets right now either.
Next time I try I will try to post the errors.
Edit: trying to compile it now; I hope to get the error before the data/build disk is full.
Edit2: Made to sdk before error happened.

Tim S.

Several SDK issues when wxWidgets uses STL.
wxSafeConvertWX2MB function has compiler errors.
Code
In file included from E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp:42:0:
include/loggers.h: In member function 'virtual void StdoutLogger::Append(const wxString&, Logger::level)':
include/loggers.h:34:37: error: cannot convert 'const wxString' to 'const wchar_t*' for argument '1' to 'wxCharBuffer wxSafeConvertWX2MB(const wchar_t*)'
         fputs(wxSafeConvertWX2MB(msg), lv < error ? stdout : stderr);

Manager::Get()->GetLogManager()->DebugLog has compiler errors
Code
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp: In member function 'void cbDebuggerPlugin::SwitchToDebuggingLayout()':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp:605:109: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' for argument '1' to 'wxString F(const wxChar*, ...)'
     Manager::Get()->GetLogManager()->DebugLog(F(_("Switching layout to \"%s\""), switchEvent.layout.wx_str()));
Manager::Get()->GetLogManager()->Log has compiler errors
Code
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\editorcolourset.cpp: In member function 'void EditorColourSet::LoadAvailableSets()':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\editorcolourset.cpp:116:96: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' for argument '1' to 'wxString F(const wxChar*, ...)'
         Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));

wxString function Index does not exist take a look at the Find function might be the correct replacement.
Code
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\macrosmanager.cpp: In member function 'void MacrosManager::ReplaceMacros(wxString&, ProjectBuildTarget*, bool)':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\macrosmanager.cpp:500:46: error: no matching function for call to 'wxString::Index(const wxString&)'
     while ((index = buffer.Index(toNativePath)) != wxNOT_FOUND)

wxString function CompareTo does not take a look at the Cmp function might be the correct replacement.
Code
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\pluginsconfigurationdlg.cpp: In function 'int sortByTitle(wxIntPtr, wxIntPtr, wxIntPtr)':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\pluginsconfigurationdlg.cpp:47:57: error: no matching function for call to 'wxString::CompareTo(const wxString&) const'
     return elem1->info.title.CompareTo(elem2->info.title);

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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Linux build - Tools Node Regression?
« Reply #25 on: May 06, 2014, 04:26:42 pm »
@digifuzzy: Why don't you install wxGTK 2.8 and use this for running C::B, I know about several problems with wx3.0 that have not yet been fixed (crashes, usability problems, etc).

I'm trying to build wx-trunk with STL, but it seems to fail...
(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 #26 on: May 08, 2014, 10:54:41 am »
I think, I've fixed almost all stl and wx31 build problems.
wxSmith still doesn't build, but I don't have time to fix it at the moment (it requires some major changes to the enums as far as I can tell).

The fixes could be found in the builds/wx31 branch in my repo on github.

https://github.com/obfuscated/codeblocks_sf/tree/builds/wx31

Please test and report if there are any problems. I've tested only on Linux with wx2.8, wx3.0 and wxtrunk. Only wxtrunk is compiled with stl support. I don't know about the others.
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #27 on: May 09, 2014, 03:25:46 am »
I think, I've fixed almost all stl and wx31 build problems.
wxSmith still doesn't build, but I don't have time to fix it at the moment (it requires some major changes to the enums as far as I can tell).

The fixes could be found in the builds/wx31 branch in my repo on github.

https://github.com/obfuscated/codeblocks_sf/tree/builds/wx31

Please test and report if there are any problems. I've tested only on Linux with wx2.8, wx3.0 and wxtrunk. Only wxtrunk is compiled with stl support. I don't know about the others.

Built against wxWidgets 3.0 branch on Windows 7 32 bit.
No idea if these two changes are correct; I am really a C programmer NOT a C++ programmer.
Code
diff --git a/src/plugins/contrib/help_plugin/help_plugin.cpp b/src/plugins/contrib/help_plugin/help_plugin.cpp
index f633783..d18cbcb 100644
--- a/src/plugins/contrib/help_plugin/help_plugin.cpp
+++ b/src/plugins/contrib/help_plugin/help_plugin.cpp
@@ -137,7 +137,7 @@ namespace
       #if defined(_WIN64) | defined(WIN64)
       fp_htmlHelp(0L, (const wxChar*)m_filename, cbHH_KEYWORD_LOOKUP, (DWORDLONG)&link);
       #else
-      fp_htmlHelp(0L, (const wxChar*)m_filename, cbHH_KEYWORD_LOOKUP, (DWORD)&link);
+      fp_htmlHelp(0L, std::wstring(m_filename).c_str(), cbHH_KEYWORD_LOOKUP, (DWORD)&link);
       #endif
     }
     else // do it the wx way then (which is the same thing, except for the 0L in the call to fp_htmlHelp)
diff --git a/src/sdk/filemanager.cpp b/src/sdk/filemanager.cpp
index 85579b5..f9df312 100644
--- a/src/sdk/filemanager.cpp
+++ b/src/sdk/filemanager.cpp
@@ -185,7 +185,7 @@ namespace platform
  inline bool move(wxString const& old_name, wxString const& new_name)
  {
  // hopefully I got the unintellegible conversion stuff correct... at least it seems to work...
- return ::MoveFileEx(wxFNCONV(old_name), wxFNCONV(new_name), MOVEFILE_REPLACE_EXISTING);
+ return ::MoveFileEx(std::wstring(old_name).c_str(), std::wstring(new_name).c_str(), MOVEFILE_REPLACE_EXISTING);
  }
 #else
  inline bool move(wxString const& old_name, wxString const& new_name)

I built it and CB ran and exited without error or warning no other testing done on the binary.

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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Linux build - Tools Node Regression?
« Reply #28 on: May 09, 2014, 08:00:08 am »
Does this still build with wx2.8 and do the correct thing?
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Linux build - Tools Node Regression?
« Reply #29 on: May 09, 2014, 03:10:49 pm »
Does this still build with wx2.8 and do the correct thing?

I still have to test that.
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