Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Compilation issues due to wxMEDIACTRLPLAYERCONTROLS_* in r6414

(1/5) > >>

Mephistopheles:
Hi guys,

as you might know or not I've been providing codeblocks packages for Fedora, Mandriva and openSUSE since some while but the latest build (r6414) fails due to some wxMEDIACTRLPLAYERCONTROLS_* issues. It works with Fedora 12 & 13 and openSUSE 11.3+ but the rest is suddenly broken which I don't entirely understand since the wxWidgets version should be enough (2.8.10).

Could you therefore please be so kind to have a look at https://build.opensuse.org/package/show?package=codeblocks&project=devel%3Atools%3Aide and check the build logs?

Also bellow is what our automated code checks currently find in your code, could you also please be so kind to have a look at those as well to ensure there aren't any issues:


--- Quote ---I: A function overflows or underflows an array access. This could be a real error,
   but occasionaly this condition is also misdetected due to loop unrolling or strange pointer
   handling. So this is warning only, please review.
W: codeblocks arraysubscript ../../../../src/include/scripting/sqplus/sqplus.h:326
W: codeblocks arraysubscript ../../../src/include/scripting/sqplus/sqplus.h:326
W: codeblocks arraysubscript ../../src/include/scripting/sqplus/sqplus.h:326

I: Program causes undefined operation
   (likely same variable used twiceand post/pre incremented in the same expression).
   e.g. x = x++; Split it in two operations.
W: codeblocks sequence-point ./../editsnippetframe.cpp:642
W: codeblocks sequence-point cbkeybinder.cpp:406
W: codeblocks sequence-point editsnippetframe.cpp:642

I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: codeblocks strict-aliasing-punning ../../../../src/include/scripting/sqplus/sqplus.h:420, 1801
W: codeblocks strict-aliasing-punning sqcompiler.cpp:654, 700
W: codeblocks strict-aliasing-punning sqstdblob.cpp:160, 168
W: codeblocks strict-aliasing-punning sqvm.cpp:739
W: codeblocks strict-aliasing-punning src/pdfrijndael.cpp:1088, 1096,  1109, 1110, 1111, 1112, 1118, 1119, 1120, 1121, 1182, 1235, 1236, 1237,  1238, 1243, 1244, 1245, 1246, 1251, 1252, 1253, 1254, 1264, 1265, 1266,  1267, 1273, 1274, 1275, 1276, 1345, 1356, 1396, 1407, 1430, 1435, 1443,  1450, 1469, 1471, 1473, 1475, 1484, 1485, 1486, 1487, 1488, 1489, 1490,  1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502,  1503, 1506, 1507, 1508, 1509, 1511, 1512, 1513, 1514, 1515, 1516, 1517,  1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1528, 1529, 1530,  1531, 1548, 1549, 1550, 1551, 1559, 1560, 1561, 1562, 1564, 1565, 1566,  1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578,  1579, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592,  1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1604, 1605, 1606,  1607, 1624, 1625, 1626, 1627
--- End quote ---

Thanks a lot :)

Jenna:
I will look into it.
Thanks for reporting.

killerbot:
on my OpenSuse11.2 64 bit I have the same issue (surprising it works for you in OpenSuse 11.3 64 bit).
These are the compiler errors output :

--- Code: ---/bin/sh ../../../../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../../src/include -I../../../../../../src/sdk/wxscintilla/include -I../../../../../../src/sdk/wxpropgrid/include -DWXMAKINGDLL_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxsmediactrl.lo -MD -MP -MF .deps/wxsmediactrl.Tpo -c -o wxsmediactrl.lo `test -f './wxsmediactrl.cpp' || echo './'`./wxsmediactrl.cpp                                               
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../../src/include -I../../../../../../src/sdk/wxscintilla/include -I../../../../../../src/sdk/wxpropgrid/include -DWXMAKINGDLL_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxsmediactrl.lo -MD -MP -MF .deps/wxsmediactrl.Tpo -c ./wxsmediactrl.cpp  -fPIC -DPIC -o .libs/wxsmediactrl.o                                                                                                                   
./wxsmediactrl.cpp: In constructor ‘wxsMediaCtrl::wxsMediaCtrl(wxsItemResData*)’:                                                             
./wxsmediactrl.cpp:55: error: ‘wxMEDIACTRLPLAYERCONTROLS_DEFAULT’ was not declared in this scope                                             
./wxsmediactrl.cpp: In member function ‘virtual void wxsMediaCtrl::OnBuildCreatingCode()’:                                                   
./wxsmediactrl.cpp:104: error: ‘wxMEDIACTRLPLAYERCONTROLS_NONE’ was not declared in this scope                                               
./wxsmediactrl.cpp:107: error: ‘wxMEDIACTRLPLAYERCONTROLS_STEP’ was not declared in this scope
./wxsmediactrl.cpp:110: error: ‘wxMEDIACTRLPLAYERCONTROLS_VOLUME’ was not declared in this scope
./wxsmediactrl.cpp:113: error: ‘wxMEDIACTRLPLAYERCONTROLS_DEFAULT’ was not declared in this scope
./wxsmediactrl.cpp: In member function ‘virtual wxObject* wxsMediaCtrl::OnBuildPreview(wxWindow*, long int)’:
./wxsmediactrl.cpp:148: error: ‘wxMediaCtrl’ was not declared in this scope
./wxsmediactrl.cpp:148: error: ‘preview’ was not declared in this scope
./wxsmediactrl.cpp:148: error: expected type-specifier before ‘wxMediaCtrl’
./wxsmediactrl.cpp:148: error: expected ‘;’ before ‘wxMediaCtrl’
./wxsmediactrl.cpp:164: error: ‘wxMEDIACTRLPLAYERCONTROLS_NONE’ was not declared in this scope
./wxsmediactrl.cpp:167: error: ‘wxMEDIACTRLPLAYERCONTROLS_STEP’ was not declared in this scope
./wxsmediactrl.cpp:170: error: ‘wxMEDIACTRLPLAYERCONTROLS_VOLUME’ was not declared in this scope
./wxsmediactrl.cpp:173: error: ‘wxMEDIACTRLPLAYERCONTROLS_DEFAULT’ was not declared in this scope
./wxsmediactrl.cpp: In member function ‘virtual void wxsMediaCtrl::OnEnumWidgetProperties(long int)’:
./wxsmediactrl.cpp:196: error: ‘wxMEDIACTRLPLAYERCONTROLS_NONE’ was not declared in this scope
./wxsmediactrl.cpp:197: error: ‘wxMEDIACTRLPLAYERCONTROLS_STEP’ was not declared in this scope
./wxsmediactrl.cpp:198: error: ‘wxMEDIACTRLPLAYERCONTROLS_VOLUME’ was not declared in this scope
./wxsmediactrl.cpp:199: error:

