Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573294 - dev-libs/icu-56.1 fails to build - make segfaults with Error allocating memory for pkgDataFlags
Summary: dev-libs/icu-56.1 fails to build - make segfaults with Error allocating memor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
: 576192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-29 12:00 UTC by Anton Gubarkov
Modified: 2016-07-07 18:31 UTC (History)
5 users (show)

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


Attachments
build log (build.log.bz2,11.94 KB, application/x-bzip)
2016-01-29 12:00 UTC, Anton Gubarkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Gubarkov 2016-01-29 12:00:07 UTC
Created attachment 424148 [details]
build log

LD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$LD_LIBRARY_PATH  ../bin/pkg
data -O ../data/icupkg.inc -q -c -s /var/tmp/portage/dev-libs/icu-56.1/work/icu/
source-abi_x86_32.x86/data/out/build/icudt56l -d ../lib -e icudt56  -T ./out/tmp -p icudt56l -m dll -r 56.1 -L icudata ./out/tmp/icudata.lst
Error allocating memory for pkgDataFlags.
Makefile:189: recipe for target 'packagedata' failed
make[1]: *** [packagedata] Segmentation fault (core dumped)
make[1]: Leaving directory '/var/tmp/portage/dev-libs/icu-56.1/work/icu/source-abi_x86_32.x86/data'
Makefile:143: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 2
Comment 1 Anton Gubarkov 2016-01-29 12:00:59 UTC
root@r9-008cln temp # emerge --info =dev-libs/icu-56.1
Portage 2.2.27 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.3.0, glibc-2.22-r1, 4.4.0-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.0-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:    15782588 total,   3034108 free
KiB Swap:   20971516 total,  20971124 free
Timestamp of repository gentoo: Fri, 29 Jan 2016 08: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::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.4.3::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

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

rugubara
    location: /home/anton/devel/rugubara
    masters: gentoo
    priority: 0

anders-larsson
    location: /var/lib/layman/anders-larsson
    masters: gentoo
    priority: 50

betagarden
    location: /var/lib/layman/betagarden
    masters: gentoo
    priority: 50

bumblebee
    location: /var/lib/layman/bumblebee
    masters: gentoo
    priority: 50

fw-overlay
    location: /var/lib/layman/fw-overlay
    masters: gentoo
    priority: 50

ixit
    location: /var/lib/layman/ixit
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

proaudio
    location: /var/lib/layman/pro-audio
    masters: gentoo
    priority: 50

sabayon
    location: /var/lib/layman/sabayon
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    masters: gentoo
    priority: 50

x11
    location: /var/lib/layman/x11
    masters: gentoo
    priority: 50

Installed sets: @kde-frameworks-live
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mfma -mbmi -mbmi2 -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell -fstack-protector-strong"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mfma -mbmi -mbmi2 -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell -fstack-protector-strong"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://gentoo.bloodhost.ru/ http://mirror.bytemark.co.uk/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/etersoft"
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="X a52 aac acl acpi aes alsa amd64 archive avahi avx avx2 bash-completion berkdb bluetooth bluray branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx cycles dbus dri dri3 dts dvd dvdr eds egl emboss encode evdev evo exif extras faac fam ffmpeg fftw firefox flac fma3 fortran frei0r g711 g722 g7221 gbm gdbm gif gimp glamor gles2 gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 http iconv ieee1394 introspection ipv6 jack jpeg jpeg2k kms lcms ldap libnotify libsecret lv2 mad midi mmx mmxext mng modules mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl nsplugin nvenc ogg opengl openmp pam pango pcre pdf png policykit popcnt postproc ppds pulseaudio qt3support qt4 rar raw readline realtime samba sdl seccomp sendto session smp speex spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vpx wavpack wayland wxwidgets x264 x265 xa xattr xcb xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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" APACHE2_MPMS="prefork" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="multiboot efi-64 pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="en ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XFCE_PLUGINS="brightness clock trash battery power" 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"
USE_PYTHON="3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Captain Crutches 2016-01-29 21:46:13 UTC
Same behavior here; the relevant part of my build log is identical to Anton's.

