Stabilizing bug #488808 on ia64, dev-haskell/glib-0.12.4-r1 failed compile phase with the following error: gtk2hsC2hs2: c2hs/c/CNames.hs:(162,1)-(180,71): Non-exhaustive patterns in function naCExpr Reproducible: Always Steps to Reproduce: 1. emerge =dev-haskell/glib-0.12.4-r1 2. 3. Actual Results: Compilation failed Expected Results: =dev-haskell/glib-0.12.4-r1 should have emerged successfully
emerge --info Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.17, 3.10.25-gentoo ia64) ================================================================= System uname: Linux-3.10.25-gentoo-ia64-Madison-with-gentoo-2.2 KiB Mem: 24987264 total, 21144784 free KiB Swap: 524272 total, 524272 free Timestamp of tree: Sun, 19 Jan 2014 19:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r3, 3.2.5-r3, 3.3.2-r2 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.6.3, 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo my_ebuilds ACCEPT_KEYWORDS="ia64" ACCEPT_LICENSE="* -@EULA" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-mtune=itanium2 -O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /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="-mtune=itanium2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-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" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/" LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" 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" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/my_ebuilds" USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg mudflap nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" 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" 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" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
emerge -pqv =dev-haskell/glib-0.12 longspeak emeric # emerge -pqv =dev-haskell/glib-0.12.4-r1 [ebuild N ] dev-haskell/glib-0.12.4-r1 USE="-doc -hscolour -profile"
Created attachment 368194 [details] build.log
Created attachment 368196 [details] environment
Any ideas about how to solve this problem? :/
Or maybe ia64 keyword should be dropped if this cannot be compiled there :| (and we would need to mask some USEs there due dep chain :S)
(In reply to Pacho Ramos from comment #6) > Or maybe ia64 keyword should be dropped if this cannot be compiled there :| > (and we would need to mask some USEs there due dep chain :S) Will it help if I test a newer version of dev-haskell/glib?
(In reply to Émeric Maschino from comment #7) > (In reply to Pacho Ramos from comment #6) > > Or maybe ia64 keyword should be dropped if this cannot be compiled there :| > > (and we would need to mask some USEs there due dep chain :S) > > Will it help if I test a newer version of dev-haskell/glib? Maybe we could stable that one on ia64 instead then, looks ok to me (if it doesn't cause a new dependency chain to be stabilized before)
If a newer version works, we might be able to backport the fix. The code is trying to pattern match on C source code constructs, so it's interesting that it could somehow be architecture-dependent. Compilation is failing in this package's bundled copy of the 'c2hs' program. It may not be older but is at least different from the upstream version. Can you try compiling the latest dev-haskell/c2hs? If the problem is present there, we can start by nagging its upstream and then eventually push the fix into the bundled copy. If it isn't, maybe gtk2hs just needs to update its bundled copy.
all ~arch worked for me on ia64 I guess =dev-haskell/gtk2hs-buildtools-0.12.5.1-r1 sould be good-enough to try to stabilize on ia64.
(In reply to Sergei Trofimovich from comment #10) > all ~arch worked for me on ia64 > > I guess =dev-haskell/gtk2hs-buildtools-0.12.5.1-r1 sould be good-enough to > try to stabilize on ia64. Well, with dev-haskell/gtk2hs-buildtools-0.12.5.1-r1, dev-haskell/glib fails to find gtk2hsC2hs2: >>> Failed to emerge dev-haskell/glib-0.12.4-r1, Log file: >>> '/var/tmp/portage/dev-haskell/glib-0.12.4-r1/temp/build.log' * Package: dev-haskell/glib-0.12.4-r1 * Repository: gentoo * Maintainer: haskell@gentoo.org * USE: elibc_glibc ia64 kernel_linux userland_GNU * FEATURES: preserve-libs sandbox userpriv usersandbox * Using cabal-1.14.0. /usr/bin/ghc -package Cabal-1.14.0 --make /var/tmp/portage/dev-haskell/glib-0.12.4-r1/work/glib-0.12.4/Setup.hs -o setup [1 of 2] Compiling SetupWrapper ( SetupWrapper.hs, SetupWrapper.o ) [2 of 2] Compiling Main ( /var/tmp/portage/dev-haskell/glib-0.12.4-r1/work/glib-0.12.4/Setup.hs, /var/tmp/portage/dev-haskell/glib-0.12.4-r1/work/glib-0.12.4/Setup.o ) Linking setup ... ./setup configure --ghc --prefix=/usr --with-compiler=/usr/bin/ghc --with-hc-pkg=/usr/bin/ghc-pkg --prefix=/usr --libdir=/usr/lib --libsubdir=glib-0.12.4/ghc-7.4.2 --datadir=/usr/share/ --datasubdir=glib-0.12.4/ghc-7.4.2 --ghc-option=-optl-Wl,-O1 --ghc-option=-optl-Wl,--as-needed --disable-executable-stripping --docdir=/usr/share/doc/glib-0.12.4-r1 --verbose [1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o ) [2 of 2] Compiling Main ( SetupMain.hs, dist/setup-wrapper/Main.o ) Linking dist/setup-wrapper/setup ... Cannot find gtk2hsC2hs2 Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin). Émeric
Probably dev-haskell/gtk2hs-buildtools-0.12.5.1-r1 will need newer versions for other depending packages (this reminds me a problem I hit some months ago due some slot moving). I would try to simply try newer dev-haskell/glib if possible. Other option would be to simply update to a new dev-haskell/ set :|
(In reply to Pacho Ramos from comment #12) > Probably dev-haskell/gtk2hs-buildtools-0.12.5.1-r1 will need newer versions > for other depending packages (this reminds me a problem I hit some months > ago due some slot moving). I would try to simply try newer dev-haskell/glib > if possible. > > Other option would be to simply update to a new dev-haskell/ set :| So I've tried again with dev-haskell/glib-0.12.5.0-r1 to fix this. Original error is back: Building glib-0.12.5.0... Preprocessing library glib-0.12.5.0... gtk2hsC2hs: c2hs/c/CNames.hs:(162,1)-(180,71): Non-exhaustive patterns in function naCExpr Émeric
Maybe haskell team could give us an updated list for their packages that are supposed to work ok together
Or I can mask dev-util/dbus-test-runner[test] on ia64 until this is solved, otherwise ia64 people will hit this :|
(In reply to Pacho Ramos from comment #15) > Or I can mask dev-util/dbus-test-runner[test] on ia64 until this is solved, > otherwise ia64 people will hit this :| Yeah, let's give up on ia64 tests for now. Looks like glib/cairo headers are somehow a bit different on ia64 and gtk2hs-c2hs fails to parse it.
+ 23 Feb 2014; Pacho Ramos <pacho@gentoo.org> arch/ia64/package.use.mask: + Needed dependencies cannot be installed on ia64, bug #498638 +
Took another stab at this bug after ghc-7.8.4 stabilization on ia64. It appears to be a generic bug of gtk2hsC2hs. It's not able to handle __builtin_offsetof sizes: // cat a.h struct a { char c1, c2; }; struct s { char par[__builtin_offsetof(struct a, c2)]; char c; }; // cat A.chs module A where $ gtk2hsC2hs --precomp=a.bin --output=a.hs a.h A.chs gtk2hsC2hs: c2hs/c/CNames.hs:(162,1)-(180,71): Non-exhaustive patterns in function naCExpr In context of dev-haskell/glib the offender is the following snippet: // /usr/include/sys/ucontext.h /* * These are here mostly for backwards compatibility with older Unices. * IA-64 Linux does not distinguish between "struct sigcontext" and * "ucontext_t" as all the necessary info is inside the former. */ typedef struct sigcontext mcontext_t; #if __GNUC_PREREQ (3, 5) # define _SC_GR0_OFFSET \ __builtin_offsetof (struct sigcontext, sc_gr[0]) #elif defined __GNUC__ # define _SC_GR0_OFFSET \ (((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0) #else # define _SC_GR0_OFFSET 0xc8 /* pray that this is correct... */ #endif typedef struct ucontext { union { mcontext_t _mc; struct { unsigned long _pad[_SC_GR0_OFFSET/8]; struct ucontext *_link; /* this should overlay sc_gr[0] */ } _uc; } _u; } ucontext_t;
c2hs upstream (gtk2hs-buildtools takes code from there): https://github.com/haskell/c2hs/issues/150
Another mystery is resolved: the original ucontext.h is platform-secific. Most of other platforms don't use offseof, thus no bug.
Pushed ia64 workaround as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62c95511627bb27be1f5eca75a78d7ddbfdccfb1