Created attachment 396528 [details] Build log GHC fails to build in prefix on Fedora 21 machine. Problem with configuration of ar utility, which is set after running configure script to /usr/bin/x86_64-pc-linux-gnu-ar, which is wrong. Correct ar is presented in path: $ which ar /data1/gentoo/usr/bin/ar Related error log: "inplace/bin/ghc-cabal" configure libraries/Cabal/Cabal dist-boot "" --with-ghc="/data1/gentoo/var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/bin/ghc" --with-ghc-pkg="/data1/gentoo/var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/bin/ghc-pkg" --package-db=/data1/gentoo/var/tmp/portage/dev-lang/ghc-7.8.4/work/ghc-7.8.4/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-O2 -pipe -O2 -pipe -march=native -march=native -march=native -fno-stack-protector " --configure-option=LDFLAGS="-Wl,-O1 -Wl,-O1 " --configure-option=CPPFLAGS=" " --gcc-options="-O2 -pipe -O2 -pipe -march=native -march=native -march=native -fno-stack-protector -Wl,-O1 -Wl,-O1 " --constraint "Cabal == 1.18.1.5" --constraint "hpc == 0.6.0.1" --constraint "bin-package-db == 0.0.0.0" --constraint "hoopl == 3.10.0.1" --constraint "transformers == 0.3.0.0" --constraint "terminfo == 0.4.0.0" --with-gcc="x86_64-pc-linux-gnu-gcc" --configure-option=--with-cc="x86_64-pc-linux-gnu-gcc" --with-ar="/usr/bin/x86_64-pc-linux-gnu-ar" --with-ranlib="/data1/gentoo/usr/bin/x86_64-pc-linux-gnu-ranlib" Configuring Cabal-1.18.1.5... ghc-cabal: Cannot find the program 'ar' at '/usr/bin/x86_64-pc-linux-gnu-ar' or on the path Reproducible: always, checked versions ghc-7.8.3 and ghc-7.8.4 $ emerge --info Portage 2.2.14-prefix (python 3.3.3-final-0, prefix/linux/amd64, gcc-4.7.3, unavailable, 3.18.6-200.fc21.x86_64 x86_64) ================================================================= System uname: Linux-3.18.6-200.fc21.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5620_@_2.40GHz-with-fedora-21-Twenty_One KiB Mem: 12297764 total, 5365660 free KiB Swap: 12582908 total, 12582908 free Timestamp of tree: Sun, 15 Feb 2015 11:04:30 +0000 ld GNU ld (Gentoo 2.24 p1.3) 2.24 app-shells/bash: 4.2_p53 dev-lang/perl: 5.20.2 dev-lang/python: 2.7.8, 3.3.3 dev-util/pkgconfig: 0.28-r2 sys-devel/autoconf: 2.69 sys-devel/automake: 1.14.1 sys-devel/binutils: 2.24-r2 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.8-r1 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.1-r1 sys-kernel/linux-headers: 3.19 (virtual/os-headers) Repositories: gentoo_prefix ACCEPT_KEYWORDS="~amd64-linux" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -O2 -pipe -march=native" DISTDIR="/data1/gentoo/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1" MAKEOPTS="-j8" PKGDIR="/data1/gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/data1/gentoo/" 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="/data1/gentoo/var/tmp" PORTDIR="/data1/gentoo/usr/portage" PORTDIR_OVERLAY="" USE="X amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 libav mmx modules ncurses nls nptl openmp pcre prefix prefix-guest readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiix p 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 brai ndump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncur ses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND=" GNU" VIDEO_CARDS="nvidia" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Does it fail the same way on ghc-7.10.2? Just wodering: do you know why fedora's AR does not work?
(In reply to Sergei Trofimovich from comment #1) > Does it fail the same way on ghc-7.10.2? Yes. > Just wodering: do you know why fedora's AR does not work? Fedora's AR is at /usr/bin/ar, not /usr/bin/${CHOST}-ar
Created attachment 441566 [details, diff] ghc-prefix-ar.patch This patch fixes this bug, tested on RHEL 6. Please review.
(In reply to Benda Xu from comment #3) > Created attachment 441566 [details, diff] [details, diff] > ghc-prefix-ar.patch > > This patch fixes this bug, tested on RHEL 6. Please review. Looks good. Feel free to push it.
Commited. Thanks!