Summary: | dev-lang/ghc-6.12.1 doesn't handle ldscripts | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maciej Piechotka <uzytkownik2> |
Component: | Current packages | Assignee: | Gentoo's Haskell Language team <haskell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | howard_b_golden |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://hackage.haskell.org/trac/ghc/ticket/4049 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 290974 | ||
Bug Blocks: |
Description
Maciej Piechotka
2010-03-25 23:05:14 UTC
Ups. Sorry: % gcc -v Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /var/tmp/paludis/sys-devel-gcc-4.4.3/work/gcc-4.4.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/python --disable-libgcj --enable-objc-gc --enable-languages=c,c++,objc,obj-c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.3 p1.0' Thread model: posix gcc version 4.4.3 (Gentoo 4.4.3 p1.0) Ups. Sorry gcc does not solves problem. However moving libz.a to /lib does. See also bug 290974 it'll fail on plenty of libraries (In reply to comment #4) > it'll fail on plenty of libraries > Due to the problems I've mentioned in bug 290974. This occurs with all versions of GHC (though there is a patch in the works to try and brute-force attempting to read linker scripts), though the zlib library is the main C library that does this that people are likely to use. Posted upstream. (In reply to comment #6) > Posted upstream. > Bug ticket (for tracking purposes, etc.)? (In reply to comment #7) > (In reply to comment #6) > > Posted upstream. > > > > Bug ticket (for tracking purposes, etc.)? > In URL: http://hackage.haskell.org/trac/ghc/ticket/4049 (In reply to comment #0) > % ghci -package zlib > GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Loading package bytestring-0.9.1.5 ... linking ... done. > Loading package zlib-0.5.2.0 ... <command line>: can't load .so/.DLL for: z > (/usr/lib64/libz.so: invalid ELF header) On my system, I got the same results. However, I believe that your system and my system might be misconfigured. Please run the following command and observe the result: $ ls -l /lib64/libz* My result is as follows: lrwxrwxrwx 1 root root 13 Apr 5 2008 /lib64/libz.so -> libz.so.1.2.3 lrwxrwxrwx 1 root root 13 May 14 00:26 /lib64/libz.so.1 -> libz.so.1.2.5 -rwxr-xr-x 1 root root 92760 May 14 00:26 /lib64/libz.so.1.2.5 Please note that /lib64/libz.so is linked to the _nonexistent_ file libz.so.1.2.3. If you have a similar situation, it would explain the results you got above. You should change the symbolic link to point to the correct version of /lib64/libz.so (in my case, 1.2.5). This should give you correct results (not the "invalid ELF header") with ONLY "ghci -package zlib" (or the equivalent command "ghci -lz"). This fix for this problem is included in ghc-6.14.1, which is scheduled for "Octoberish" according to Ian Lynagh. (In reply to comment #8) > In URL: http://hackage.haskell.org/trac/ghc/ticket/4049 Trac ticket 4049 has been split into two parts. The problem reported here was already reported as Trac ticket 2615. http://hackage.haskell.org/trac/ghc/ticket/2615 The fix has been accepted and will be in ghc-6.14.1. Pushed to the tree as: *ghc-6.12.3-r1 (27 Mar 2011) 27 Mar 2011; Sergei Trofimovich <slyfox@gentoo.org> +ghc-6.12.3-r1.ebuild, +files/ghc-6.12.3-ticket-2615-linker-script.patch: Migrated to EAPI=3: initial PREFIX support (based on work of grobian); USE=unicode for ncurses is a required depend (bug #326237 by Josh Cartwright and others). Added linker script support to workaround bug #311361 by Maciej Piechotka. Thanks to Maciej for the report and to Howard for the fix in upstream! |