Thread: wxWidgets 2.9.2 compatibility

wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
So here's the patch I needed to get pgAdmin to build against wxWidgets
2.9.2 on Mac. The only obvious problem I see with it when running is
that the toolbars are displaying text over the graphical buttons which
needs further investigation.

I'm not really sure why the compiler is unable to resolve this:

./slony/dlgRepCluster.cpp:815: error: request for member
‘GetClientData’ is ambiguous
/usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
void* wxItemContainer::GetClientData(unsigned int) const
/usr/local/include/wx-2.9/wx/event.h:3234: error:
void* wxEvtHandler::GetClientData() const

Any ideas Peter? It's easy to give it a hint of course, but quite ugly.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
And today, let's forward the attachement :-p

(thanks Ashesh)

On Tue, Jul 12, 2011 at 5:45 PM, Dave Page <dpage@pgadmin.org> wrote:
> So here's the patch I needed to get pgAdmin to build against wxWidgets
> 2.9.2 on Mac. The only obvious problem I see with it when running is
> that the toolbars are displaying text over the graphical buttons which
> needs further investigation.
>
> I'm not really sure why the compiler is unable to resolve this:
>
> ./slony/dlgRepCluster.cpp:815: error: request for member
> ‘GetClientData’ is ambiguous
> /usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
> void* wxItemContainer::GetClientData(unsigned int) const
> /usr/local/include/wx-2.9/wx/event.h:3234: error:
> void* wxEvtHandler::GetClientData() const
>
> Any ideas Peter? It's easy to give it a hint of course, but quite ugly.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: wxWidgets 2.9.2 compatibility

From
Peter Geoghegan
Date:
On 12 July 2011 17:45, Dave Page <dpage@pgadmin.org> wrote:
> So here's the patch I needed to get pgAdmin to build against wxWidgets
> 2.9.2 on Mac. The only obvious problem I see with it when running is
> that the toolbars are displaying text over the graphical buttons which
> needs further investigation.

I don't have time to help you with that at the moment I'm afraid.

> I'm not really sure why the compiler is unable to resolve this:
>
> ./slony/dlgRepCluster.cpp:815: error: request for member
> ‘GetClientData’ is ambiguous
> /usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
> void* wxItemContainer::GetClientData(unsigned int) const
> /usr/local/include/wx-2.9/wx/event.h:3234: error:
> void* wxEvtHandler::GetClientData() const

I told you about this back in February I think, where I demonstrated
that GCC gives crappy error messages when it encounters the dastardly
diamond:

http://postgresql.1045698.n5.nabble.com/Building-with-wx2-9-on-Mac-td3397898.html#a3397998

At the time, I couldn't recreate the problem, and I speculated that it
was a bug specific to the Mac version. You said that Clang could build
it, which I thought was weird.

Anyway, I think it's going to be tough for me to diagnose the problem
without a Mac.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

Re: wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
On Wed, Jul 13, 2011 at 10:27 AM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 12 July 2011 17:45, Dave Page <dpage@pgadmin.org> wrote:
>> So here's the patch I needed to get pgAdmin to build against wxWidgets
>> 2.9.2 on Mac. The only obvious problem I see with it when running is
>> that the toolbars are displaying text over the graphical buttons which
>> needs further investigation.
>
> I don't have time to help you with that at the moment I'm afraid.

I wasn't asking you to :-)

>> I'm not really sure why the compiler is unable to resolve this:
>>
>> ./slony/dlgRepCluster.cpp:815: error: request for member
>> ‘GetClientData’ is ambiguous
>> /usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
>> void* wxItemContainer::GetClientData(unsigned int) const
>> /usr/local/include/wx-2.9/wx/event.h:3234: error:
>> void* wxEvtHandler::GetClientData() const
>
> I told you about this back in February I think, where I demonstrated
> that GCC gives crappy error messages when it encounters the dastardly
> diamond:
>
> http://postgresql.1045698.n5.nabble.com/Building-with-wx2-9-on-Mac-td3397898.html#a3397998