--- End code ---

"wxMEDIACTRLPLAYERCONTROLS_NONE" and others [enum wxMediaCtrlPlayerControls] are declared in wx/mediactrl.h, which is being included.
At first glance the only thing that could prohibit this [looking inside that header file] :

--- Code: ---#if wxUSE_MEDIACTRL

// ----------------------------------------------------------------------------
// Includes
// ----------------------------------------------------------------------------

#include "wx/control.h"
#include "wx/uri.h"

// ============================================================================
// Declarations
// ============================================================================

// ----------------------------------------------------------------------------
//
// Enumerations
//
// ----------------------------------------------------------------------------

enum wxMediaState
{
    wxMEDIASTATE_STOPPED,
    wxMEDIASTATE_PAUSED,
    wxMEDIASTATE_PLAYING
};

enum wxMediaCtrlPlayerControls
{
    wxMEDIACTRLPLAYERCONTROLS_NONE           =   0,
    //Step controls like fastfoward, step one frame etc.
    wxMEDIACTRLPLAYERCONTROLS_STEP           =   1 << 0,
    //Volume controls like the speaker icon, volume slider, etc.
    wxMEDIACTRLPLAYERCONTROLS_VOLUME         =   1 << 1,
    wxMEDIACTRLPLAYERCONTROLS_DEFAULT        =
                    wxMEDIACTRLPLAYERCONTROLS_STEP |
                    wxMEDIACTRLPLAYERCONTROLS_VOLUME
};

...

--- End code ---

is :

--- Code: ---#if wxUSE_MEDIACTRL

--- End code ---
And indeed it is NOT defined at the moment wxsmediactrl.cpp is being build (added the following snippet to that cpp file).

--- Code: ---#if wxUSE_MEDIACTRL
//
#else
# error no wxUSE_MEDIACTRL
#endif

--- End code ---

-->

--- Code: ---./wxsmediactrl.cpp:30:3: error: #error no wxUSE_MEDIACTRL
./wxsmediactrl.cpp: In constructor ‘wxsMediaCtrl::wxsMediaCtrl(wxsItemResData*)’:
./wxsmediactrl.cpp:60: error: ‘wxMEDIACTRLPLAYERCONTROLS_DEFAULT’ was not declared in this scope
...

--- End code ---

so we need to look into that direction.

killerbot:
info : on my OpenSuse 11.3 32 bit it builds ok.

Jenna:
This patch works for me:

--- Code: ---Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.h
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.h (Revision 6414)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.h (Arbeitskopie)
@@ -20,8 +20,11 @@
 #ifndef WXMEDIACTRL_H
 #define WXMEDIACTRL_H
 
+#if wxUSE_MEDIACTRL
+
 #include "../wxswidget.h"
 
+
 /** \brief Class for wxMediaCtrl widget */
 class wxsMediaCtrl: public wxsWidget
 {
@@ -45,4 +48,6 @@
 
 };
 
+#endif // wxUSE_MEDIACTRL
+
 #endif // WXMEDIACTRL_H
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.cpp (Revision 6414)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmediactrl.cpp (Arbeitskopie)
@@ -22,6 +22,9 @@
 */
 
 #include "wxsmediactrl.h"
+
+#if wxUSE_MEDIACTRL
+
 #include "wx/mediactrl.h"
 
 
@@ -205,3 +208,4 @@
  WXS_ENUM(wxsMediaCtrl, m_iVolume,  _("Volume"), _T("volume"), VolumeLevels, VolumeNames, 5)
 }
 
+#endif // wxUSE_MEDIACTRL

--- End code ---

I think we should do this for all items that might be undefined, to avoid further errors.

EDIT:

I was able to compile, but got a runtime-error about an undefined symbol (after setting additional debug-log on true in OnInit), that leads to not loading wxSmith and the dependent plugins.

Navigation

[0] Message Index

[#] Next page

Go to full version