#5388: ghcilink003 and ghcilink006 fail on OSX
---------------------------------+------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.4
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
`ghcilink003` and `ghcilink006` fail on OSX (both x86 and amd64) for me,
e.g.
{{{
=====> ghcilink003(normal) 3 of 6 [0, 0, 0]
cd . && $MAKE -s --no-print-directory ghcilink003 </dev/null
>ghcilink003.run.stdout 2>ghcilink003.run.stderr
Wrong exit code (expected 0 , actual 2 )
Stdout:
Stderr:
<command line>: user specified .o/.so/.DLL could not be loaded
(dlopen(/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib, 9): no
suitable image found. Did find:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib: can't map)
Whilst trying to load: (dynamic) /usr/lib/gcc/i686-apple-
darwin10/4.2.1/libstdc++.dylib
Additional directories searched: (none)
make[1]: *** [ghcilink003] Error 1
}}}
This seems to be because I can't dlopen `libstdc++.dylib`:
{{{
$ cat q.c
#include <dlfcn.h>
#include <stdio.h>
int main(void) {
void *p;
p = dlopen("/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib",
RTLD_LAZY);
printf("Result: %p\n", p);
printf("Error: %s\n", dlerror());
return 0;
}
$ gcc q.c -o q
$ ./q
Result: 0x0
Error: dlopen(/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib, 1):
no suitable image found. Did find:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib: can't map
}}}
{{{
$ otool -L /usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.2.0)
}}}
{{{
$ file /usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib: Mach-O universal
binary with 3 architectures
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib (for architecture
i386):Mach-O dynamically linked shared library stub i386
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib (for architecture
ppc7400): Mach-O dynamically linked shared library stub ppc
/usr/lib/gcc/i686-apple-darwin10/4.2.1/libstdc++.dylib (for architecture
x86_64): Mach-O 64-bit dynamically linked shared library stub x86_64
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5388>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs