Failure building with g++ 4.9 and wxwidgets3.0

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Failure building with g++ 4.9 and wxwidgets3.0

Damyan Ivanov-5
Hi,

I got the following build failure in the Debian package of flamerobin
(reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746847 
but I am also able to reproduce it locally, using g++ from
Debian/experimental).
The package uses a snapshot from the git master branch at
3f9645c97c2c12a8fadc6bd2ade353ea7ec7ffaf from 2014-02-06 which builds
fine with g++-4.8. wxwidgets3.0 is used in both cases.

The failure with g++-4.9 comes at link time:

flamerobin_MainFrame.o: In function `wxEvtHandler::AddPendingEvent(wxEvent const&)':
/usr/include/wx-3.0/wx/event.h:3395: undefined reference to `wxCommandEvent::Clone() const'
collect2: error: ld returned 1 exit status
Makefile:271: recipe for target 'flamerobin' failed
make[2]: *** [flamerobin] Error 1

The same package builds fine with:
 * g++-4.9 and wx2.8
   or with
 * g++-4.8 and wx3.0

however Debian wants to move to wx3.0 and gcc-4.9.

Any clues are welcome, as my C++ foo is rather monkey-level.

Thanks,
    dam

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

marius adrian popa
Administrator
Seems to be a g++-4.9 and wx3.x issues

http://forums.codeblocks.org/index.php?topic=19231.15

On Fri, May 9, 2014 at 4:32 PM, Damyan Ivanov <[hidden email]> wrote:

> Hi,
>
> I got the following build failure in the Debian package of flamerobin
> (reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746847
> but I am also able to reproduce it locally, using g++ from
> Debian/experimental).
> The package uses a snapshot from the git master branch at
> 3f9645c97c2c12a8fadc6bd2ade353ea7ec7ffaf from 2014-02-06 which builds
> fine with g++-4.8. wxwidgets3.0 is used in both cases.
>
> The failure with g++-4.9 comes at link time:
>
> flamerobin_MainFrame.o: In function `wxEvtHandler::AddPendingEvent(wxEvent const&)':
> /usr/include/wx-3.0/wx/event.h:3395: undefined reference to `wxCommandEvent::Clone() const'
> collect2: error: ld returned 1 exit status
> Makefile:271: recipe for target 'flamerobin' failed
> make[2]: *** [flamerobin] Error 1
>
> The same package builds fine with:
>  * g++-4.9 and wx2.8
>    or with
>  * g++-4.8 and wx3.0
>
> however Debian wants to move to wx3.0 and gcc-4.9.
>
> Any clues are welcome, as my C++ foo is rather monkey-level.
>
> Thanks,
>     dam
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> &#149; 3 signs your SCM is hindering your productivity
> &#149; Requirements for releasing software faster
> &#149; Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Flamerobin-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/flamerobin-devel

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

Damyan Ivanov-5
In reply to this post by Damyan Ivanov-5
-=| Damyan Ivanov, 09.05.2014 16:32:05 +0300 |=-

> Hi,
>
> I got the following build failure in the Debian package of flamerobin
> (reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746847 
> but I am also able to reproduce it locally, using g++ from
> Debian/experimental).
> The package uses a snapshot from the git master branch at
> 3f9645c97c2c12a8fadc6bd2ade353ea7ec7ffaf from 2014-02-06 which builds
> fine with g++-4.8. wxwidgets3.0 is used in both cases.
>
> The failure with g++-4.9 comes at link time:
>
> flamerobin_MainFrame.o: In function `wxEvtHandler::AddPendingEvent(wxEvent const&)':
> /usr/include/wx-3.0/wx/event.h:3395: undefined reference to `wxCommandEvent::Clone() const'
> collect2: error: ld returned 1 exit status

Because of this error flamerobin is scheduled for removal from the
next Debian release. See
http://packages.qa.debian.org/f/flamerobin.html

Discussion about a similar problem in Arch suggests invoking ::Clone()
explicitly somewhere, but I didn't succeed in that workaround.

https://aur.archlinux.org/packages/codelite

Here's what I tried:

--- a/src/gui/AdvancedSearchFrame.cpp
+++ b/src/gui/AdvancedSearchFrame.cpp
@@ -299,6 +299,12 @@ void AdvancedSearchFrame::rebuildList()
     }
     // send size event
     wxSizeEvent ev(listctrl_criteria->GetSize());
+
+    // workaround a problem wiht wx 3.0 and g++ 4.9. See
+    // https://bugs.debian.org/746847
+    wxEvent *tmp_ev = ev.Clone();
+    delete(tmp_ev);
+
     listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
 }
 //-----------------------------------------------------------------------------



