Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384273 - dev-vcs/darcs-2.5.2 emerge fail
Summary: dev-vcs/darcs-2.5.2 emerge fail
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 OS X
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-24 03:35 UTC by kazuhiro
Modified: 2011-09-29 16:32 UTC (History)
0 users

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


Attachments
build.log (build.log,87.35 KB, text/plain)
2011-09-24 03:36 UTC, kazuhiro
Details
emerge -1 darcs (new_build.log.1,1000.00 KB, text/plain)
2011-09-25 07:34 UTC, kazuhiro
Details
emerrge -1 darcs 2 (new_build.log.2,892.27 KB, text/plain)
2011-09-25 07:35 UTC, kazuhiro
Details
build.log about linking error (build.log,7.35 KB, text/plain)
2011-09-29 13:25 UTC, kazuhiro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kazuhiro 2011-09-24 03:35:18 UTC
When I emerge dev-vcs/darcs-2.5.2 (gentoo-haskell overlay), emake failed with the following messages.


src/Darcs/ArgumentDefaults.lhs:153:32:
    Warning: Defined but not used: `ao'
[136 of 137] Compiling Darcs.RunCommand ( src/Darcs/RunCommand.hs, dist/build/darcs/darcs-tmp/Darcs/RunCommand.o )
[137 of 137] Compiling Main             ( src/darcs.hs, dist/build/darcs/darcs-tmp/Main.o )
Linking dist/build/darcs/darcs ...
ld: library not found for -lncursesw
collect2: ld returned 1 exit status
 * ERROR: dev-vcs/darcs-2.5.2 failed (compile phase):
 *   setup build failed


But, I don't know wether bug or not.
If this report is not bug, delete this.

Reproducible: Always




Portage 2.2.01.19295-prefix (prefix/darwin/macos/10.7/x64, gcc-4.2.1, unavailable, 11.0.1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Darwin-11.0.1-x86_64-i386-64bit
Timestamp of tree: Sat, 24 Sep 2011 01:39:57 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin11.0 [disabled]
app-shells/bash:      4.2_p10
dev-lang/python:      2.7.2
dev-util/cmake:       2.8.5-r2
dev-util/pkgconfig:   0.25-r2
sys-devel/autoconf:   2.68
sys-devel/automake:   1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:    2.4-r01.1
sys-devel/make:       3.82
Repositories: gentoo_prefix sunrise gentoo-haskell d-overlay x-my-overlay
Installed sets: 
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin11"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-apple-darwin11"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/Users/kazuhiro/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles fixpackages metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ja_JP.UTF-8"
LDFLAGS="-Wl,-dead_strip_dylibs"
PKGDIR="/Users/kazuhiro/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/kazuhiro/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/kazuhiro/Gentoo/var/tmp"
PORTDIR="/Users/kazuhiro/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Users/kazuhiro/Gentoo/var/lib/layman/sunrise /Users/kazuhiro/Gentoo/var/lib/layman/haskell /Users/kazuhiro/Gentoo/var/lib/layman/d /Users/kazuhiro/Gentoo/var/lib/my-overlay"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua cjk coreaudio cracklib cxx git jpeg kpathsea mmx mmxext modules ncurses nls objc objc++ ocamlopt png prefix readline ruby sse sse2 ssl subversion tiff unicode x64-macos xft zlib zsh-completion" 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" 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 ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18 ruby19" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 kazuhiro 2011-09-24 03:36:14 UTC
Created attachment 287573 [details]
build.log
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-09-24 05:50:18 UTC
We can't fix stuff in the haskell overlay.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-24 08:24:01 UTC
> ld: library not found for -lncursesw
> collect2: ld returned 1 exit status

Uh-on, but ghc has ncursesw as a RDEPEND:

> sys-libs/ncurses[unicode]

Do you have it installed/working?
Comment 4 kazuhiro 2011-09-24 09:00:54 UTC
(In reply to comment #3)
> > ld: library not found for -lncursesw
> > collect2: ld returned 1 exit status
> 
> Uh-on, but ghc has ncursesw as a RDEPEND:
> 
> > sys-libs/ncurses[unicode]
> 
> Do you have it installed/working?

yes, installed.
[I] sys-libs/ncurses
     Available versions:  (5) 5.6-r2 5.7-r3 5.7-r5 5.7-r6 5.9[1]
	{ada +cxx debug doc gpm minimal nocxx profile static-libs trace unicode}
     Installed versions:  5.9(5)[?](10:11:23 09/24/11)(cxx unicode -ada -debug -doc -gpm -minimal -profile -static-libs -trace)


I reinstall sys-libs/ncurses and dev-lang/ghc once more..
Comment 5 kazuhiro 2011-09-25 02:38:48 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > > ld: library not found for -lncursesw
> > > collect2: ld returned 1 exit status
> > 
> > Uh-on, but ghc has ncursesw as a RDEPEND:
> > 
> > > sys-libs/ncurses[unicode]
> > 
> > Do you have it installed/working?
> 
> yes, installed.
> [I] sys-libs/ncurses
>      Available versions:  (5) 5.6-r2 5.7-r3 5.7-r5 5.7-r6 5.9[1]
>     {ada +cxx debug doc gpm minimal nocxx profile static-libs trace unicode}
>      Installed versions:  5.9(5)[?](10:11:23 09/24/11)(cxx unicode -ada -debug
> -doc -gpm -minimal -profile -static-libs -trace)
> 
> 
> I reinstall sys-libs/ncurses and dev-lang/ghc once more..

I reinstalled, but unchanged.
does this relate to "USE=bootstrap emerge ghc" ?
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-25 06:23:42 UTC
> I reinstalled, but unchanged.
> does this relate to "USE=bootstrap emerge ghc" ?

Unlikely. Seems it's dependent on how prefix on macos searches libraries.
linux-on-linux prefix builds darcs fine here.

Please, repost build.log for the following command:

    CABAL_EXTRA_CONFIGURE_FLAGS="--ghc-options=-v" emerge -1 darcs

(it should contain exact ld options)
Comment 7 kazuhiro 2011-09-25 07:34:04 UTC
Created attachment 287669 [details]
emerge -1 darcs

> > I reinstalled, but unchanged.
> > does this relate to "USE=bootstrap emerge ghc" ?
>
> Unlikely. Seems it's dependent on how prefix on macos searches libraries.
> linux-on-linux prefix builds darcs fine here.
> 
> Please, repost build.log for the following command:
> 
>     CABAL_EXTRA_CONFIGURE_FLAGS="--ghc-options=-v" emerge -1 darcs
> 
> (it should contain exact ld options)

I tried "CABAL_EXTRA_CONFIGURE_FLAGS="--ghc-options=-v" emerge -1 darcs", and attach "new_build.log.1" and "new_build.log.2".
But, I'm unfamiliar with Gentoo, so I don't know about "ld options"
Comment 8 kazuhiro 2011-09-25 07:35:40 UTC
Created attachment 287671 [details]
emerrge -1 darcs 2
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-25 08:52:04 UTC
> '/usr/bin/gcc-4.2'

Aha. Do you happen to know if you have $PREFIX/usr/bin/gcc?

Either ghc embedded wrong gcc path, or prefix didn't pass
proper library paths (-L$PREFIX/usr/lib) as LDFLAGS to ./setup configure.
Comment 10 kazuhiro 2011-09-27 01:49:47 UTC
(In reply to comment #9)
> > '/usr/bin/gcc-4.2'
> 
> Aha. Do you happen to know if you have $PREFIX/usr/bin/gcc?
> 
> Either ghc embedded wrong gcc path, or prefix didn't pass
> proper library paths (-L$PREFIX/usr/lib) as LDFLAGS to ./setup configure.

Surely, ghc embedded wrong gcc path.
It needs changing ghc-7.2.1.ebuild.
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-28 18:37:14 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > > '/usr/bin/gcc-4.2'
> > 
> > Aha. Do you happen to know if you have $PREFIX/usr/bin/gcc?
> > 
> > Either ghc embedded wrong gcc path, or prefix didn't pass
> > proper library paths (-L$PREFIX/usr/lib) as LDFLAGS to ./setup configure.
> 
> Surely, ghc embedded wrong gcc path.
> It needs changing ghc-7.2.1.ebuild.

Oh, now i see:
  ghc/aclocal.m4:
    AC_DEFUN([FIND_GCC],[
        if test "$TargetOS_CPP" = "darwin" &&
            test "$XCodeVersion1" -ge 4
        then
            # From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy
            # backend (instead of the LLVM backend)
            FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
        else
            FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
        fi
        export CC
        WhatGccIsCalled="$CC"
        AC_SUBST(WhatGccIsCalled)
    ])

I think I'll just try to rip-off that hack for macos.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-28 18:54:03 UTC
> I think I'll just try to rip-off that hack for macos.

Done as:  https://github.com/gentoo-haskell/gentoo-haskell/commit/93558fa9a6188feb647476df942865bb5dfa744d

I can't really test it, so, please, try it.

You'll need to rebuild at least ghc to see if it helps and
if it works at all on nondefault gcc.
Comment 13 kazuhiro 2011-09-29 13:25:34 UTC
Created attachment 288231 [details]
build.log about linking error

(In reply to comment #12)
> > I think I'll just try to rip-off that hack for macos.
> 
> Done as: 
> https://github.com/gentoo-haskell/gentoo-haskell/commit/93558fa9a6188feb647476df942865bb5dfa744d
> 
> I can't really test it, so, please, try it.
> 
> You'll need to rebuild at least ghc to see if it helps and
> if it works at all on nondefault gcc.

Thanks!.
I emerge ghc, and succeeded.
But, another error appear.
I attached new build.log . 
Some packages(include darcs) fails with the following messages.


Linking dist/build/darcs/darcs ...
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _h_iconv in libHShaskeline-0.6.4.3.a(h_iconv.o)
      _hs_iconv in libHSbase-4.4.0.0.a(iconv.o)
  "_libiconv_close", referenced from:
      _h_iconv_close in libHShaskeline-0.6.4.3.a(h_iconv.o)
      _hs_iconv_close in libHSbase-4.4.0.0.a(iconv.o)
  "_libiconv_open", referenced from:
      _h_iconv_open in libHShaskeline-0.6.4.3.a(h_iconv.o)
      _hs_iconv_open in libHSbase-4.4.0.0.a(iconv.o)
ld: symbol(s) not found for architecture x86_64
Comment 14 Ivan 2011-09-29 14:00:12 UTC
(In reply to comment #13)
> Linking dist/build/darcs/darcs ...
> Undefined symbols for architecture x86_64:
>   "_libiconv", referenced from:
>       _h_iconv in libHShaskeline-0.6.4.3.a(h_iconv.o)
>       _hs_iconv in libHSbase-4.4.0.0.a(iconv.o)
>   "_libiconv_close", referenced from:
>       _h_iconv_close in libHShaskeline-0.6.4.3.a(h_iconv.o)
>       _hs_iconv_close in libHSbase-4.4.0.0.a(iconv.o)
>   "_libiconv_open", referenced from:
>       _h_iconv_open in libHShaskeline-0.6.4.3.a(h_iconv.o)
>       _hs_iconv_open in libHSbase-4.4.0.0.a(iconv.o)
> ld: symbol(s) not found for architecture x86_64

Did you rebuild all your Haskell packages after re-building GHC?  It might be an idea to explicitly do so with "haskell-updater --all".
Comment 15 kazuhiro 2011-09-29 15:59:05 UTC
> Did you rebuild all your Haskell packages after re-building GHC?  It might be
> an idea to explicitly do so with "haskell-updater --all".

Oh, I forgot "haskell-updater --all" .
I finished installing dev-vcs/darcs.

I thank all heartily.
Comment 16 Sergei Trofimovich (RETIRED) gentoo-dev 2011-09-29 16:32:31 UTC
> I finished installing dev-vcs/darcs.

Thanks for the report, provided info and testing!

Am closing bug as RESOLVED.