[Mono-list] 'make test' fails in mono/tests with cygwin
Paolo Molaro
lupus@debian.org
Fri, 28 Sep 2001 15:30:24 +0200
On 09/27/01 Brian Jepson wrote:
> I've incorporated the patch, but I'm still having trouble. It seems that
> mint is looking for libraries but can't find them:
>
> $ mint delegate.exe
>
> ** ERROR **: Failed to load library libmonowrapper.so (monowrapper)
> aborting...
> 0 [sig] mint 260 open_stackdumpfile: Dumping stack trace to
> mint.exe.stackdump
> Aborted (core dumped)
>
> $ mint array.exe
>
> ** ERROR **: Failed to load library libc.so.6 (libc.so.6)
> aborting...
> 0 [sig] mint 940 open_stackdumpfile: Dumping stack trace to
> mint.exe.stackdump
> Aborted (core dumped)
As I said, the tests that use delegates, internalcalls and P/Invoke
don't work yet on cygwin, the following patch may help some, but
there are some things missing: libmonowrapper should be built as a
DLL, the corlib should be built for cygwin, the DLL mapping may need
to be changed etc.
It would be good if someone that actually uses win32 could step forward
and give an hand fixing this (small) issues.
I'll also make sure the next snapshot handles the missing functions
more gracefully with an exception.
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
lupus@ximian.com Monkeys do it better
--- metadata/loader.c Thu Sep 27 19:11:23 2001
+++ /mnt/net/tmp/mono-0.7/mono/metadata/loader.c Fri Sep 28 15:07:12 2001
@@ -33,6 +33,9 @@
MonoDefaults mono_defaults;
+#ifdef __CYGWIN__
+#define mono_map_dll(name) (name)
+#else
static char *dll_map[] = {
"libc", "libc.so.6",
"libm", "libm.so.6",
@@ -53,6 +56,7 @@
return name;
}
+#endif
void
mono_init (void)
@@ -385,9 +389,11 @@
mh->addr = NULL;
if (!gmodule) {
- g_warning ("Failed to load library %s (%s)", full_name, scope);
- g_free (full_name);
- return;
+ if (!(gmodule=g_module_open (scope, G_MODULE_BIND_LAZY))) {
+ g_warning ("Failed to load library %s (%s)", full_name, scope);
+ g_free (full_name);
+ return;
+ }
}
g_free (full_name);