Skip Menu |

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 32827
Status: resolved
Priority: 0/
Queue: Wx

People
Owner: mbarbon [...] users.sourceforge.net
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.81
  • 0.82
  • 0.83
Fixed in: (no value)



Subject: Wx-0.81 fails to build on Solaris 8 / Motif
The latest Wx-0.81 does not compile on Solaris 8 (Sparc). This seems to be due to the new wxStyledTextCtrl support. My wx-2.8.7 (motif flavor) has wxUSE_DRAG_AND_DROP set to 0 in the setup.h, and hence the wx/dnd.h does not define anything, which causes these compile errors: $ g++ -c -I/opt/perl_5.8.8/ext/include -I. -I../.. - I/opt/perl_5.8.8/ext/lib/wx/include/MOTIF-ansi-release-2.8 - I/opt/perl_5.8.8/ext/include/wx-2.8 -pthreads -O2 -mcpu=v9 - DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "- I/opt/perl_5.8.8/lib/CORE" -DWXPL_EXT -D_FILE_OFFSET_BITS=64 - D_LARGE_FILES -D__WXMOTIF__ -D_REENTRANT STC.c STC.c: In function 'void XS_Wx__StyledTextCtrl_DoDragOver(CV*)': STC.c:5873: error: 'wxDragResult' was not declared in this scope STC.c:5873: error: expected `;' before 'def' STC.c:5875: error: expected `;' before 'RETVAL' STC.c:5878: error: 'RETVAL' was not declared in this scope STC.c:5878: error: 'class wxStyledTextCtrl' has no member named 'DoDragOver' STC.c:5878: error: 'def' was not declared in this scope STC.c: In function 'void XS_Wx__StyledTextCtrl_DoDropText(CV*)': STC.c:5900: error: 'class wxStyledTextCtrl' has no member named 'DoDropText' I also have Linux, and there wxUSE_DRAG_AND_DROP is 1 and all is fine. Seems that wx-2.8.7 does not support drag and drop on Solaris/Motif - however I think that the Perl Wx module should work as far as possible on this platform as well. Wx-0.80 compiles and tests OK on wx-2.8.7/Solaris 8/Motif. But it works much less stable with Wx::Demo than the GTK2 variant on Linux :-/ Cheers, Marek
This is to confirm that the issue persists with Wx-0.82. I think that the STC.c sources should have conditionals (#if...#endif) around the Drag&Drop code, relying on the macro wxUSE_DRAG_AND_DROP - if that is false (like on Solaris/Motif) the code should not be compiled. Or is there a way to enable DnD support on Solaris/Motif, during configure? With gcc-4.1.2, Solaris 8, wxWidgets-2.8.7, perl-5.8.8: g++ -c -I/opt/perl_5.8.8/ext/include -I. -I../.. - I/opt/perl_5.8.8/ext/lib/wx/include/MOTIF-ansi-release-2.8 - I/opt/perl_5.8.8/ext/include/wx-2.8 -pthreads -O2 -mcpu=v9 - DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "- I/opt/perl_5.8.8/lib/CORE" -DWXPL_EXT -D_FILE_OFFSET_BITS=64 - D_LARGE_FILES -D__WXMOTIF__ -D_REENTRANT STC.c STC.c: In function 'void XS_Wx__StyledTextCtrl_DoDragOver(CV*)': STC.c:7558: error: 'wxDragResult' was not declared in this scope STC.c:7558: error: expected `;' before 'def' STC.c:7560: error: expected `;' before 'RETVAL' STC.c:7563: error: 'RETVAL' was not declared in this scope STC.c:7563: error: 'class wxStyledTextCtrl' has no member named 'DoDragOver' STC.c:7563: error: 'def' was not declared in this scope STC.c: In function 'void XS_Wx__StyledTextCtrl_DoDropText(CV*)': STC.c:7590: error: 'class wxStyledTextCtrl' has no member named 'DoDropText'
I just found the following lines in wxWidget-2.8.7's configure: if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_MGL" = 1 -o \ "$wxUSE_DFB" = 1; then { echo "$as_me:$LINENO: WARNING: Drag and drop not yet supported under $TOOLKIT... disabled" >&5 echo "$as_me: WARNING: Drag and drop not yet supported under $TOOLKIT... disabled" >&2;} wxUSE_DRAG_AND_DROP=no fi That means that Solaris/Motif won't have Drag And Drop enabled, so I think the Perl module Wx must not rely on DnD being there... Hope this helps, Marek
I took some time to hack in some changes into Wx-0.84 to make it compile on Solaris 8 with the MOTIF widget set. Honestly, I do not know what consequences that patch will have, however it makes Wx-0.84 compile on my setup (perl-5.8.8, gcc-4.1.2, wx-2.8.8, Solaris 8) and the test suite passes. Likewise, Wx::Demo works mostly fine (except the problems reported in my other RT issue). Feel free to review the patch and reuse whatever part of it for future Wx releases. Cheers, Marek
diff -ruN Wx-0.84/ext/media/Makefile.PL Wx-0.84p1/ext/media/Makefile.PL --- Wx-0.84/ext/media/Makefile.PL 2007-06-19 01:03:27.000000000 +0200 +++ Wx-0.84p1/ext/media/Makefile.PL 2008-07-23 13:04:46.925245000 +0200 @@ -19,5 +19,5 @@ WX_CORE_LIB => 'media core base', REQUIRE_WX_LIB => 'media', REQUIRE_WX => 2.006000, - NO_WX_PLATFORMS => [ 'motif' ], + NO_WX_PLATFORMS => [ ], ); diff -ruN Wx-0.84/ext/stc/XS/StyledTextCtrl.xs Wx-0.84p1/ext/stc/XS/StyledTextCtrl.xs --- Wx-0.84/ext/stc/XS/StyledTextCtrl.xs 2007-11-25 01:34:05.000000000 +0100 +++ Wx-0.84p1/ext/stc/XS/StyledTextCtrl.xs 2008-07-23 13:04:46.953206000 +0200 @@ -1388,8 +1388,10 @@ void DeleteBack(); void DeleteBackNotLine(); +#if wxUSE_DRAG_AND_DROP wxDragResult DoDragOver( wxCoord x, wxCoord y, wxDragResult def ); bool DoDropText( long x, long y, const wxString& data ); +#endif void DocumentStart(); void DocumentStartExtend(); diff -ruN Wx-0.84/XS/ComboBox.xs Wx-0.84p1/XS/ComboBox.xs --- Wx-0.84/XS/ComboBox.xs 2007-11-11 14:58:23.000000000 +0100 +++ Wx-0.84p1/XS/ComboBox.xs 2008-07-23 13:04:47.048200000 +0200 @@ -114,7 +114,7 @@ void wxComboBox::Cut() -#if WXPERL_W_VERSION_GE( 2, 6, 0 ) +#if WXPERL_W_VERSION_GE( 2, 6, 0 ) && !defined(__WXMOTIF__) bool wxComboBox::CanCopy() diff -ruN Wx-0.84/XS/ScrollBar.xs Wx-0.84p1/XS/ScrollBar.xs --- Wx-0.84/XS/ScrollBar.xs 2007-11-11 22:31:59.000000000 +0100 +++ Wx-0.84p1/XS/ScrollBar.xs 2008-07-23 13:04:47.070083000 +0200 @@ -77,7 +77,7 @@ wxScrollBar::SetThumbPosition( viewStart ) int viewStart -#if !defined(__WXMAC__) +#if !defined(__WXMAC__) && !defined(__WXMOTIF__) void wxScrollBar::SetPageSize( size )
Hi, I applied the patch to the development tree; it will be in the next release. Thanks! Mattia