Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#49799 - [codeblocks] 16.01-3 is crashing

Attached to Project: Community Packages
Opened by Mauro Santos (R00KIE) - Wednesday, 22 June 2016, 10:25 GMT
Last edited by Jelle van der Waa (jelly) - Thursday, 19 January 2017, 12:03 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Eric Belanger (Snowman)
Evangelos Foutras (foutrelis)
Alexander F. Rødseth (xyproto)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

Description:
Codeblocks 16.01-3 is crashing on startup with the following messages if started from a terminal:

Warning: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1009,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1010,wx containers,compatible with 2.6).
Starting Code::Blocks Release 16.01 rev 10692 Jun 11 2016, 23:37:16 - wx2.8.12 (Linux, unicode) - 64 bit
Initialize EditColourSet .....
Initialize EditColourSet: done.

This seems to point to the same problem described here [1]. The solution should be to recompile wxgtk2.8 (and maybe something else) with the same compiler version as used for codeblocks. I have tried to recompile wxgtk2.8 to confirm that would solve the problem but compiling wxgtk2.8 fails.


Additional info:
codeblocks 16.01-3
wxgtk2.8 2.8.12.1-4

Steps to reproduce:
Start codeblocks from a terminal. It should crash on startup.

[1] http://forums.codeblocks.org/index.php?topic=20872.0
This task depends upon

Closed by  Jelle van der Waa (jelly)
Thursday, 19 January 2017, 12:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Applied a better fix in 16.01-8 which re-enables -O2 and stack fortification flags.
Comment by Doug Newgard (Scimmia) - Wednesday, 22 June 2016, 13:53 GMT
That's a Warning, not an error, and is generally harmless.

Any more info about the crash?
Comment by Mauro Santos (R00KIE) - Wednesday, 22 June 2016, 14:22 GMT
The only other info is the debug report generated by codeblocks (attached). There is also this forum thread [1].

I never get to see the main window, the only window that pops up is the debug report window.

[1] https://bbs.archlinux.org/viewtopic.php?id=214037
Comment by Janne Pettersson (wincc) - Wednesday, 22 June 2016, 14:56 GMT
Same problem for me.
Comment by Roman Mikhayloff (rimf) - Thursday, 23 June 2016, 22:23 GMT
I patched and rebuild wxgtk. This warning has gone. I suspect a bug in the compiler.
https://bugs.archlinux.org/task/49826?project=1
Comment by Marc-Olivier Barre (mobarre) - Monday, 27 June 2016, 13:57 GMT
Even better: rebuild codeblocks against wxgtk 3 instead of 2.8. with codeblocks 16.01 it seems to work like a charm, and avoid making patches all around the place.

