[MacPorts] #40386: codeblocks: allow compilation with clang
#40386: codeblocks: allow compilation with clang ---------------------+------------------------ Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: codeblocks ---------------------+------------------------ I opened this ticket to collect issues related to compile errors with clang in Code::Blocks. The goal is to find patches to allow compilation and to submit them upstream. -- Ticket URL: <https://trac.macports.org/ticket/40386> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): The first patch (`patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff`) comes from upstream (it's already included in SVN) and is needed to fix the first compile error. -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): Next compile error is: {{{ /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/wxGTK/2.8/lib/wx/include/gtk2 -unicode-release-2.8 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I./../wxContribItems/wxFlatNotebook/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/sqplus -I../../../../src/include/scripting/squirrel -I../../../../src/include/scripting/bindings -I../../../../src/include/mozilla_chardet -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT projectmissinglibs.lo -MD -MP -MF .deps/projectmissinglibs.Tpo -c -o projectmissinglibs.lo projectmissinglibs.cpp libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/lib/wx/include/gtk2 -unicode-release-2.8 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I./../wxContribItems/wxFlatNotebook/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/sqplus -I../../../../src/include/scripting/squirrel -I../../../../src/include/scripting/bindings -I../../../../src/include/mozilla_chardet -I/opt/local/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -pipe -Os -arch x86_64 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT projectmissinglibs.lo -MD -MP -MF .deps/projectmissinglibs.Tpo -c projectmissinglibs.cpp -fno-common -DPIC -o .libs/projectmissinglibs.o librariesdlg.cpp:93:7: error: array initializer must be an initializer list , m_WorkingCopy(knownLibraries) ^ 1 error generated. }}} I'm not sure how to fix that one, but a quick workaround is to disable the `libfinder` plugin. {{{ configure.args "--with-contrib-plugins=all,-FileManager,-libfinder" }}} In case that anyone has any idea, here are some possibly relevant blocks from the code: {{{ enum LibraryResultType { rtDetected = 0, ///< \brief Cnofiguration detected by lib_finder rtPredefined, ///< \brief Predefined configuration rtPkgConfig, ///< \brief Library provided by pkg-config /////// rtCount, ///< \brief Here will be the number of result types rtUnknown = -1 ///< \brief Used for unknown result types }; class ResultMap { ... } typedef ResultMap TypedResults[rtCount]; class LibrariesDlg: public wxScrollingDialog { ... private: TypedResults& m_KnownLibraries; TypedResults m_WorkingCopy; ... } LibrariesDlg::LibrariesDlg(wxWindow* parent, TypedResults& knownLibraries) : m_KnownLibraries(knownLibraries) , m_WorkingCopy(knownLibraries) , m_SelectedConfig(0) , m_WhileUpdating(false) { ... } }}} -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): Next error: {{{ libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/lib/wx/include/gtk2 -unicode-release-2.8 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -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 cbprofilerconfig.lo -MD -MP -MF .deps/cbprofilerconfig.Tpo -c cbprofilerconfig.cpp -fno-common -DPIC -o .libs/cbprofilerconfig.o cbprofiler.cpp:104:25: error: variable length array of non-POD element type 'wxString' wxString choices[project->GetBuildTargetsCount()]; ^ 1 error generated. make[5]: *** [cbprofiler.lo] Error 1 }}} most probably requires a similar patch as the first one. -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): I'm currently testing the patch for `librariesdlg.cpp` which was sent to the mailing list earlier today, but excluding `libfinder` led to a successful compilation after the other two patches have been applied. -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): Here's the list of upstream reports: * [http://developer.berlios.de/patch/?func=detailpatch&patch_id=3496&group_id=5... avoid clang compilation error in profiler] for `src/plugins/contrib/profiler/cbprofiler.cpp` * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19110&group_id=5358 ld: unknown option: --no-undefined] only a problem is SVN trunk * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19111&group_id=5358 m_WorkingCopy: array initializer must be an initializer list] without the patch for `librariesdlg.cpp` * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19113&group_id=5358 missing #include <string> in CallTip.h] only a problem in SVN * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19114&group_id=5358 _rpl_malloc: Undefined symbols for architecture x86_64] only a problem in SVN * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19115&group_id=5358 MouseSap's Makefile isn't including GTK libs] a patch for `src/plugins/contrib/MouseSap/Makefile.am` (maybe it should be moved to patches?) * [http://developer.berlios.de/bugs/?func=detailbug&bug_id=19116&group_id=5358 source_exporter might need to link against fontconfig] patch for `src/plugins/contrib/source_exporter/Makefile.am` The following patches haven't been reported/submitted yet: * `patch-Makefile.diff` - I don't know what it does and why it is needed * `patch-sdk-configmanager.cpp` - I don't know what it does and why it is needed * `patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff` - not tested yet, but reported (see above) -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+------------------- Reporter: mojca@… | Owner: afb@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+------------------- Comment (by mojca@…): Fixed in r110757, r110758, but I would like to leave this ticket open until all the patches are at least reported upstream (even if not fixed yet). I would like to ask for some help with that (in particular with understanding the patches). -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+--------------------- Reporter: mojca@… | Owner: mojca@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: codeblocks | -------------------------+--------------------- Changes (by mojca@…): * owner: afb@… => mojca@… -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#40386: codeblocks: allow compilation with clang -------------------------+--------------------- Reporter: mojca@… | Owner: mojca@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: codeblocks | -------------------------+--------------------- Changes (by mojca@…): * status: new => closed * resolution: => fixed Comment: All patches but `patch-Makefile.diff` have been reported upstream. I'm not sure when this issues will get fixed upstream, but I'm closing this ticket now. -- Ticket URL: <https://trac.macports.org/ticket/40386#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts