Python

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Problems building wxPython-2.7.1.2 with GTK1 on MAC

    5 answers - 3040 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    I tried to upgrade my application to the new version of wxPython but
    ran into the following problems:
    I'm building wxPython version 2.7.1.2 using ,
    opengl, , , and
    debugreport as options to configure. I am building on Mac S X 10.4.8
    using gcc 4.0.1 (and gtk-1.2 installed via Fink)
    While building the wxWidgets part I had to apply the following
    patches to get things to compile:
    2006-08-18
    01:28:46.000000000 +0200
    2006-10-24
    13:15:56.000000000 +0200
    @@ -196,3 +196,8 @@
    return wxPRT_GTK;
    }
    +
    +wxString () const
    +{
    + return wxEmptyString;
    +}
    stdpaths_cf.cpp 2006-07-05 20:37:00.000000000 +0200
    2006-10-24 12:06:09.000000000 +0200
    @@ -31,7 +31,6 @@ #include "wx/mac/private.h"
    #endif #include ""
    -#include "wx/mac/private.h"
    #if defined(__DARWIN__)
    #include <CoreFoundation/CFBundle.h>
    After installing wxWidgets I tried to build wxPython using Python
    2.4.4 with
    python setup.py WXPRT=gtk WX_CNFIG=$(mywxpythonpath)/bin/wx-
    config install $(mywxpythonpath)
    This produced the following error when trying to compile helpers.cpp:
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid
    for C/C but not for C++
    src/helpers.cpp:32:28: error: wx/gtk/win_gtk.h: No such file or
    directory
    src/helpers.cpp: In function 'long int wxPyGetWinHandle(wxWindow*)':
    src/helpers.cpp:1841: error: 'GTK_PIZZA' was not declared in this scope
    error: command 'gcc' failed with exit status 1
    It seems that for Gtk 1.2 the directory include/wx/gtk has been
    renamed to include/wx/gtk1. I did provide a WXPRT=gtk, so I assume
    it is a bug that wxPython is not looking in include/wx/gtk1 for the
    win_gtk.h file.
    I just made a temporary symbolic link from this gtk1 subdirectory
    (named include/wx/gtk) and tried to see how much further I could get.
    The next problem occurred when trying to compile _core_wrap.o:
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid
    for C/C but not for C++
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_GetAccelFromString(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at /
    wx-2.7/wx/utils.h:571)
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at /
    wx-2.7/wx/utils.h:571)
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_Window_SetDoubleBuffered(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no member
    named 'SetDoubleBuffered'
    At this point I am lost. Could someone please help me get this thing
    build?
    Best regards,
    Sander Niemeijer
    To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
    For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org
  • No.1 | | 3362 bytes | |

    Sander Niemeijer wrote:
    Hi all,

    I tried to upgrade my application to the new version of wxPython but ran
    into the following problems:

    I'm building wxPython version 2.7.1.2 using , ,
    , , and as
    options to configure. I am building on Mac S X 10.4.8 using gcc 4.0.1
    (and gtk-1.2 installed via Fink)

    As you can probably tell, development activity, testing and support for
    gtk1 is dwindling pretty fast. Isn't GTK2 available in fink?

    While building the wxWidgets part I had to apply the following patches
    to get things to compile:

    2006-08-18
    01:28:46.000000000 +0200
    2006-10-24
    13:15:56.000000000 +0200
    @@ -196,3 +196,8 @@

    return wxPRT_GTK;
    }
    +
    +wxString () const
    +{
    + return wxEmptyString;
    +}

    Please submit this patch to the wx patch tracker.

    2006-07-05 20:37:00.000000000 +0200

    2006-10-24 12:06:09.000000000 +0200
    @@ -31,7 +31,6 @@ #include "wx/mac/private.h"
    #endif #include ""
    -#include "wx/mac/private.h"

    #if defined(__DARWIN__)
    #include <CoreFoundation/CFBundle.h>

    I wouldn't expect it to try including corefoundation at all on a gtk
    build and would think that's a bug, but I could be wrong.

    After installing wxWidgets I tried to build wxPython using Python 2.4.4
    with

    python setup.py WXPRT=gtk WX_CNFIG=$(mywxpythonpath)/bin/wx-config
    install $(mywxpythonpath)

    This produced the following error when trying to compile helpers.cpp:

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
    C/C but not for C++
    src/helpers.cpp:32:28: error: wx/gtk/win_gtk.h: No such file or directory
    src/helpers.cpp: In function 'long int wxPyGetWinHandle(wxWindow*)':
    src/helpers.cpp:1841: error: 'GTK_PIZZA' was not declared in this scope
    error: command 'gcc' failed with exit status 1

    It seems that for Gtk 1.2 the directory include/wx/gtk has been renamed
    to include/wx/gtk1. I did provide a WXPRT=gtk, so I assume it is a bug
    that wxPython is not looking in include/wx/gtk1 for the win_gtk.h file.

    A change in helpers.cpp where it includes the file to make it dependent
    on whether __WXGTK20__ is defined or not should fix it. If so then send
    a patch for that too.

    I just made a temporary symbolic link from this gtk1 subdirectory (named
    include/wx/gtk) and tried to see how much further I could get.
    The next problem occurred when trying to compile _core_wrap.o:

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
    C/C but not for C++
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_GetAccelFromString(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at
    /)
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at
    /)
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_Window_SetDoubleBuffered(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no member
    named 'SetDoubleBuffered'

    This one can be fixed with a patch to include/wx/gtk1/window.h. Add
    something like this to the wxWindow declaration:

    void SetDoubleBuffered(bool ) {}
  • No.2 | | 4986 bytes | |

    25-okt-2006, at 0:15, Robin Dunn wrote:

    As you can probably tell, development activity, testing and support
    for gtk1 is dwindling pretty fast. Isn't GTK2 available in fink?

    Yes it is. However, the reason why we are still using GTK1 is because
    GTK2 gave problems with the wxvtk bridge to VTK. visualizations
    showed all kinds of weird z-ordering problems.
    It will take some time to fix this issue, so for the time being we
    just like to stick with GTK1.

    >
    >While building the wxWidgets part I had to apply the following
    >patches to get things to compile:
    >
    >2006-08-18
    >01:28:46.000000000 +0200
    >2006-10-24
    >13:15:56.000000000 +0200
    >@@ -196,3 +196,8 @@
    >return wxPRT_GTK;
    >}
    >+
    >+wxString () const
    >+{
    >+ return wxEmptyString;
    >+}
    >

    Please submit this patch to the wx patch tracker.

    done.

    >
    >stdpaths_cf.cpp 2006-07-05 20:37:00.000000000 +0200
    >
    >2006-10-24 12:06:09.000000000 +0200
    >@@ -31,7 +31,6 @@ #include "wx/mac/private.h"
    >#endif #include ""
    >-#include "wx/mac/private.h"
    >#if defined(__DARWIN__)
    >#include <CoreFoundation/CFBundle.h>
    >
    >

    I wouldn't expect it to try including corefoundation at all on a
    gtk build and would think that's a bug, but I could be wrong.

    I'm not sure either. However, I submitted a patch for the incorrect
    include of wx/mac/private.h

    >After installing wxWidgets I tried to build wxPython using Python
    >2.4.4 with
    >python setup.py WXPRT=gtk WX_CNFIG=$(mywxpythonpath)/bin/wx-
    >config install $(mywxpythonpath)
    >This produced the following error when trying to compile helpers.cpp:
    >
    >cc1plus: warning: command line option "-Wstrict-prototypes" is
    >valid for C/C but not for C++
    >src/helpers.cpp:32:28: error: wx/gtk/win_gtk.h: No such file or
    >directory
    >src/helpers.cpp: In function 'long int wxPyGetWinHandle(wxWindow*)':
    >src/helpers.cpp:1841: error: 'GTK_PIZZA' was not declared in this
    >scope
    >error: command 'gcc' failed with exit status 1
    >
    >It seems that for Gtk 1.2 the directory include/wx/gtk has been
    >renamed to include/wx/gtk1. I did provide a WXPRT=gtk, so I
    >assume it is a bug that wxPython is not looking in include/wx/gtk1
    >for the win_gtk.h file.
    >

    A change in helpers.cpp where it includes the file to make it
    dependent on whether __WXGTK20__ is defined or not should fix it.
    If so then send a patch for that too.

    Patch submitted.

    >I just made a temporary symbolic link from this gtk1 subdirectory
    >(named include/wx/gtk) and tried to see how much further I could get.
    >The next problem occurred when trying to compile _core_wrap.o:
    >
    >cc1plus: warning: command line option "-Wstrict-prototypes" is
    >valid for C/C but not for C++
    >src/gtk/_core_wrap.cpp: In function 'P*
    >_wrap_GetAccelFromString(P*, P*, P*)':
    >src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    >deprecated (declared at /
    >wx-2.7/wx/utils.h:571)
    >src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    >deprecated (declared at /
    >wx-2.7/wx/utils.h:571)
    >src/gtk/_core_wrap.cpp: In function 'P*
    >_wrap_Window_SetDoubleBuffered(P*, P*, P*)':
    >src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no
    >member named 'SetDoubleBuffered'
    >
    >

    This one can be fixed with a patch to include/wx/gtk1/window.h.
    Add something like this to the wxWindow declaration:

    void SetDoubleBuffered(bool ) {}

    Patch submitted.

    Now the next thing that I found was an error when compiling src/gtk/
    _controls_wrap.cpp (the _controls_ extension):

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid
    for C/C but not for C++
    src/gtk/_controls_wrap.cpp: In function 'P*
    _wrap_TextCtrl_SetModified(P*, P*, P*)':
    error: no matching function for
    call to 'wxTextCtrl::SetModified(bool&)'
    /
    140: note: candidates are: void wxTextCtrl::SetModified()

    I don't really understand this error. wxTextCtrl for gtk1 has its own
    SetModified() without parameters (and this won't work here), however
    wxTextCtrlBase (the parent class) does have a SetModified() that
    takes a bool as parameter. Any ideas how to fix this?

    Best regards,
    Sander Niemeijer

    To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
    For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org
  • No.3 | | 2306 bytes | |

    Sander Niemeijer wrote:

    I just made a temporary symbolic link from this gtk1 subdirectory
    (named include/wx/gtk) and tried to see how much further I could get.
    The next problem occurred when trying to compile _core_wrap.o:

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid
    for C/C but not for C++
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_GetAccelFromString(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at
    /)
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at
    /)
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_Window_SetDoubleBuffered(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no member
    named 'SetDoubleBuffered'

    >>

    >This one can be fixed with a patch to include/wx/gtk1/window.h. Add
    >something like this to the wxWindow declaration:
    >>

    >void SetDoubleBuffered(bool ) {}


    Patch submitted.

    I didn't see this patch.

    Now the next thing that I found was an error when compiling
    src/gtk/_controls_wrap.cpp (the _controls_ extension):

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
    C/C but not for C++
    src/gtk/_controls_wrap.cpp: In function 'P*
    _wrap_TextCtrl_SetModified(P*, P*, P*)':
    error: no matching function for call
    to 'wxTextCtrl::SetModified(bool&)'
    /
    note: candidates are: void wxTextCtrl::SetModified()

    I don't really understand this error. wxTextCtrl for gtk1 has its own
    SetModified() without parameters (and this won't work here), however
    wxTextCtrlBase (the parent class) does have a SetModified() that takes a
    bool as parameter. Any ideas how to fix this?

    It probably needs to be tested, but it looks like you can just remove
    the SetModified in gtk1/textctrl.h, I think the one in the base class
    should work ok. If not then I would just change the derived class
    version to take the bool parameter and set m_modified to the value of
    the parameter.
  • No.4 | | 4676 bytes | |

    26-okt-2006, at 20:06, Robin Dunn wrote:

    Sander Niemeijer wrote:

    I just made a temporary symbolic link from this gtk1
    subdirectory (named include/wx/gtk) and tried to see how much
    further I could get.
    The next problem occurred when trying to compile _core_wrap.o:

    cc1plus: warning: command line option "-Wstrict-prototypes" is
    valid for C/C but not for C++
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_GetAccelFromString(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at /
    wx-2.7/wx/utils.h:571)
    src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is
    deprecated (declared at /
    wx-2.7/wx/utils.h:571)
    src/gtk/_core_wrap.cpp: In function 'P*
    _wrap_Window_SetDoubleBuffered(P*, P*, P*)':
    src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no
    member named 'SetDoubleBuffered'

    This one can be fixed with a patch to include/wx/gtk1/window.h.
    Add something like this to the wxWindow declaration:

    void SetDoubleBuffered(bool ) {}
    >Patch submitted.
    >

    I didn't see this patch.

    Sorry. I forget to submit it. It should be there now.

    >Now the next thing that I found was an error when compiling src/
    >gtk/_controls_wrap.cpp (the _controls_ extension):
    >
    >cc1plus: warning: command line option "-Wstrict-prototypes" is
    >valid for C/C but not for C++
    >src/gtk/_controls_wrap.cpp: In function 'P*
    >_wrap_TextCtrl_SetModified(P*, P*, P*)':
    >error: no matching function for
    >call to 'wxTextCtrl::SetModified(bool&)'
    >/
    >140: note: candidates are: void wxTextCtrl::SetModified()
    >
    >I don't really understand this error. wxTextCtrl for gtk1 has its
    >own SetModified() without parameters (and this won't work here),
    >however wxTextCtrlBase (the parent class) does have a SetModified
    >() that takes a bool as parameter. Any ideas how to fix this?
    >

    It probably needs to be tested, but it looks like you can just
    remove the SetModified in gtk1/textctrl.h, I think the one in the
    base class should work ok. If not then I would just change the
    derived class version to take the bool parameter and set m_modified
    to the value of the parameter.

    I also just submitted a patch for this.

    Then on with the build and I get this:

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid
    for C/C but not for C++
    In function 'P*
    _wrap_new_GLContext(P*, P*, P*)':
    error: no matching
    function for call to 'wxGLContext::wxGLContext(wxGLCanvas*&, const
    wxGLContext*)'
    /
    note: candidates are: wxGLContext::wxGLContext(bool, wxWindow*, const
    wxPalette&, const wxGLContext*)
    /
    note: wxGLContext::wxGLContext(bool, wxWindow*, const
    wxPalette&)
    /
    note: wxGLContext::wxGLContext(const wxGLContext&)
    In function 'P*
    _wrap_GLContext_SetCurrent(P*, P*, P*)':
    error: no matching
    function for call to 'wxGLContext::SetCurrent(const wxGLCanvas&)'
    /
    note: candidates are: void wxGLContext::SetCurrent()
    In function 'P*
    (P*, int, P**)':
    error: no matching
    function for call to 'wxGLCanvas::SetCurrent(const wxGLContext&)'
    /
    143: note: candidates are: void wxGLCanvas::SetCurrent()

    This is starting to get very tiresome. I don't mind helping fixing an
    issue here and there, but I just don't have time to take on full
    maintenance for the GTK1 backend. Especially if every new change to
    the GTK2 backend might break the GTK1 backend again.

    Fortunately, yesterday I tried to build our application with wxPython
    2.7 and the latest version of VTK using GTK2 and the z-ordering
    issues we saw with the wxvtk binding and earlier versions of wxPython
    are gone now. So I think I am now going to focus my efforts on
    wxPython with GTK2.

    P.S. If the situation with GTK1 does not improve, then might I
    suggest putting a big warning sign somewhere for people who want to
    try to use this backend. It will also reflect rather badly on the
    image of the whole toolbox if people are confronted with all these
    build errors.

    Best regards,
    Sander

    To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
    For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org
  • No.5 | | 1950 bytes | |

    Sander Niemeijer wrote:

    Then on with the build and I get this:

    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
    C/C but not for C++
    In function 'P*
    _wrap_new_GLContext(P*, P*, P*)':
    error: no matching function
    for call to 'wxGLContext::wxGLContext(wxGLCanvas*&, const wxGLContext*)'
    /
    note: candidates are: wxGLContext::wxGLContext(bool, wxWindow*, const
    wxPalette&, const wxGLContext*)
    /
    note: wxGLContext::wxGLContext(bool, wxWindow*, const
    wxPalette&)
    /
    note: wxGLContext::wxGLContext(const wxGLContext&)
    In function 'P*
    _wrap_GLContext_SetCurrent(P*, P*, P*)':
    error: no matching function
    for call to 'wxGLContext::SetCurrent(const wxGLCanvas&)'
    /
    note: candidates are: void wxGLContext::SetCurrent()
    In function 'P*
    (P*, int, P**)':
    error: no matching function
    for call to 'wxGLCanvas::SetCurrent(const wxGLContext&)'
    /
    note: candidates are: void wxGLCanvas::SetCurrent()

    This would be a bigger change to make as the wxGLCanvas had some
    significant patches applied to it.

    This is starting to get very tiresome. I don't mind helping fixing an
    issue here and there, but I just don't have time to take on full
    maintenance for the GTK1 backend. Especially if every new change to the
    GTK2 backend might break the GTK1 backend again.

    It's unfortunately due to the nature of how things work in the wxWidgets
    project. Ports that don't get active attention tend to bit-rot fairly
    quickly. If the main developers are not using a port then it may left
    up to the users of the library to keep it in working order. This may
    seem like a strange way to operate, but it has the good side effect that
    no unnecessary work is wasted on a port that nobody is interested in
    using or thinks is important enough to fight for.

Re: Problems building wxPython-2.7.1.2 with GTK1 on MAC


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Python"

EMSDN.COM