
Dear list, I build haskell-platform 2011.04 by gentoo ~amd64 haskell overlay. But I can't run ghci even I rebuilt ghc or run haskell-updater, error message: ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... ghc: /usr/lib64/ghc-7.4.1/base-4.5.0.0/HSbase-4.5.0.0.o: unknown symbol `stat' ghc: unable to load package `base' Do you have some ideas how to avoid this error? Many thanks. Best Regards Baojun

Am 03.05.2012 18:29, schrieb Baojun Wang:
Dear list,
I build haskell-platform 2011.04 by gentoo ~amd64 haskell overlay. But I can't run ghci even I rebuilt ghc or run haskell-updater, error message:
ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... ghc: /usr/lib64/ghc-7.4.1/base-4.5.0.0/HSbase-4.5.0.0.o: unknown symbol `stat' ghc: unable to load package `base'
Do you have some ideas how to avoid this error? Many thanks.
Best Regards Baojun
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Weird. The "base" package is actually the most important package and should be included in the haskell-platform.
Anyway; you could try to do "cabal install base" or so. Furthermore, you could try to join the #gentoo-haskell channel on freenode-IRC which should be able to help you if it's a gentoo-specific problem. Cheers.

On Fri, May 4, 2012 at 12:35 AM, Morel Pisum
Am 03.05.2012 18:29, schrieb Baojun Wang:
Dear list,
I build haskell-platform 2011.04 by gentoo ~amd64 haskell overlay. But I can't run ghci even I rebuilt ghc or run haskell-updater, error message:
ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... ghc: /usr/lib64/ghc-7.4.1/base-4.5.0.0/HSbase-4.5.0.0.o: unknown symbol `stat' ghc: unable to load package `base'
Do you have some ideas how to avoid this error? Many thanks.
Best Regards Baojun
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Weird. The "base" package is actually the most important package and should be included in the haskell-platform.
Anyway; you could try to do "cabal install base" or so.
Furthermore, you could try to join the #gentoo-haskell channel on freenode-IRC which should be able to help you if it's a gentoo-specific problem.
Cheers.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Many thanks Morel. Yes, I also tried reinstall base, but also get error: $ cabal install --reinstall base Resolving dependencies... cabal: Could not resolve dependencies: next goal: base (user goal) rejecting: base-4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only already installed instances can be used) rejecting: base-3.0.3.2 (conflict: base => base>=4.0 && <4.3) rejecting: base-3.0.3.1 (conflict: base => base>=4.0 && <4.2) It is very strange there is no error when run ``haskell-updater'' (38 packages), but if I run ``cabal install type-level'', it will also fail due to unable to load base.o I'll try irc later. Best Regards Baojun

On Thu, May 3, 2012 at 12:35 PM, Morel Pisum
Weird. The "base" package is actually the most important package and should be included in the haskell-platform.
Anyway; you could try to do "cabal install base" or so.
cabal-install cannot install base; it is and must be part of the compiler. The error does not say that base is missing, it says that base is present but broken (stat() is a libc function, not part of base). The recommendation to check with #gentoo-haskell, however, is a good idea; it's clearly a problem with the Gentoo package. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On Fri, May 4, 2012 at 1:06 PM, Brandon Allbery
On Thu, May 3, 2012 at 12:35 PM, Morel Pisum
wrote: Weird. The "base" package is actually the most important package and should be included in the haskell-platform.
Anyway; you could try to do "cabal install base" or so.
cabal-install cannot install base; it is and must be part of the compiler. The error does not say that base is missing, it says that base is present but broken (stat() is a libc function, not part of base).
The recommendation to check with #gentoo-haskell, however, is a good idea; it's clearly a problem with the Gentoo package.
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Many thanks for your prompt reply Brandon. I think you are right: In /usr/include/sys/stat.h: #if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES /* Inlined versions of the real stat and mknod functions. */ __extern_inline int __NTH (stat (__const char *__path, struct stat *__statbuf)) { return __xstat (_STAT_VER, __path, __statbuf); } Please find more details in http://pastebin.com/DHium87b Best Regards Baojun

On Thu, May 3, 2012 at 12:29 PM, Baojun Wang
/usr/lib64/ghc-7.4.1/base-4.5.0.0/HSbase-4.5.0.0.o: unknown symbol `stat'
This is not a missing package, as some respondents seem to think; it's a sign that something went very wrong during building it and the result is broken at runtime. Usually on Linux this means something made use of stat() without #include-ing the appropriate header; stat() is often a macro on Linux which calls a different function depending on various compatibility options (large files, timestamp formats, etc.). Unfortunately I don't know of any Gentoo-specific details for fixing the package, although I know how I'd go about trying to debug it as part of a source build. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (3)
-
Baojun Wang
-
Brandon Allbery
-
Morel Pisum