------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

marius adrian popa
Administrator
I have seen some workarounds , i will try them on my machine

This one involves a configure option in wxwidgets
https://forums.dolphin-emu.org/Thread-solved-dolphin-git-on-archlinux-fails-to-compile

Another is  passing -fno-lto flags
https://github.com/eranif/codelite/issues/463#issuecomment-43673975

On Sat, May 31, 2014 at 11:01 AM, Damyan Ivanov <[hidden email]> wrote:

> -=| Damyan Ivanov, 09.05.2014 16:32:05 +0300 |=-
>> Hi,
>>
>> I got the following build failure in the Debian package of flamerobin
>> (reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746847
>> but I am also able to reproduce it locally, using g++ from
>> Debian/experimental).
>> The package uses a snapshot from the git master branch at
>> 3f9645c97c2c12a8fadc6bd2ade353ea7ec7ffaf from 2014-02-06 which builds
>> fine with g++-4.8. wxwidgets3.0 is used in both cases.
>>
>> The failure with g++-4.9 comes at link time:
>>
>> flamerobin_MainFrame.o: In function `wxEvtHandler::AddPendingEvent(wxEvent const&)':
>> /usr/include/wx-3.0/wx/event.h:3395: undefined reference to `wxCommandEvent::Clone() const'
>> collect2: error: ld returned 1 exit status
>
> Because of this error flamerobin is scheduled for removal from the
> next Debian release. See
> http://packages.qa.debian.org/f/flamerobin.html
>
> Discussion about a similar problem in Arch suggests invoking ::Clone()
> explicitly somewhere, but I didn't succeed in that workaround.
>
> https://aur.archlinux.org/packages/codelite
>
> Here's what I tried:
>
> --- a/src/gui/AdvancedSearchFrame.cpp
> +++ b/src/gui/AdvancedSearchFrame.cpp
> @@ -299,6 +299,12 @@ void AdvancedSearchFrame::rebuildList()
>      }
>      // send size event
>      wxSizeEvent ev(listctrl_criteria->GetSize());
> +
> +    // workaround a problem wiht wx 3.0 and g++ 4.9. See
> +    // https://bugs.debian.org/746847
> +    wxEvent *tmp_ev = ev.Clone();
> +    delete(tmp_ev);
> +
>      listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
>  }
>  //-----------------------------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> _______________________________________________
> Flamerobin-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/flamerobin-devel

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

marius adrian popa
Administrator
Here is the gcc reported bug , but seems marked incomplete

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61214

On Sat, May 31, 2014 at 2:19 PM, marius adrian popa <[hidden email]> wrote:

> I have seen some workarounds , i will try them on my machine
>
> This one involves a configure option in wxwidgets
> https://forums.dolphin-emu.org/Thread-solved-dolphin-git-on-archlinux-fails-to-compile
>
> Another is  passing -fno-lto flags
> https://github.com/eranif/codelite/issues/463#issuecomment-43673975
>
> On Sat, May 31, 2014 at 11:01 AM, Damyan Ivanov <[hidden email]> wrote:
>> -=| Damyan Ivanov, 09.05.2014 16:32:05 +0300 |=-
>>> Hi,
>>>
>>> I got the following build failure in the Debian package of flamerobin
>>> (reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746847
>>> but I am also able to reproduce it locally, using g++ from
>>> Debian/experimental).
>>> The package uses a snapshot from the git master branch at
>>> 3f9645c97c2c12a8fadc6bd2ade353ea7ec7ffaf from 2014-02-06 which builds
>>> fine with g++-4.8. wxwidgets3.0 is used in both cases.
>>>
>>> The failure with g++-4.9 comes at link time:
>>>
>>> flamerobin_MainFrame.o: In function `wxEvtHandler::AddPendingEvent(wxEvent const&)':
>>> /usr/include/wx-3.0/wx/event.h:3395: undefined reference to `wxCommandEvent::Clone() const'
>>> collect2: error: ld returned 1 exit status
>>
>> Because of this error flamerobin is scheduled for removal from the
>> next Debian release. See
>> http://packages.qa.debian.org/f/flamerobin.html
>>
>> Discussion about a similar problem in Arch suggests invoking ::Clone()
>> explicitly somewhere, but I didn't succeed in that workaround.
>>
>> https://aur.archlinux.org/packages/codelite
>>
>> Here's what I tried:
>>
>> --- a/src/gui/AdvancedSearchFrame.cpp
>> +++ b/src/gui/AdvancedSearchFrame.cpp
>> @@ -299,6 +299,12 @@ void AdvancedSearchFrame::rebuildList()
>>      }
>>      // send size event
>>      wxSizeEvent ev(listctrl_criteria->GetSize());
>> +
>> +    // workaround a problem wiht wx 3.0 and g++ 4.9. See
>> +    // https://bugs.debian.org/746847
>> +    wxEvent *tmp_ev = ev.Clone();
>> +    delete(tmp_ev);
>> +
>>      listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
>>  }
>>  //-----------------------------------------------------------------------------
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Time is money. Stop wasting it! Get your web API in 5 minutes.
>> www.restlet.com/download
>> http://p.sf.net/sfu/restlet
>> _______________________________________________
>> Flamerobin-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/flamerobin-devel

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

