Chew segmentation fault while building on Ubuntu/Debian

Tiberiu Chibici chibicitiberiu@gmail.com
Mon Dec 27 12:30:39 GMT 2021


Hello,
I've been trying to build a cross compiler the last few days, and I keep
getting this build error:

/bin/bash: line 1: 31514 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../corefile.c > core.tmp
/bin/bash: line 1: 31508 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../archures.c > archures.tmp
/bin/bash: line 1: 31510 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../bfd.c > bfd.tmp
/bin/bash: line 1: 31507 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../archive.c > archive.tmp
make[4]: *** [Makefile:998: core.stamp] Error 139
/bin/bash: line 1: 31504 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../aoutx.h > aoutx.tmp
/bin/bash: line 1: 31513 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../coffcode.h > coffcode.tmp
make[4]: *** Waiting for unfinished jobs....
/bin/bash: line 1: 31512 Segmentation fault      (core dumped) ./chew -f
../../../binutils-2.37/bfd/doc/doc.str <
../../../binutils-2.37/bfd/doc/../cache.c > cache.tmp

I started with a clean Ubuntu 20.04 machine using WSL2. I tried all the
binutils versions from 2.34 to 2.37. I also tried this on Debian, and a
clean Ubuntu 20.04 LTS VM (after updating all the packages).

Using latest Fedora Workstation, I was able to build successfully, so the
issue seems to be related to Debian and Ubuntu.

These are the packages I installed right after setting up the machines
(trying to follow this guide from the OSDEV wiki:
https://wiki.osdev.org/GCC_Cross-Compiler#Installing_Dependencies ):

sudo apt install build-essential bison flex libgmp3-dev libmpc-dev
libmpfr-dev texinfo \
                   nasm mtools


And here is the build script I'm using:
https://github.com/chibicitiberiu/nanobyte_os/blob/master/build_scripts/toolchain.mk

Is this something you've encountered before? Could anyone help me figure
out what the problem is?

Thank you very much, I hope this is the right channel for asking this type
of stuff.

-- 
Best regards,
Chibici Tiberiu


More information about the Binutils mailing list