Bonus points if you also rebuild wxgtk 3 to make sure the gcc ABI matches the one you compiled codeblocks with.
Comment by Marc-Olivier Barre (mobarre) - Monday, 27 June 2016, 15:58 GMT
Looking a bit further, I do notice a few glitches in the watches debugger window (when you dereference the "this" pointer, all the properties of the object are called "this", which isn't too bad, but still kinda inconvenient).

Sooo... We still might have to path 2.8 to make things compatible. I'll see if I can brew a patch.
Comment by Marc-Olivier Barre (mobarre) - Tuesday, 28 June 2016, 16:07 GMT
I now have a working patch built from this: http://trac.wxwidgets.org/attachment/ticket/12575/xbm.diff

wxgtk2.8 does indeed compile with it. Trouble is, I can't seem to get past the linking part of the codeblocks build...

Build log for codeblocks withe the patched wxgtk2.8: http://pastebin.com/jUQtpsv5

My patch should not explain the codeblocks build failure.

Any ideas ? I think at that point, we could use a package maintainer point of view.
Comment by Marc-Olivier Barre (mobarre) - Tuesday, 28 June 2016, 20:25 GMT
ok, scratch my previous comment. the wxgtk patch works just fine and codeblocks builds just fine. Forgot to purge the src directory from my previous build... no comment.

Still, even with both CB and wxgtk2.8 built with gcc6.1.1, codeblocks crash in the exact same way.

So, only way to run codeblocks at the moment is to recompile it against wxgtk 3 it seems. Shall we move this upstream ?
Comment by Roman Mikhayloff (rimf) - Tuesday, 28 June 2016, 23:50 GMT
I wrote that the patch for wxgtk has not helped.

To build a working CodeBlocks, I changed one line in PKGBUILD. Change line "make" to "CXXFLAGS=-O1 CFLAGS=-O1 make".
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 29 June 2016, 17:25 GMT
Hi. Thanks for reporting. I can reproduce the issue.

Will try with different make flags first.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 29 June 2016, 18:16 GMT
codeblocks still crashes at start here when building with -O1
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 29 June 2016, 18:54 GMT
Added maintainer and last packager of wxgtk2.8 to check if they have any input.
Comment by Roman Mikhayloff (rimf) - Thursday, 30 June 2016, 09:14 GMT
Sorry. I misused makepkg.

To work around this problem, build the program using makepkg along with such lines in makepkg.conf:

#CPPFLAGS=""
CFLAGS="-march=native -O0 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="-march=native -O0 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"

Correctly must make a patch which eliminates govnokod "if (&strref == ((wxString*)NULL)) ...", associated with the wxPG_LABEL symbol.
Comment by zaffy (zaffy) - Friday, 01 July 2016, 16:17 GMT
Can confirm Roman's build. Codeblocks works with that.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 03 July 2016, 23:43 GMT
I used the CFLAGS workaround. Thanks, Roman Mikhayloff.

Hopefully codeblocks will upgrade to wxgtk3 and also find a way to avoid similar problems to this in the future.

The updated codeblocks package will appear in [community] shortly. Please confirm that it is working correctly.
Comment by Roman Mikhayloff (rimf) - Monday, 04 July 2016, 09:02 GMT
codeblocks-16.01-4-x86_64 works.
It seems to me better to remove the option -march=native of PKGBUILD file for ABS.
Comment by Janne Pettersson (wincc) - Monday, 04 July 2016, 09:43 GMT
codeblocks-16.01-4-x86_64 works for me.
Comment by patrick (potomac) - Monday, 22 August 2016, 04:19 GMT
  • Field changed: Percent Complete (100% → 0%)
the workaround doesn't work for me, the crash will occur after creating a new project, see  FS#50468 ,

I highly suspect bad CFLAGS in PKGBUILD, innapropriate for some CPUs ( pentium dual core E6800 )
Comment by Doug Newgard (Scimmia) - Monday, 22 August 2016, 04:20 GMT
-march=native is never right for repo packages.
Comment by patrick (potomac) - Monday, 22 August 2016, 06:02 GMT
deleting "-march=native" in the PKGBUILD solves the problem,

you can replace "-march=native" by "-mtune=generic" which is the default setting in /etc/makepkg.conf
Comment by Alexander F. Rødseth (xyproto) - Thursday, 25 August 2016, 09:49 GMT
Will update the PKGBUILD.
Comment by Alexander F. Rødseth (xyproto) - Friday, 26 August 2016, 10:32 GMT
Updated (16.01-5 will appear in [community] shortly).

Works here. Please confirm that it's working as it should.
Comment by patrick (potomac) - Friday, 26 August 2016, 12:00 GMT
yes it's ok, no bug with 16.01-5 version
Comment by Roman Mikhayloff (rimf) - Wednesday, 18 January 2017, 20:05 GMT
  • Field changed: Percent Complete (100% → 0%)
I have a patch for enable optimisation without this bug. Please, open the task.
Comment by Jelle van der Waa (jelly) - Wednesday, 18 January 2017, 20:06 GMT
Patches should go upstream!
Comment by Roman Mikhayloff (rimf) - Thursday, 19 January 2017, 06:06 GMT
The patch for enable optimization without this bug.

Loading...