Michael Hieke
In reply to this post by Damyan Ivanov-5
On 31.05.2014 10:01, Damyan Ivanov wrote:

> Discussion about a similar problem in Arch suggests invoking ::Clone()
> explicitly somewhere, but I didn't succeed in that workaround.
>
> https://aur.archlinux.org/packages/codelite
>
> Here's what I tried:
>
> --- a/src/gui/AdvancedSearchFrame.cpp
> +++ b/src/gui/AdvancedSearchFrame.cpp
> @@ -299,6 +299,12 @@ void AdvancedSearchFrame::rebuildList()
>       }
>       // send size event
>       wxSizeEvent ev(listctrl_criteria->GetSize());
> +
> +    // workaround a problem wiht wx 3.0 and g++ 4.9. See
> +    // https://bugs.debian.org/746847
> +    wxEvent *tmp_ev = ev.Clone();
> +    delete(tmp_ev);
> +
>       listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
>   }


I have been successful with that hack.  Please note that adding it to
AdvancedSearchFrame.cpp does not help, but adding it to MainFrame.cpp
does.  To be on the safe side I would add it to both files (once in each).

Also I'd rather use something like:

      wxSizeEvent ev(listctrl_criteria->GetSize());
+
+    // workaround a problem with wx 3.0 and g++ 4.9. See
+    // https://bugs.debian.org/746847
+    std::auto_ptr<wxEvent> tmp_ev(ev.Clone());
+
      listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);

which is easier to search for and uses RAII instead of the ugly delete.

Thanks

--
Michael Hieke


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

Damyan Ivanov-5
-=| Michael Hieke, 31.05.2014 23:15:35 +0200 |=-

> I have been successful with that hack.  Please note that adding it
> to AdvancedSearchFrame.cpp does not help, but adding it to
> MainFrame.cpp does.  To be on the safe side I would add it to both
> files (once in each).
>
> Also I'd rather use something like:
>
>       wxSizeEvent ev(listctrl_criteria->GetSize());
> +
> +    // workaround a problem with wx 3.0 and g++ 4.9. See
> +    // https://bugs.debian.org/746847
> +    std::auto_ptr<wxEvent> tmp_ev(ev.Clone());
> +
>       listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
>
> which is easier to search for and uses RAII instead of the ugly
> delete.
Thank you Michael, adding the above to MainFrame.cpp seems to work
around the problem indeed. Great!

I am attaching the resulting patch for reference.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel

wx3.0-vs-gcc4.9.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Failure building with g++ 4.9 and wxwidgets3.0

marius adrian popa
Administrator
Thanks i pushed to master

On Tue, Jun 3, 2014 at 10:37 AM, Damyan Ivanov <[hidden email]> wrote:

> -=| Michael Hieke, 31.05.2014 23:15:35 +0200 |=-
>> I have been successful with that hack.  Please note that adding it
>> to AdvancedSearchFrame.cpp does not help, but adding it to
>> MainFrame.cpp does.  To be on the safe side I would add it to both
>> files (once in each).
>>
>> Also I'd rather use something like:
>>
>>       wxSizeEvent ev(listctrl_criteria->GetSize());
>> +
>> +    // workaround a problem with wx 3.0 and g++ 4.9. See
>> +    // https://bugs.debian.org/746847
>> +    std::auto_ptr<wxEvent> tmp_ev(ev.Clone());
>> +
>>       listctrl_criteria->GetEventHandler()->AddPendingEvent(ev);
>>
>> which is easier to search for and uses RAII instead of the ugly
>> delete.
>
> Thank you Michael, adding the above to MainFrame.cpp seems to work
> around the problem indeed. Great!
>
> I am attaching the resulting patch for reference.
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Flamerobin-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel