[Coco] Segmentation fault compiling cmoc

Tormod Volden lists.tormod at gmail.com
Wed Mar 2 13:27:20 EST 2016


On Wed, Mar 2, 2016 at 4:44 AM, Jason M wrote:
> Has anyone seen the below error when trying to compile cmoc ?
>
> I'm on Windows 7 Pro 64 bit - running MSys2 64 bit - cmoc 0.1.19

> g++ -DPACKAGE_NAME=\"cmoc\" -DPACKAGE_TARNAME=\"cmoc\"
> -DPACKAGE_VERSION=\"0.1.1
>                                   9\" -DPACKAGE_STRING=\"cmoc\ 0.1.19\"
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\
>                                                     " -DPACKAGE=\"cmoc\"
> -DVERSION=\"0.1.19\" -I.    -DLOCALEDIR=\"/usr/local/share/
>
> locale\" -I../intl -I../intl -g -O2 -W -Wall -MT
> writecocofile-writecocofile.o -
>                                         MD -MP -MF
> .deps/writecocofile-writecocofile.Tpo -c -o writecocofile-writecocofi
>
>   le.o `test -f 'writecocofile.cpp' || echo './'`writecocofile.cpp
> writecocofile.cpp:986:25: internal compiler error: Segmentation fault
>                          << setprecision(3) << 100.0 * numFreeGranules /
> CoCoDis
>                 k::MAX_GRANULES << "%)\n";
>                          ^

This looks very much like what I ran into while compiling another
project [1] in MSYS2. You should try to sanitize your path, make sure
you use the right MSYS or MINGW64 shell windows during installation,
and closing them afterwards - from what you wrote I cannot be sure you
did all that. Following the MSYS2 installation instructions carefully
is important. See also
https://sourceforge.net/p/stm32flash/wiki/Build/ for the steps I did
for a successful installation and compilation.

A question that came to my mind is: What is cmoc anyway? To answer
myself, it is a cross-compiler for a subset of C:
http://sarrazip.com/dev/cmoc.html

Regards,
Tormod

[1] https://sourceforge.net/p/stm32flash/tickets/86/


> I had this working on the loaner computer I just returned to work :(
>
> Here's what I did to setup MSys:
> Install MSYS2 from http://msys2.github.io/
>
> shell commands:
> update-core
> pacman -Su
>
> pacman -S make base-devel
> pacman -Su gcc
>
> windows folder copy and paste for lwtools ... then back in shell:
> make
> mv lwasm.exe /usr/bin
>
> windows folder copy and paste for cmoc download ...then back in shell:
> ./configure ; make ; make install
>


More information about the Coco mailing list