Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312007 - dev-lang/ghc-6.10.4-r1 build failes: can't open file: lib/*-apple-darwin/ghc-6.10.4
Summary: dev-lang/ghc-6.10.4-r1 build failes: can't open file: lib/*-apple-darwin/ghc-...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-29 22:50 UTC by Nickolay Kolchin-Semyonov
Modified: 2011-04-10 22:59 UTC (History)
0 users

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


Attachments
emerge --info =dev-lang/ghc-6.10.4-r1 (ghc-info,2.70 KB, text/plain)
2010-03-29 22:54 UTC, Nickolay Kolchin-Semyonov
Details
build.log gzipped (ghc-build.log.gz,6.89 KB, application/octet-stream)
2010-03-29 22:55 UTC, Nickolay Kolchin-Semyonov
Details
hopefully fixed ghc-6.10.4-r1.ebuild (ghc-6.10.4-r1.ebuild,14.80 KB, text/plain)
2010-03-31 20:47 UTC, Fabian Groffen
Details
build.log for updated ebuild gzipped (build.log.gz,186.64 KB, application/octet-stream)
2010-04-01 06:08 UTC, Nickolay Kolchin-Semyonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nickolay Kolchin-Semyonov 2010-03-29 22:50:24 UTC
install_name_tool: can't open file: lib/*-apple-darwin/ghc-6.10.4 (No such file or directory)
 * ERROR: dev-lang/ghc-6.10.4-r1 failed:
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called call-ebuildshell 'src_unpack'
 *   environment, line 816:  Called src_unpack
 *   environment, line 4068:  Called die
 * The specific snippet of code:
 *                               install_name_tool -change ${readline_framework} "${EPREFIX}"/lib/libreadline.dylib ${binary} || die;


Reproducible: Always

Steps to Reproduce:
emerge -v =dev-lang/ghc-6.10.4-r1

Actual Results:  
build (install) failure.

Expected Results:  
correct installation.

Darwin lazybook.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386 MacBook4,1 Darwin
Comment 1 Nickolay Kolchin-Semyonov 2010-03-29 22:54:54 UTC
Created attachment 225747 [details]
emerge --info =dev-lang/ghc-6.10.4-r1
Comment 2 Nickolay Kolchin-Semyonov 2010-03-29 22:55:59 UTC
Created attachment 225749 [details]
build.log gzipped
Comment 3 Fabian Groffen gentoo-dev 2010-03-30 19:15:56 UTC
it seems a lot has changed in the layout again
Comment 4 Fabian Groffen gentoo-dev 2010-03-31 20:47:18 UTC
Created attachment 226015 [details]
hopefully fixed ghc-6.10.4-r1.ebuild

I'm currently compiling GHC.  I don't want to commit right now as it may screw up the compilation process at some point (manifest will change or something).

If you want to, please try the attached ebuild.
Comment 5 Nickolay Kolchin-Semyonov 2010-03-31 21:45:55 UTC
Attached ebuild failed for me with following error:

cabal-bin: ghc version >=6.4 is required but the version of
/Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r1/work/ghc-6.10.4/ghc/stage2-inplace/ghc
could not be determined.
Comment 6 Fabian Groffen gentoo-dev 2010-04-01 05:55:15 UTC
I need more information on that.  Did you see some error message go by about traps on missing dylib files?
Comment 7 Nickolay Kolchin-Semyonov 2010-04-01 06:08:17 UTC
Created attachment 226061 [details]
build.log for updated ebuild gzipped
Comment 8 Fabian Groffen gentoo-dev 2010-04-01 06:31:22 UTC
what is the output of running the command:
/Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6
.10.4/ghc/stage2-inplace/ghc
Comment 9 Nickolay Kolchin-Semyonov 2010-04-01 16:07:39 UTC
nickolaysemyonov@lazybook ~ $ /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc 
Abort trap
Comment 10 Fabian Groffen gentoo-dev 2010-04-01 16:23:45 UTC
what does scanmacho --needed /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc return?
Comment 11 Nickolay Kolchin-Semyonov 2010-04-01 16:27:39 UTC
Nothing.

nickolaysemyonov@lazybook ~ $ scanmacho --needed /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc
nickolaysemyonov@lazybook ~ $ 

P.S. Sorry, I'm not very good in MacOSX development.
Comment 12 Fabian Groffen gentoo-dev 2010-04-01 16:53:12 UTC
hmmm, what kind of file is it?

run "file /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc"
Comment 13 Nickolay Kolchin-Semyonov 2010-04-01 17:11:27 UTC
Shell Script. Scanmacho for actual executable provided.

nickolaysemyonov@lazybook ~ $ file /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc
/Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc: POSIX shell script text executable
nickolaysemyonov@lazybook ~ $ cat /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/ghc
#!/bin/sh

exec /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/libexec/ghc -B/Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/inplace-datadir/. -dynload wrapped  -optc-march=prescott -opta-march=prescott ${1+"$@"}
nickolaysemyonov@lazybook ~ $ scanmacho --needed /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/libexec/ghc
ARCH   TYPE   NEEDED FILE 
i386 MH_EXECUTE /Users/nickolaysemyonov/Gentoo/lib/libiconv.2.dylib,/Users/nickolaysemyonov/Gentoo/lib/libncursesw.5.dylib,/usr/lib/libSystem.B.dylib,/Users/nickolaysemyonov/Gentoo/usr/lib/libgmp.3.dylib,/Users/nickolaysemyonov/Gentoo/usr/lib/gcc/i686-apple-darwin9/4.2.1/libgcc_s.1.dylib /Users/nickolaysemyonov/Gentoo/var/tmp/portage/dev-lang/ghc-6.10.4-r2/work/ghc-6.10.4/ghc/stage2-inplace/libexec/ghc 
Comment 14 Fabian Groffen gentoo-dev 2010-04-01 17:31:16 UTC
can you try trimming down your CFLAGS?

CFLAGS="-O2 -pipe -march=prescott -fomit-frame-pointer

I would start with removing -fomit-frame-pointer
Comment 15 Nickolay Kolchin-Semyonov 2010-04-01 19:21:18 UTC
Rebuilding without -fomit-frame-pointer.

But ghc_setup_cflags should strip that anyway:

for flag in ${CFLAGS}; do
		case ${flag} in

			# Ignore extra optimisation (ghc passes -O to gcc anyway)
			# -O2 and above break on too many systems
			-O*) ;;

			# Arch and ABI flags are what we're really after
			-m*) append-ghc-cflags compile assemble ${flag};;

			# Debugging flags don't help either. You can't debug Haskell code
			# at the C source level and the mangler discards the debug info.
			-g*) ;;

			# Ignore all other flags, including all -f* flags
		esac
	done
Comment 16 Nickolay Kolchin-Semyonov 2010-04-01 19:48:30 UTC
ebuild with CFLAGS="-pipe -march=prescott", fails with same error. Trying with empty CFLAGS.

Comment 17 Nickolay Kolchin-Semyonov 2010-04-01 20:41:04 UTC
Same error with empty CFLAGS.
Comment 18 Fabian Groffen gentoo-dev 2010-04-02 06:24:18 UTC
ok, so that's excluded.
Comment 19 Fabian Groffen gentoo-dev 2011-04-10 17:42:14 UTC
I'm currently burning away 6.12.3 in the hopes it has this bug fixed
Comment 20 Nickolay Kolchin-Semyonov 2011-04-10 22:59:20 UTC
Confirmed, 6.12.3 builds OK.