FS#50468 - [codeblocks] codeblocks crashes after creating a new project

Attached to Project: Community Packages
Opened by patrick (potomac) - Sunday, 21 August 2016, 04:09 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 22 August 2016, 04:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Codeblocks crashes after creating a new project ( for example : console project in C or C++ ),

the project is created, and when I click on "source/main.cpp" file and when I try to type something then codeblocks crashes, with a bugreport,

I use plasma ( KDE ) and archlinux 64 bits

Additional info:
* package version(s) codeblocks 16.01-4

* config and/or log files etc.


Steps to reproduce:
- create a new project ( for example a console C project )
- when you try to click on "main.c" file and type something codeblocks will crash immediately

see the xml file for the bugreport generated automatically by codeblocks
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 22 August 2016, 04:21 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#49799 
Comment by patrick (potomac) - Sunday, 21 August 2016, 04:31 GMT
I suspect a build problem for the codeblocks package, some innapropriate CFLAGS in the PKGBUILD for some CPU ( pentium dual core E6800 for example )

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/codeblocks
Comment by patrick (potomac) - Sunday, 21 August 2016, 05:27 GMT
I found the solution,

the problem was due to a bad PKGBUILD, in the PKGBUILD the maintainer has made a very bad choice in CFLAGS : the use of the option "-march=native"

"-march=native" means that gcc will produce binary code for the CPU of the local machine where the compilation is made, that means that if the maintainer has a iCore7 cpu then the binary will be optimized for this CPU, that means that older CPUs ( like pentium dual core, pentium 4, pentium 3, 2, celeron ) will probably crash because they don't have the same features as iCore7,

"native
This selects the CPU to tune for at compilation time by determining the processor type of the compiling machine. Using -mtune=native will produce code optimized for the local machine under the constraints of the selected instruction set. Using -march=native will enable all instruction subsets supported by the local machine (hence the result might not run on different machines)."

the solution is simply to delete "-march=native" mentions in the PKGBUILD, this kind of instruction should never be set in PKGBUILD ( ABS )

Loading...