Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475084 - dev-haskell/citeproc-hs-0.3.8: build fails on preprocessor statements
Summary: dev-haskell/citeproc-hs-0.3.8: build fails on preprocessor statements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: http://code.google.com/p/citeproc-hs/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-28 10:29 UTC by Marc
Modified: 2013-07-24 13:14 UTC (History)
1 user (show)

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


Attachments
Build log (build.log,5.04 KB, text/x-log)
2013-06-28 10:31 UTC, Marc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc 2013-06-28 10:29:21 UTC
I am trying to emerge dev-haskell/citeproc-hs (currently at version 0.3.8). The configuration stage works fine, but the build itself fails immediately with the following error:

>>> Compiling source in /var/tmp/portage/dev-haskell/citeproc-hs-0.3.8/work/citeproc-hs-0.3.8 ...
./setup build
Building citeproc-hs-0.3.8...
Preprocessing library citeproc-hs-0.3.8...

src/Text/CSL/Pickle.hs:27:2: lexical error at character 'i'


Looking into this file, I see that it chokes on a preprocessor statement:

#ifdef USE_HEXPAT

I have tried switching various USE flags on and off (e.g., hexpat), tried to merge with MAKEOPTS="-j1", and tried to emerge cpphs as an alternative preprocessor, but none of this fixes the build.

Reproducible: Always

Steps to Reproduce:
1. emerge citeproc-hs
Actual Results:  
src/Text/CSL/Pickle.hs:27:2: lexical error at character 'i'

Expected Results:  
Successful emerge

Portage 2.1.12.2 (default/linux/amd64/13.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.8.0-gentoo x86_64)
=================================================================
System uname: Linux-3.8.0-gentoo-x86_64-AMD_Athlon-tm-_II_X2_245e_Processor-with-gentoo-2.2
KiB Mem:     4049244 total,   1438096 free
KiB Swap:    4000148 total,   4000148 free
Timestamp of tree: Fri, 28 Jun 2013 08:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=amdfam10 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /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.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/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=amdfam10 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://htpc/ http://mirror.leaseweb.com/gentoo/ http://gentoo.tiscali.nl/ http://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_NL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/usr/local/portage"
SYNC="rsync://htpc/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 apng avahi berkdb bzip2 cairo cdda cddb cdr consolekit cracklib crypt css curl dbus dga dhcpcd djvu dri dts dvd dvdr dvi eds egl encode exif expat faad fat ffmpeg flac fontconfig fuse gd gif glib gmp gnome gnome-keyring gnutls gstreamer gtk hunspell iconv icu idn ipv6 jpeg kmod lame lcms ldap libburn libedit libffi libkms libnotify lzma mad mms mmx mmxext mng mono mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nss offensive ogg opengl openmp openrc pam pango pcre pdf png policykit pulseaudio readline resolvconf samba sha512 smp sound spell sqlite sse sse2 ssl ssse3 startup-notification svg syslog taglib theora threads tiff truetype udev unicode upnp v4l vorbis vpx webkit wifi xattr xcb xml xmp xv xvmc zeroconf zlib" ABI_X86="64" CAMERAS="ptp2" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LINGUAS="en en_US nl nl_NL es es_ES" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" SANE_BACKENDS="hp3500" USERLAND="GNU" VIDEO_CARDS="radeon r600"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Marc 2013-06-28 10:31:59 UTC
Created attachment 352150 [details]
Build log
Comment 2 Marc 2013-07-24 10:00:09 UTC
Awaiting a better fix for this bug, I have a temporary fix for people who encounter the same problem. I was able to build and install citeproc-hs manually after removing the offending CPP lines (see below; I am not using hexpat). Then, I just added citeproc-hs to /etc/portage/profile/package.provided to allow building other packages that depend on citeproc-hs


--- Pickle.hs.old	2013-07-24 11:56:43.139050729 +0200
+++ Pickle.hs	2013-07-24 11:56:53.537818015 +0200
@@ -24,12 +24,8 @@
 import System.Directory ( doesFileExist )
 import qualified Data.ByteString.Lazy as L
 
-#ifdef USE_HEXPAT
-import Text.CSL.Pickle.Hexpat
-#else
 import Text.CSL.Pickle.Xml
 import Text.XML.Light
-#endif
 
 data St
     = St { attributes :: [Attr]
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-24 13:10:11 UTC
Pushed a bit different fix:

> 24 Jul 2013; Sergei Trofimovich <slyfox@gentoo.org>
> +files/citeproc-hs-0.3.8-preproc.patch, citeproc-hs-0.3.8.ebuild:
> Fix build failure in certain USE combinations (bug #475084 by Marc).

Thanks!

Looks like i've lost some parts of my inbox and overlooked this bug.