Opened 11 years ago

Closed 7 years ago

#40390 closed defect (fixed)

codeblocks: fix compatibility with wxWidgets 2.9/3.0

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), afb@…, tsitelov (Dmitry Tsitelov)
Port: codeblocks

Description

This ticket should serve the collection of compile errors and patches needed to make Code::Blocks compile against wxWidgets 2.9/3.0.

Attachments (5)

patch-wxWidgets29-compatibility.diff (7.2 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some patches for compatibility of Code::Blocks with wxWidgets 2.9
patch-wxWidgets30-compatibility-core.diff (2.0 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some patches for compatibility of Code::Blocks core with wxWidgets 2.9
patch-wxWidgets30-compatibility-plugins-codesnippets.diff (2.6 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some patches for compatibility of Code::Blocks plugin codesnippets with wxWidgets 2.9
patch-wxWidgets30-compatibility-plugins-wxcontrib.diff (1.2 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some patches for compatibility of Code::Blocks plugin wxcontrib with wxWidgets 2.9
codeblocks.log (360.5 KB) - added by mojca (Mojca Miklavec) 11 years ago.
log file from a failed compilation; src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:18:26: error: variable has incomplete type 'class WXDLLIMPEXP_PG_FWD'

Download all attachments as: .zip

Change History (28)

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 11 years ago by afb@…

Owner: afb@… deleted

This sounds like an upstream development effort, rather than just porting. And it doesn't even say what the issues are.

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: afb@… added

Yes, it would be nice if the upstream would fix the issues, but they might do it faster if they get patches. Or at least that is an optimistic point of view. Citing http://developer.berlios.de/bugs/?func=detailbug&bug_id=19113&group_id=5358:

I see you send a lot of bug report about C::B on Mac, but as far as I know, we don't have a C::B developer working on Mac OS, so I'm not sure these bug will be fixed soon.

I know that the ticket doesn't list the issues (yet), but reproducing them is trivial. Just compile against wxWidgets 2.9.

I have a bunch of patches already, but they are not complete yet (I spent a few hours compiling/fixing compile error/compiling again/fixing another error/...), but I suspect it would be easier if I would disable all the modules to start with.

What I had in mind was a ticket similar to #40386 where problems/patches could be collected one-by-one (if necessary).

Changed 11 years ago by mojca (Mojca Miklavec)

some patches for compatibility of Code::Blocks with wxWidgets 2.9

comment:4 Changed 11 years ago by mojca (Mojca Miklavec)

I attached a bunch of patches now, but from what I remember from my last experiments that wasn't sufficient, at least not when compiling with all the modules included. I'll take a look again when I have time unless someone else wants to play with this.

comment:5 Changed 11 years ago by mojca (Mojca Miklavec)

Owner: set to mojca@…

Changed 11 years ago by mojca (Mojca Miklavec)

some patches for compatibility of Code::Blocks core with wxWidgets 2.9

Changed 11 years ago by mojca (Mojca Miklavec)

some patches for compatibility of Code::Blocks plugin codesnippets with wxWidgets 2.9

Changed 11 years ago by mojca (Mojca Miklavec)

some patches for compatibility of Code::Blocks plugin wxcontrib with wxWidgets 2.9

comment:6 Changed 11 years ago by mojca (Mojca Miklavec)

I submitted three patch files. From that point on I'll report the errors here.

First one from wxContribItems:

/bin/sh ../../../../../libtool  --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -I./include  -I/opt/local/include -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT treelistctrl.lo -MD -MP -MF .deps/treelistctrl.Tpo -c -o treelistctrl.lo `test -f './src/treelistctrl.cpp' || echo './'`./src/treelistctrl.cpp
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I./include -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT treelistctrl.lo -MD -MP -MF .deps/treelistctrl.Tpo -c ./src/treelistctrl.cpp  -fno-common -DPIC -o .libs/treelistctrl.o
./src/treelistctrl.cpp:52:10: fatal error: 'wx/mac/private.h' file not found
#include "wx/mac/private.h"
         ^
1 error generated.

Solution:

--- src/plugins/contrib/wxContribItems/wxTreeList/src/treelistctrl.cpp.orig
+++ src/plugins/contrib/wxContribItems/wxTreeList/src/treelistctrl.cpp
@@ -49,8 +49,12 @@
 #include <wx/hashmap.h>
 
 #ifdef __WXMAC__
+#if wxCHECK_VERSION(2,9,0)
+#include "wx/osx/private.h"
+#else
 #include "wx/mac/private.h"
 #endif
+#endif
 
 #include "wx/treelistctrl.h"
 

comment:7 Changed 11 years ago by mojca (Mojca Miklavec)

Then one in NassiShneiderman:

/bin/sh ../../../../libtool --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -I../../../../src/include -I../../../../src/sdk/wxscintilla/include  -I/opt/local/include -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT NassiView.lo -MD -MP -MF .deps/NassiView.Tpo -c -o NassiView.lo NassiView.cpp
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT NassiView.lo -MD -MP -MF .deps/NassiView.Tpo -c NassiView.cpp  -fno-common -DPIC -o .libs/NassiView.o
NassiView.cpp:1062:22: error: no matching constructor for initialization of 'wxDropSource'
        wxDropSource dndSource(m_diagramwindow, copycursor, movecursor, nonecursor);
                     ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/osx/dnd.h:78:5: note: candidate constructor not viable: no known conversion from 'wxIcon' to
      'const wxCursor' for 2nd argument
    wxDropSource( wxWindow *win = NULL,
    ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/osx/dnd.h:84:5: note: candidate constructor not viable: no known conversion from
      'NassiDiagramWindow *' to 'wxDataObject &' for 1st argument
    wxDropSource( wxDataObject& data,
    ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/osx/dnd.h:71:24: note: candidate constructor (the implicit copy constructor) not viable: requires 1
      argument, but 4 were provided
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
                       ^
1 error generated.
make[4]: *** [NassiView.lo] Error 1

I'm not exactly sure what the proper patch should be, but this allowed me to proceed with compilation:

--- src/plugins/contrib/NassiShneiderman/NassiView.cpp.orig
+++ src/plugins/contrib/NassiShneiderman/NassiView.cpp
@@ -1048,15 +1048,9 @@ void NassiView::DragStart()
 
     if ( dataptr )
     {
-        #if defined(__WXMSW__)
             wxCursor copycursor(dnd_copy_cur_xpm);
             wxCursor movecursor(dnd_move_cur_xpm);
             wxCursor nonecursor(dnd_none_cur_xpm);
-        #else
-            wxIcon copycursor(dnd_copy_cur_xpm);
-            wxIcon movecursor(dnd_move_cur_xpm);
-            wxIcon nonecursor(dnd_none_cur_xpm);
-        #endif
         //wxDragResult result;
 
         wxDropSource dndSource(m_diagramwindow, copycursor, movecursor, nonecursor);

I would be grateful for any hints about a proper solution to report upstream.

comment:8 Changed 11 years ago by mojca (Mojca Miklavec)

Next comes the exporter plugin:

libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include -DwxPDF_USE_WXMODULE=0 -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT libwxPdfDocument_la-pdfdc.lo -MD -MP -MF .deps/libwxPdfDocument_la-pdfdc.Tpo -c src/pdfdc.cpp  -fno-common -DPIC -o .libs/libwxPdfDocument_la-pdfdc.o
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:30:14: error: allocating an object of abstract class type 'wxPdfDCImpl'
  : wxDC(new wxPdfDCImpl(this))
             ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:609:18: note: unimplemented pure virtual method 'DoDrawLines' in 'wxPdfDCImpl'
    virtual void DoDrawLines(int n, const wxPoint points[],
                 ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:614:18: note: unimplemented pure virtual method 'DoDrawPolygon' in 'wxPdfDCImpl'
    virtual void DoDrawPolygon(int n, const wxPoint points[],
                 ^
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:35:14: error: allocating an object of abstract class type 'wxPdfDCImpl'
  : wxDC(new wxPdfDCImpl(this, printData))
             ^
src/pdfdc29.inc:40:14: error: allocating an object of abstract class type 'wxPdfDCImpl'
  : wxDC(new wxPdfDCImpl(this, pdfDocument, templateWidth, templateHeight))
             ^
3 errors generated.
make[5]: *** [libwxPdfDocument_la-pdfdc.lo] Error 1

The (partial cure) seems to be the following:

--- src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h
@@ -162,9 +162,9 @@ protected:
   virtual void DoGetSize(int* width, int* height) const;
   virtual void DoGetSizeMM(int* width, int* height) const;
 
-  virtual void DoDrawLines(int n, wxPoint points[],
+  virtual void DoDrawLines(int n, const wxPoint points[],
                            wxCoord xoffset, wxCoord yoffset);
-  virtual void DoDrawPolygon(int n, wxPoint points[],
+  virtual void DoDrawPolygon(int n, const wxPoint points[],
                              wxCoord xoffset, wxCoord yoffset,
                              wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
   virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
@@ -1032,7 +1032,7 @@ wxPdfDCImpl::DoGetSizeMM(int* width, int* height) const
 }
 
 void
-wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
+wxPdfDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset)
 {
   wxCHECK_RET(m_pdfDocument, wxT("Invalid PDF DC"));
   SetupPen();
@@ -1056,7 +1056,7 @@ wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs
 }
 
 void
-wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
+wxPdfDCImpl::DoDrawPolygon(int n, const wxPoint points[],
                            wxCoord xoffset, wxCoord yoffset,
                            wxPolygonFillMode fillStyle /* = wxODDEVEN_RULE*/)
 {

See http://forums.wxwidgets.org/viewtopic.php?t=37517&p=152780. The real patch needs to take into account that the change apparently happened at version 2.9.5, so that it will work with any version of wxWidgets.

comment:9 Changed 11 years ago by mojca (Mojca Miklavec)

Related error:

libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include -DwxPDF_USE_WXMODULE=0 -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT libwxPdfDocument_la-pdfdc.lo -MD -MP -MF .deps/libwxPdfDocument_la-pdfdc.Tpo -c src/pdfdc.cpp  -fno-common -DPIC -o .libs/libwxPdfDocument_la-pdfdc.o
In file included from src/pdfdc.cpp:26:
src/pdfdc29.inc:1042:14: error: binding of reference to type 'wxPoint' to a value of type 'const wxPoint' drops qualifiers
    wxPoint& point = points[i];
             ^       ~~~~~~~~~
src/pdfdc29.inc:1071:14: error: binding of reference to type 'wxPoint' to a value of type 'const wxPoint' drops qualifiers
    wxPoint& point = points[i];
             ^       ~~~~~~~~~
2 errors generated.
make[5]: *** [libwxPdfDocument_la-pdfdc.lo] Error 1

This turns the previous patch into:

--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
@@ -1032,14 +1032,14 @@ wxPdfDCImpl::DoGetSizeMM(int* width, int* height) const
 }
 
 void
-wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
+wxPdfDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset)
 {
   wxCHECK_RET(m_pdfDocument, wxT("Invalid PDF DC"));
   SetupPen();
   int i;
   for (i = 0; i < n; ++i)
   {
-    wxPoint& point = points[i];
+    const wxPoint& point = points[i];
     double xx = ScaleLogicalToPdfX(xoffset + point.x);
     double yy = ScaleLogicalToPdfY(yoffset + point.y);
     CalcBoundingBox(point.x+xoffset, point.y+yoffset);
@@ -1056,7 +1056,7 @@ wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs
 }
 
 void
-wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
+wxPdfDCImpl::DoDrawPolygon(int n, const wxPoint points[],
                            wxCoord xoffset, wxCoord yoffset,
                            wxPolygonFillMode fillStyle /* = wxODDEVEN_RULE*/)
 {
@@ -1068,7 +1068,7 @@ wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
   int i;
   for (i = 0; i < n; ++i)
   {
-    wxPoint& point = points[i];
+    const wxPoint& point = points[i];
     xp.Add(ScaleLogicalToPdfX(xoffset + point.x));
     yp.Add(ScaleLogicalToPdfY(yoffset + point.y));
     CalcBoundingBox(point.x + xoffset, point.y + yoffset);

comment:10 Changed 11 years ago by mojca (Mojca Miklavec)

Next related error:

libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib/wx/include/osx_cocoa-unicode-2.9 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include -DwxPDF_USE_WXMODULE=0 -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT libwxPdfDocument_la-pdfprint.lo -MD -MP -MF .deps/libwxPdfDocument_la-pdfprint.Tpo -c src/pdfprint.cpp  -fno-common -DPIC -o .libs/libwxPdfDocument_la-pdfprint.o
In file included from src/pdfprint.cpp:59:
../../../../../src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfprint.h:904:16: error: allocating an object of abstract class type 'wxPdfPreviewDCImpl'
    : wxDC(new wxPdfPreviewDCImpl(this, *dc.GetImpl(), pdfdc)) { }
               ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:609:18: note: unimplemented pure virtual method 'DoDrawLines' in 'wxPdfPreviewDCImpl'
    virtual void DoDrawLines(int n, const wxPoint points[],
                 ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/include/wx-2.9/wx/dc.h:614:18: note: unimplemented pure virtual method 'DoDrawPolygon' in 'wxPdfPreviewDCImpl'
    virtual void DoDrawPolygon(int n, const wxPoint points[],
                 ^
1 error generated.
make[5]: *** [libwxPdfDocument_la-pdfprint.lo] Error 1

and the patch:

--- src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfprint.h.orig
+++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfprint.h
@@ -867,14 +867,14 @@ public:
     return rval;
   }
 
-  virtual void DoDrawLines(int n, wxPoint points[],
+  virtual void DoDrawLines(int n, const wxPoint points[],
                            wxCoord xoffset, wxCoord yoffset)
   {
     m_dc.DoDrawLines(n, points,xoffset, yoffset);
     UpdateBoundingBox();
   }
 
-  virtual void DoDrawPolygon(int n, wxPoint points[],
+  virtual void DoDrawPolygon(int n, const wxPoint points[],
                              wxCoord xoffset, wxCoord yoffset,
                              wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
   {

comment:11 Changed 11 years ago by mojca (Mojca Miklavec)

The spellchecker plugin fails with the same error that has been bugging me with +wxwidgets28 on 10.6 (see #40389):

libtool: link: /usr/bin/clang++  -o .libs/libSpellChecker.so -bundle  .libs/DictionariesNeededDialog.o .libs/MySpellingDialog.o .libs/OnlineSpellChecker.o .libs/SpellCheckHelper.o .libs/SpellCheckSettingsPanel.o .libs/SpellCheckerConfig.o .libs/SpellCheckerPlugin.o .libs/StatusField.o .libs/Thesaurus.o .libs/ThesaurusDialog.o .libs/mythes.o .libs/wxThes.o   -Wl,-force_load,wxspellchecker/.libs/libwxSpellChecker.a  -L/opt/local/lib -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/2.9/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL ../../../sdk/.libs/libcodeblocks.dylib -lwx_osx_cocoau_aui-2.9 -lwx_osx_cocoau_propgrid-2.9 -lwx_osx_cocoau_richtext-2.9 -lwx_osx_cocoau_xrc-2.9 -lwx_osx_cocoau_webview-2.9 -lwx_osx_cocoau_html-2.9 -lwx_osx_cocoau_qa-2.9 -lwx_osx_cocoau_adv-2.9 -lwx_osx_cocoau_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9 -lpthread -ldl  -O2 -Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL
Undefined symbols for architecture x86_64:
  "Hunspell::get_dic_encoding()", referenced from:
      HunspellInterface::GetCharacterEncoding() in libwxSpellChecker.a(HunspellInterface.o)
  "Hunspell::spell(char const*, int*, char**)", referenced from:
      HunspellInterface::IsWordInDictionary(wxString const&) in libwxSpellChecker.a(HunspellInterface.o)
  "Hunspell::suggest(char***, char const*)", referenced from:
      HunspellInterface::GetSuggestions(wxString const&) in libwxSpellChecker.a(HunspellInterface.o)
  "Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
      HunspellInterface::InitializeSpellCheckEngine() in libwxSpellChecker.a(HunspellInterface.o)
  "Hunspell::~Hunspell()", referenced from:
      HunspellInterface::UninitializeSpellCheckEngine() in libwxSpellChecker.a(HunspellInterface.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [libSpellChecker.la] Error 1

I believe that I need some help solving this one, so I will disable the plugin for a moment and try to continue with other issues.

comment:12 Changed 11 years ago by mojca (Mojca Miklavec)

Actually, the compile command works if I manually add /opt/local/lib/libhunspell-1.3.0.dylib at the end of the command or if I added the following to the Makefile, but I'm not sure about the proper patch:

--- src/plugins/contrib/SpellChecker/Makefile.orig
+++ src/plugins/contrib/SpellChecker/Makefile
@@ -223,7 +223,7 @@ BUILD_WXSMITHCONTRIB =
 CB_GAMIN_CFLAGS = 
 CB_GAMIN_LIBS = 
 CB_HUNSPELL_CFLAGS = 
-CB_HUNSPELL_LIBS = 
+CB_HUNSPELL_LIBS = -lhunspell-1.3.0
 CC = /usr/bin/clang
 CCDEPMODE = depmode=gcc3
 CFLAGS = -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64

comment:13 Changed 11 years ago by mojca (Mojca Miklavec)

In the meantime I tried to compile Code::Blocks without any plugin. While starting it the following Debug Alert is shown:

../src/osx/carbon/region.cpp(1017): assert "m_refData" failed in DoOffset(): invalid wxRegion

Call stack:
[00] wxRegionBase::Offset(int, int)          
[01] wxWidgetCocoaImpl::drawRect(void*, NSView*, void*) 
[02] wxOSX_drawRect(NSView*, objc_selector*, CGRect) 
[03] -[NSView _drawRect:clip:]               
[04] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[05] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[06] -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[07] -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[08] -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 
[09] -[NSView displayIfNeeded]               
[10] -[NSNextStepFrame displayIfNeeded]      
[11] -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[12] -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[13] -[NSWindow orderWindow:relativeTo:]     
[14] -[NSWindow makeKeyAndOrderFront:]       
[15] wxNonOwnedWindowCocoaImpl::Show(bool)   
[16] wxNonOwnedWindow::Show(bool)            
[17] cbSplashScreen::cbSplashScreen(wxBitmap&, long, wxWindow*, int, long) 
[18] CodeBlocksApp::OnInit()                 
[19] wxApp::CallOnInit()                     
[20] wxEntry(int&, wchar_t**)                
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.

comment:14 Changed 11 years ago by mojca (Mojca Miklavec)

Actually, the patches listed above are sufficient to build Code::Blocks with all the plugins other than FileManager.

I see that I disabled NassiShneiderman in the wxwidgets28 variant and I suspect there is a high probability that the patch above would also make that particular plugin work with wxWidgets 2.8.

The plugin for spellchecker is also likely the same for both wxwidgets28 and wxwidgets30.

Despite the debug alert shown above the program seems to work fine, at least the basic functionality seems to be there.

comment:15 Changed 11 years ago by mojca (Mojca Miklavec)

Committed in r111716.

A proper patch for Hunspell, finishing upstream reports and some additional testing might be in place before closing the ticket.

comment:16 Changed 11 years ago by mojca (Mojca Miklavec)

There seem to be some upstream patches in the trunk. It might be worth looking at least into commits 9362 and 9363.

See http://forums.codeblocks.org/index.php/topic,18278.0.html

comment:17 Changed 11 years ago by mojca (Mojca Miklavec)

For future reference: Code::Blocks now seems to be compatible with wxWidgets 2.9. Most patches for compatibility with wx2.9 for Mac have already been applied upstream. The trunk version also contains a bunch of fixes (mentioned above) that haven't been back-ported here yet.

But I believe that the next release could safely depend on wxWidgets-3.0 only (dropping the variants).

The summary of remaining issues is here: http://forums.codeblocks.org/index.php/topic,18394.0.html

Changed 11 years ago by mojca (Mojca Miklavec)

Attachment: codeblocks.log added

log file from a failed compilation; src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:18:26: error: variable has incomplete type 'class WXDLLIMPEXP_PG_FWD'

comment:18 Changed 11 years ago by mojca (Mojca Miklavec)

I attached a new issue with compilation. Curiously it didn't happen before. I upgraded wxWidgets in the meantime, but I don't know if that was the problem or not as it doesn't seem strictly related.

comment:19 Changed 10 years ago by mojca (Mojca Miklavec)

Upgrade to 13.12 committed in r118548. There are still a number of issues. Among others:

../src/osx/carbon/region.cpp(1016): assert "m_refData" failed in DoOffset(): invalid wxRegion

Call stack:
[00] wxWidgetCocoaImpl::drawRect(void*, NSView*, void*) 
[01] wxOSX_drawRect(NSView*, objc_selector*, CGRect) 
[02] -[NSView _drawRect:clip:]               
[03] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[04] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[05] -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[06] -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[07] -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 
[08] -[NSView displayIfNeeded]               
[09] -[NSNextStepFrame displayIfNeeded]      
[10] -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[11] -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[12] -[NSWindow orderWindow:relativeTo:]     
[13] -[NSWindow makeKeyAndOrderFront:]       
[14] wxNonOwnedWindowCocoaImpl::Show(bool)   
[15] wxNonOwnedWindow::Show(bool)            
[16] cbSplashScreen::cbSplashScreen(wxBitmap&, long, wxWindow*, int, long) 
[17] CodeBlocksApp::OnInit()                 
[18] wxApp::CallOnInit()                     
[19] wxEntry(int&, wchar_t**)                
[20] main                                    
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.
../src/osx/carbon/region.cpp(1048): assert "region.IsOk()" failed in DoCombine(): invalid wxRegion

Call stack:
[00] wxRegionWithCombine::DoIntersect(wxRegion const&) 
[01] wxWidgetCocoaImpl::drawRect(void*, NSView*, void*) 
[02] wxOSX_drawRect(NSView*, objc_selector*, CGRect) 
[03] -[NSView _drawRect:clip:]               
[04] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[05] -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 
[06] -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[07] -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 
[08] -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 
[09] -[NSView displayIfNeeded]               
[10] -[NSNextStepFrame displayIfNeeded]      
[11] -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[12] -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 
[13] -[NSWindow orderWindow:relativeTo:]     
[14] -[NSWindow makeKeyAndOrderFront:]       
[15] wxNonOwnedWindowCocoaImpl::Show(bool)   
[16] wxNonOwnedWindow::Show(bool)            
[17] cbSplashScreen::cbSplashScreen(wxBitmap&, long, wxWindow*, int, long) 
[18] CodeBlocksApp::OnInit()                 
[19] wxApp::CallOnInit()                     
[20] wxEntry(int&, wchar_t**)                
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.

comment:20 Changed 9 years ago by mojca (Mojca Miklavec)

I committed r135776 with the latest SVN version which removed the need for many of the patches. Switching to SVN should be just a temporary measure until a newer version gets released.

comment:21 Changed 9 years ago by mojca (Mojca Miklavec)

One particular issue with wxgtk-3.0 that has to be reported upstream to wxWidgets developers:

:info:build In file included from src/treelistctrl.cpp:46:
:info:build In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/include/wx-3.0/wx/apptrait.h:176:
:info:build In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/include/wx-3.0/wx/unix/apptbase.h:15:
:info:build /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/include/wx-3.0/wx/evtloopsrc.h:97:14: fatal error: 'wx/osx/evtloopsrc.h' file not found
:info:build     #include "wx/osx/evtloopsrc.h"
:info:build              ^
:info:build 1 error generated.

comment:22 Changed 9 years ago by tsitelov (Dmitry Tsitelov)

Cc: cit@… added

Cc Me!

comment:23 Changed 7 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

In 788db542d18dbb325925b2428837ce0b4b985dee/macports-ports:

codeblocks: Fix building up to Sierra

  • Update to svn revision 11098.
  • Remove no longer needed patch files.

Fixes: #40390
Fixes: #43214
Fixes: #54390

Note: See TracTickets for help on using tickets.