Ahh, yes - that one.

Anyhoo, I'm looking to commit the patch so we can move forward. Objections?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: wxWidgets 2.9.2 compatibility

From
Peter Geoghegan
Date:
On 13 July 2011 14:39, Dave Page <dpage@pgadmin.org> wrote:
>> http://postgresql.1045698.n5.nabble.com/Building-with-wx2-9-on-Mac-td3397898.html#a3397998
>
> Ahh, yes - that one.
>
> Anyhoo, I'm looking to commit the patch so we can move forward. Objections?

Yes. I think you're working around a bug in wxWidgets by qualifying
which base class you mean to call, and that you should just get the
bug fixed. I'm guessing that you don't see this problem on Windows and
Linux? It's probably totally incidental that you don't see a problem
when building with Clang.

Try and produce a test-case, and send it to the wx guys. They're
fairly responsive, I found.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

Re: wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
On Wed, Jul 13, 2011 at 3:01 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 13 July 2011 14:39, Dave Page <dpage@pgadmin.org> wrote:
>>> http://postgresql.1045698.n5.nabble.com/Building-with-wx2-9-on-Mac-td3397898.html#a3397998
>>
>> Ahh, yes - that one.
>>
>> Anyhoo, I'm looking to commit the patch so we can move forward. Objections?
>
> Yes. I think you're working around a bug in wxWidgets by qualifying
> which base class you mean to call, and that you should just get the
> bug fixed. I'm guessing that you don't see this problem on Windows and
> Linux? It's probably totally incidental that you don't see a problem
> when building with Clang.

Haven't tried there yet - just hacking on the Mac at the moment.

> Try and produce a test-case, and send it to the wx guys. They're
> fairly responsive, I found.

Depends on the issue. We've got bugs opened with them nearly 10 years
ago that are still open I believe.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
On Wed, Jul 13, 2011 at 3:46 PM, Dave Page <dpage@pgadmin.org> wrote:
> On Wed, Jul 13, 2011 at 3:01 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
>> Try and produce a test-case, and send it to the wx guys. They're
>> fairly responsive, I found.
>
> Depends on the issue. We've got bugs opened with them nearly 10 years
> ago that are still open I believe.

Seems this issue was logged 18 months ago and is still open. I added a
simple test case to reproduce, though it wasn't exactly unclear from
the existing reports:

http://trac.wxwidgets.org/ticket/11637

I'll see if anything happens over the next few days, and if not,
commit the hack so we can proceed with the other issues (I figured out
the label-over-buttons thing - that's an easy, albeit somewhat tedious
fix).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: wxWidgets 2.9.2 compatibility

From
Peter Geoghegan
Date:
On 15 July 2011 13:57, Dave Page <dpage@pgadmin.org> wrote:
> Seems this issue was logged 18 months ago and is still open. I added a
> simple test case to reproduce, though it wasn't exactly unclear from
> the existing reports:

If the test case doesn't help, I suggest isolating the problem
yourself and writing a patch. It's probably simple enough.

> I'll see if anything happens over the next few days, and if not,
> commit the hack so we can proceed with the other issues (I figured out
> the label-over-buttons thing - that's an easy, albeit somewhat tedious
> fix).

Okay, good.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

Re: wxWidgets 2.9.2 compatibility

From
Dave Page
Date:
On Fri, Jul 15, 2011 at 2:07 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 15 July 2011 13:57, Dave Page <dpage@pgadmin.org> wrote:
>> Seems this issue was logged 18 months ago and is still open. I added a
>> simple test case to reproduce, though it wasn't exactly unclear from
>> the existing reports:
>
> If the test case doesn't help, I suggest isolating the problem
> yourself and writing a patch. It's probably simple enough.

That would imply I have spare time for that sort of thing :-p

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company