Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592878 - sci-electronics/kicad-4.0.2-r4 internal compiler error: Segmentation fault
Summary: sci-electronics/kicad-4.0.2-r4 internal compiler error: Segmentation fault
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal critical (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-04 15:20 UTC by segmentation fault
Modified: 2016-09-10 02:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build Log (build.log.gz,67.67 KB, application/postscript)
2016-09-04 15:20 UTC, segmentation fault
Details

Note You need to log in before you can comment on or make changes to this bug.
Description segmentation fault 2016-09-04 15:20:30 UTC
Created attachment 444958 [details]
Build Log

At 95%, compilation breaks with segmentation fault (see attached build.log for full output):

[ 95%] Building CXX object pcbnew/CMakeFiles/_pcbnew.dir/zone_filling_algorithm.cpp.o
cd /host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2_build/pcbnew && /usr/bin/i686-pc-linux-gnu-g++  -DHAVE
_STDINT_H -DKICAD_KEEPCASE -DKICAD_SCRIPTING -DKICAD_SCRIPTING_MODULES -DKICAD_SCRIPTING_WXPYTHON -DPCBNEW -DUSE_OPENMP -DWXUSI
NGDLL -DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -D_pcbnew_EXPORTS -I/host/var/tmp/portage/sci-electronics/kicad-4.0
.2-r4/work/kicad-4.0.2/include -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/. -isystem /usr/l
ib/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4
.0.2/pcbnew/./dialogs -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/./autorouter -I/host/var/t
mp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/../3d-viewer -I/host/var/tmp/portage/sci-electronics/kicad-4.
0.2-r4/work/kicad-4.0.2/pcbnew/../common -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/../poly
gon -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/../common/dialogs -I/host/var/tmp/portage/sc
i-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/./exporters -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/ki
cad-4.0.2/pcbnew/../lib_dxf -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/./import_dxf -I/host
/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/../utils/idftools -I/host/var/tmp/portage/sci-electroni
cs/kicad-4.0.2-r4/work/kicad-4.0.2_build -I/usr/include/python2.7 -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/k
icad-4.0.2/scripting -I/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/scripting   -DNDEBUG -Wall 
-O2 -march=pentium4 -pipe  -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fPIC -Wno-unused-local-typedefs -Wno-stric
t-aliasing -pthread -fPIC   -o CMakeFiles/_pcbnew.dir/zone_filling_algorithm.cpp.o -c /host/var/tmp/portage/sci-electronics/kic
ad-4.0.2-r4/work/kicad-4.0.2/pcbnew/zone_filling_algorithm.cpp
In file included from /host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/tools/drawing_tool.cpp:42:0:
/host/var/tmp/portage/sci-electronics/kicad-4.0.2-r4/work/kicad-4.0.2/pcbnew/./ratsnest_data.h:323:6: internal compiler error: Segmentation fault
     {}
      ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
pcbnew/CMakeFiles/pcbnew_kiface.dir/build.make:5418: recipe for target 'pcbnew/CMakeFiles/pcbnew_kiface.dir/tools/drawing_tool.cpp.o' failed

---

 * Package:    sci-electronics/kicad-4.0.2-r4
 * Repository: gentoo
 * Maintainer: zoltan@sinustrom.info proxy-maint@gentoo.org
 * USE:        abi_x86_32 elibc_glibc examples i18n kernel_linux linguas_de linguas_el linguas_es linguas_fr linguas_it python 
python_targets_python2_7 userland_GNU x86
 * FEATURES:   preserve-libs sandbox userpriv usersandbox

---

-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   locale
--   program_options
--   regex
--   system
--   thread
--   chrono
--   atomic

---

-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.10", minimum required is "2.6") 
-- Check for installed Python Interpreter -- found
-- Python module install path: /usr/lib/python2.7/site-packages
-- Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.7.10", minimum required is "2.6") 
-- wxPython version 3.0 found.
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7") 
-- Found SWIG: /usr/bin/swig (found version "3.0.5") 
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") 
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -Wall -O2 -march=pentium4 -pipe  -fopenmp   -fPIC
C++             -Wall -O2 -march=pentium4 -pipe  -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing -pthread
Linker flags:
Executable       -Wl,-O1 -Wl,--as-needed
Module          -Wl,--no-undefined -Wl,-Bsymbolic
Shared          -Wl,--no-undefined -Wl,-Bsymbolic

---

emerge --info:

Portage 2.2.28 (python 3.4.3-final-0, hardened/linux/x86, gcc-4.9.3, glibc-2.21-r1, 3.16.5-gentoo i686)
=================================================================
System uname: Linux-3.16.5-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_3.40GHz-with-gentoo-2.2
KiB Mem:     XXXXXXX total,    191976 free
KiB Swap:    YYYYYYY total,   1622888 free
Timestamp of repository gentoo: Tue, 30 Aug 2016 23:15:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.3.6-r1::gentoo, 4.4.7::gentoo, 4.8.3::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.16::ck (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

ck
    location: /usr/local/portage/overlays/ck
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y "
FCFLAGS="-march=i686 -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=i686 -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="16bit 3dnow 7zip X a52 acl acpi ada aim aio alsa ao apache2 apm arts atk avi bash-completion beagle berkdb binary-drivers bitmap-fonts bluetooth bonobo bootsplash bsf bzip2 cairo cardbus cdda cddb cdparanoia cdr cg chm cli contentcache cracklib crypt css csv cups curl cxx dba dbase dbm dbus devfs26 devmap dhcp disassembler djvu dlloader dri dts dv dvb dvd dvdr dvdread eds emacs emboss encode enscript esd ethereal evo examples exif expat faillog fam fastcgi fat fbcon fbsplash fftw filter firefox flac flash fltk font-server fontconfig fortran fortran95 freetext ftp gd gdbm geometry gif gimp gimpprint ginac glade glibc-omitfp glut gmp gnokii gnome-print gnomecanvas gnomedb gnuplot gphoto2 gpm graphicsmagick graphviz gs gstreamer gtk gtk2 gtkhtml gtkspell guile gvim gzip hal handbook hardened haskell hbci hdf5 hfs html httpd i18n iconv icu idea ieee1394 imagemagick imap imlib inline innodb inode intl ipsec ipv6 isdnlog j2ee jad java java-external javamail javascript jboss jcs jfs jikes jpeg jpgraph junit jython kde kexi kig-scripting lame lapack ldap lesstif libg++ log4j logrotate loop-aes lpr ltsp lucene lzo lzw mad math matroska max-idx-128 maya-shaderlibrary mdb mgetty mikmod milter mime ming mjpeg mmap mmx mmxext mod_lisp mod_python modperl modules moneyplex mono mozcalendar mozdevelop mozilla mozsvg mp3 mp4 mpeg mplayer mpm-worker mschap mule mysql mysqli mythtv nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh nautilus ncurses netbeans netpbm nls nptl nptlonly nsplugin ntfs objc objc++ objc-gc ocamlopt octave odbc odk office ofx ogg opendoc opengl openmp oss pam panel-plugin pango pascal pax_kernel pcmcia pcre pdf pdflib pear-db perl pg-hier php pic pie plotutils pmu png pnp posix postgres povray ppds pppd ps python qemu-fast qhull qt3 qt3support qt4 quicktime quotes rc5 readline real reflection reiser4 reiserfs rplay rtc ruby samba sasl sbcl scanner scp script sdl seccomp semantic-desktop serial session sftp shared sharedext sharedmem smartcard smarty snmp soap sockets source speedo spell spl sql sqlite3 sse sse-filters sse2 sse3 ssl ssp stats stlport struts submenu subp subtitles subversion suidcheck svg svga swat swig sysvipc t1lib tcl tcltk tcpd tetex theora thesaurus threads tidy tiff timidity tk tokenizer toolbar tools transcode truetype truetype-fonts type1-fonts udev unicode urandom v4l2 vcd vdr vfat vhosts vim vim-with-x vnc vorbis widescreen wifi win32codecs winbind withsamplescripts wma wmf wxwindows x86 xanim xattr xbase xcomposite xemacs xext xforms xfs xim xine xinerama xml xmldoclet xmlreader xmlrpc xmlwriter xmms xorg xpm xslt xtpax xv xvid xvmc yaz zeo zip zlib zvbi" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="el de it es fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="el de it es fr" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 segmentation fault 2016-09-10 02:22:23 UTC
This is not related to kicad. In the menatime, I've had the same error during compilation of webkit-gtk. This tipped me off to search in a different direction.

All this time, I have been trying to run

emerge @preserved-rebuild

which started with webkit, then webkit-gtk, then kicad, then libreoffice...all of which (with the exception of webkit, I think) broke during compilation with

internal compiler error, segmentation fault

The 'preserved-rebuild' set was created by emerge during an upgrade of icu. I always upgrade icu with

emerge -1uNDvt --verbose-conflicts --ask --with-bdeps=y --backtrack=30 \
	dev-libs/icu \
	$(qdepends -CQ icu | xargs -n 1 qatom | cut -d ' ' -f 1-2 | tr ' ' '/') \
	dev-qt/qtwebkit  \
	$(qdepends -CQ qtwebkit | xargs -n 1 qatom | cut -d ' ' -f 1-2 | tr ' ' '/') \
	$(qdepends -CQ boost | xargs -n 1 qatom | cut -d ' ' -f 1-2 | tr ' ' '/') \
	app-text/texlive-core \
	$(qdepends -CQ kpathsea | xargs -n 1 qatom | cut -d ' ' -f 1-2 | tr ' ' '/') \
	app-text/poppler \
	$(qdepends -CQ poppler | xargs -n 1 qatom | cut -d ' ' -f 1-2 | tr ' ' '/')

...adding a few more on the way, as needed. This is a monster that pulls in 

icu and all packages that depend on it
qtwebkit and all packages that depend on it
boost and all packages that depend on it
texlive-core and all packages that depend on kpathsea
poppler and all packages that depend on it

because I know that, as soon as I upgrade icu, boost and poppler will start crying too - and then the others will follow suit.

An upgrade of icu thus starts an avalanche of 400+ packages to be merged in one run on my system...:roll:

The compilation error occurred with about 70 packages remaining in the queue. Not bad for a fully automatic dependency graph traversal... :-)


Reason
======

Either the compiler itself, or some library used during compilation of these packages, needs 

dev-libs/boost

which was also broken due to an upgrade of icu. In fact, boost itself was in the 'preserved-rebuild' set above, as tons of messages like the following were indicating:

 *  - /usr/lib/libicudata.so.55
 *  - /usr/lib/libicudata.so.55.1
 *      used by /usr/lib/libboost_locale.so.1.56.0 (preserved)
 *      used by /usr/lib/libboost_regex.so.1.56.0 (preserved)

But portage obviously was thinking to re-merge boost *after* the above packages, i.e. after webkit-gtk, kicad and libreoffice  - which, in this case, is wrong.

Solution
========

Re-merge boost manually. I mean, you have just merged it, right? You have just upgraded from boost-1.56.0 to 1.61.0. It doesn't matter. icu came after that, which makes a recompilation of boost a priority 1 task! So do

emerge -1 =dev-libs/boost-1.61.0

(notice the absence of '-u' option! To re-emerge, you should NOT use '-u', otherwise emerge will tell you that your package is up-to-date!)

When boost is finished, rerun

emerge @preserved-rebuild

Now all is good. No internal compiler errors. No segmentation faults. All fine. :-)

Please mark this as resolved (OK, I've done it myself :-)).