Portage 2.2.26 (python 2.7.10-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.9.2, glibc-2.20-r2, 4.3.4-hardened x86_64)
=================================================================
System uname: Linux-4.3.4-hardened-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.2.0
KiB Mem:    65954388 total,  38083284 free
KiB Swap:    2283348 total,   2283348 free
sh bash 4.3_p42
ld GNU ld (Funtoo 2.25) 2.25.0
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-r2::gentoo
dev-util/cmake:           3.4.3::gentoo
sys-apps/baselayout:      2.2.0-r6::gentoo
sys-apps/openrc:          0.18.3-r1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25-r2::gentoo
sys-devel/gcc:            4.9.2-r2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://github.com/funtoo/ports-2012.git
    priority: -1000

mrueg
    location: /var/lib/layman/mrueg
    masters: gentoo
    priority: 0

obs-studio-overlay
    location: /var/lib/layman/obs-studio-overlay
    masters: gentoo
    priority: 1

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

Installed sets: @toolchain
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe  -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize  "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7 -O2 -pipe  -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize  "
DISTDIR="/usr/portage/distfiles"
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=corei7 -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/systemd/ /usr/lib/systemd/ /lib/systemd/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -fuse-linker-plugin -s -Wl,-z,now"
MAKEOPTS="-j13"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl alsa amd64 apng berkdb bluray bzip2 cdda cddb cdio cdr consolekit cracklib crypt cups cxx dbus declarative dga dri dts dvd dvdr dvdread encode exif faac faad fbcon ffmpeg flac fontconfig fortran gdbm gif gpm gstreamer gtk hardened ico iconv icu ieee1394 introspection ios ipod ipv6 jpeg jpeg2k kde kipi lame libass libguess libmpeg2 lm_sensors lzma mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap multilib ncurses nls nptl nsplugin ogg openal opencl opengl openmp osmesa pam pax_kernel pcre pdf phonon pic plasma png policykit postproc pppd pulseaudio python qml qt3support qt4 qt5 quicktime readline resolvconf scanner sdl semantic-desktop sndfile sse sse2 ssl svg taglib tcpd theora tiff truetype twolame udev unicode urandom usb v4l vorbis vpx wav wavpack webp widgets win32codecs wmf x264 x265 xattr xcomposite xinerama xml xscreensaver xtpax xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 authn_core authz_core socache_shmcb unixd" 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 popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="fglrx" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2016-01-30 13:53:07 UTC
Is the segfault reproducible? I.e. if you just try again, does it fail at the same point?
Comment 4 Anton Gubarkov 2016-01-30 14:40:57 UTC
(In reply to Andreas K. Hüttel from comment #3)
> Is the segfault reproducible? I.e. if you just try again, does it fail at
> the same point?

I have it every time.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2016-01-30 14:53:33 UTC
(In reply to Anton Gubarkov from comment #4)
> (In reply to Andreas K. Hüttel from comment #3)
> > Is the segfault reproducible? I.e. if you just try again, does it fail at
> > the same point?
> 
> I have it every time.

OK. Two ideas: 

1) is it possible that you're running out of memory? From your emerge --info I would say no, but it doesn't hurt to ask... :)

2) if that can't be the problem, my suggestion would be: 
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

^ follow the instructions here to enable debug info and *core dumps*, 
* then run the build again, 
* find the core dump generated by the segfault, 
* and extract a backtrace

Sorry I dont know any easier way to extract more information.
Comment 6 Anton Gubarkov 2016-01-30 15:22:23 UTC
this was run from /var/tmp/portage/dev-libs/icu-56.1/work/icu/source-abi_x86_32.x86/data

root@r9-008cln data # gdb -q  ../bin/pkgdata --core  core.24016
Reading symbols from ../bin/pkgdata...(no debugging symbols found)...done.
[New LWP 24016]

warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `../bin/pkgdata -O ../data/icupkg.inc -q -c -s /var/tmp/portage/dev-libs/icu-56.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf71f3496 in ?? () from /lib32/libc.so.6
(gdb) thread apply all bt full

Thread 1 (Thread 0xf6e28700 (LWP 24016)):
#0  0xf71f3496 in ?? () from /lib32/libc.so.6
No symbol table info available.
#1  0x0804a970 in pkg_executeOptions(UPKGOptions_*) ()
No symbol table info available.
#2  0x0804a15b in main ()
No symbol table info available.
(gdb) 


I need more guidance to enable debug symbols for ../bin/pkgdata
Comment 7 Sietze Post 2016-02-01 09:56:34 UTC
I had the same problem on 2 machines, but managed to get the package to build using CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe"
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2016-02-01 11:42:57 UTC
CFLAGS="-march=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mfma -mbmi -mbmi2 -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell -fstack-protector-strong"

CFLAGS="-march=corei7 -O2 -pipe  -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize  "

OK. I'll leave it as an exercise to all of you to bisect the cflags and figure out which one causes the problems. If you find it, tell me and I'll try to filter it in the ebuild.
Comment 9 Viktor Yu. Kovalskii 2016-02-02 11:49:20 UTC
Upstream bug seems was fixed[1] by this changeset[2].

Also discussion is present at forums.gentoo.org[3] about this issue.

-----
[1] http://bugs.icu-project.org/trac/ticket/11744
[2] http://bugs.icu-project.org/trac/changeset/37700
[3] https://forums.gentoo.org/viewtopic-t-1037994.html
Comment 10 Captain Crutches 2016-02-09 06:07:49 UTC
The problem cflag for me is one of

-ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize

Good news is those sometimes mess things up a bit and I've got a package.env setting to disable them if need be.  Bad news is Anton doesn't seem to be using any of those flags, so it could be something different.
Comment 11 Arseny Solokha 2016-02-20 09:15:45 UTC
(In reply to Viktor Yu. Kovalskii from comment #9)
> Upstream bug seems was fixed[1] by this changeset[2].
> 
> Also discussion is present at forums.gentoo.org[3] about this issue.
> 
> -----
> [1] http://bugs.icu-project.org/trac/ticket/11744
> [2] http://bugs.icu-project.org/trac/changeset/37700
> [3] https://forums.gentoo.org/viewtopic-t-1037994.html

Applying the patch [2] didn't help me on x86_64 w/ gcc-5.3.


(In reply to Captain Crutches from comment #10)
> The problem cflag for me is one of
> 
> -ftree-loop-distribution -ftree-loop-distribute-patterns
> -ftree-loop-if-convert -ftree-vectorize
> 
> Good news is those sometimes mess things up a bit and I've got a package.env
> setting to disable them if need be.  Bad news is Anton doesn't seem to be
> using any of those flags, so it could be something different.

In my case the culprit is -floop-interchange, which will be replaced w/ -floop-nest-optimize in gcc 6. Or, maybe, excluding other Graphite-related flags would also help. I usually specify the following Graphite flags w/ gcc 5:

-floop-interchange -floop-block -floop-strip-mine -fgraphite-identity -ftree-loop-distribution

As I stated, excluding -floop-interchange from the list proved to be enough to get icu built.
Comment 12 Pacho Ramos gentoo-dev 2016-03-02 12:05:38 UTC
*** Bug 576192 has been marked as a duplicate of this bug. ***
Comment 13 Steve Gilberd 2016-03-03 07:49:47 UTC
I can confirm this bug is still present as of 56.1-r1.
Comment 14 Steve Gilberd 2016-03-03 08:16:28 UTC
Have managed to get it built (56.1-r1) by omitting --param l2-cache-size=3072 and -fstack-protector-strong. Including either or both of these options causes the build to segfault as per this bug. All other CFLAGS I have set seem to work fine with it.

This system is a late 2013 macbook pro (MacBookPro11,1), i5-4258U, 8GB RAM, gentoo kernel 4.4.0-gentoo-r1.

Working CFLAGS="-O2 -pipe -march=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mfma -mbmi -mbmi2 -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 -mtune=haswell".
Comment 15 Steve Gilberd 2016-03-03 08:18:33 UTC
Forgot to include GCC version in the previous comment - apologies for the comment spam. Please let me know if you'd like any more info, or if you'd like me to test anything on this system.

gcc (Gentoo 5.3.0 p1.0, pie-0.6.5) 5.3.0
Comment 16 Maciej Piechotka 2016-03-03 16:36:07 UTC
As a side note - patch from https://ssl.icu-project.org/trac/raw-attachment/ticket/11959/icu-release-56-1-flagparser-fix.patch was sufficient to fix the problem for me.
Comment 17 Andreas K. Hüttel archtester gentoo-dev 2016-03-03 19:45:43 UTC
Thanks, patch added in 56.1-r1.
Comment 18 Steve Gilberd 2016-03-03 19:55:22 UTC
@Andreas - unfortunately this fix doesn't work on my system. As per above comments (13-15), 56.1-r1 fails to build with the same error.
Comment 19 Andreas K. Hüttel archtester gentoo-dev 2016-07-03 19:22:18 UTC
Any better luck with 57.1?
Comment 20 Anton Gubarkov 2016-07-06 19:17:32 UTC
57.1 works for me. Thanks