The unit tests for mcs/tools/mono-shlib-cop are currently broken; I'm
not sure when they were broken, but they currently are [1]:

It's dying because mono-shlib-cop wants to read the
$sysconfigdir/mono/config to get the <dllmap/> elements used in library
remapping.  Again, I'm not sure why things are broken now, but things
used to work.

The attached patch modifies the build so that a
mono/runtime/etc/mono/config symlink is created to mono/data/config.
This allows the mono-shlib-cop unit tests to work again, and would fix
any circumstances where a library rename from $sysconfigdir/mono/config
was needed during test execution.

Permission to commit?

Thanks,
 - Jon

[1]
        $ cd mcs/tools/mono-shlib-cop
        $ make test
        $ make run-test
        ok=:; make run-test-recursive || ok=false; make run-test-local
        || ok=false; $ok
        make[1]: Entering directory
        `/home/jon/Projects/mono-HEAD/mcs/tools/mono-shlib-cop'
        make[1]: Leaving directory
        `/home/jon/Projects/mono-HEAD/mcs/tools/mono-shlib-cop'
        make[1]: Entering directory
        `/home/jon/Projects/mono-HEAD/mcs/tools/mono-shlib-cop'
        /home/jon/Projects/mono-HEAD/mono/runtime/mono-wrapper
        mono-shlib-cop.exe mono-shlib-cop.exe | diff -
        mono-shlib-cop.exe.out
        
        Unhandled Exception: System.IO.FileNotFoundException: Could not
        find file
        "/home/jon/Projects/mono-HEAD/mono/runtime/etc/mono/config". : 
/home/jon/Projects/mono-HEAD/mono/runtime/etc/mono/config
          at System.IO.FileStream..ctor (System.String name, FileMode
        mode, FileAccess access, FileShare share, Int32 bufferSize,
        Boolean anonymous, FileOptions options) [0x00000]
          at System.IO.FileStream..ctor (System.String name, FileMode
        mode, FileAccess access, FileShare share) [0x00000]
          at (wrapper remoting-invoke-with-check)
        System.IO.FileStream:.ctor
        (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
          at System.Xml.XmlUrlResolver.GetEntity (System.Uri
        absoluteUri, System.String role, System.Type ofObjectToReturn)
        [0x00000]
          at System.Xml.XmlTextReader.GetStreamFromUrl (System.String
        url, System.String absoluteUriString) [0x00000]
          at System.Xml.XmlTextReader..ctor (System.String url,
        System.Xml.XmlNameTable nt) [0x00000]
          at System.Xml.XmlDocument.Load (System.String filename)
        [0x00000]
          at
        Mono.Unmanaged.Check.AssemblyCheckInfo.SetInstallationPrefixes
        (System.String[] prefixes) [0x00000]
          at (wrapper remoting-invoke-with-check)
        Mono.Unmanaged.Check.AssemblyCheckInfo:SetInstallationPrefixes
        (string[])
          at Mono.Unmanaged.Check.Runner.Main (System.String[] args)
        [0x00000]
        0a1,3
        > error: in Mono.Unmanaged.Check.Runner.Foo: library `libc.so.6'
        is missing symbol `Foo'
        > error: in Mono.Unmanaged.Check.Runner.Bar: Could not load
        library `another-native-lib': ./libanother-native-lib.so: cannot
        open shared object file: No such file or directory
        > warning: in Mono.Unmanaged.Check.AssemblyChecker.g_free:
        Library `libglib-2.0.so' might be a development library
        make[1]: *** [run-mono-shlib-cop-test] Error 1
        make[1]: Leaving directory
        `/home/jon/Projects/mono-HEAD/mcs/tools/mono-shlib-cop'
        make: *** [do-run-test] Error 1


Index: ChangeLog
===================================================================
--- ChangeLog	(revision 65365)
+++ ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2006-09-13  Jonathan Pryor  <[EMAIL PROTECTED]>
+
+	* configure.in: Add command to create runtime/etc/mono/config.  This is
+	  needed so that programs which use the bootstrap mono build get the
+	  appropriate <dllmap/> entries (in particular, the mono-shlib-cop unit
+	  tests requires that a $prefix/etc/mono/config be present to run).
+	* runtime/Makefile.am: Create runtime/etc/mono/config.
+
 2006-09-11  Zoltan Varga  <[EMAIL PROTECTED]>
 
 	* mono.vcproj: Fix VC build.
Index: configure.in
===================================================================
--- configure.in	(revision 65365)
+++ configure.in	(working copy)
@@ -1857,6 +1857,20 @@
 AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
 AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper])
 
+AC_CONFIG_COMMANDS([runtime/etc/mono/config],
+[   depth=../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono
+    cd runtime/etc/mono
+    rm -f config
+    $LN_S $reldir/data/config config
+    cd $depth
+],[LN_S='$LN_S'])
+
 AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
 [   depth=../../../..
     case $srcdir in
Index: runtime/Makefile.am
===================================================================
--- runtime/Makefile.am	(revision 64525)
+++ runtime/Makefile.am	(working copy)
@@ -6,8 +6,9 @@
 noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper
 
 etctmp = etc
-symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config etc/mono/2.0/web.config 
+symlinks = etc/mono/config etc/mono/1.0/machine.config etc/mono/2.0/machine.config etc/mono/2.0/web.config 
 
+etc/mono/config            : $(top_srcdir)/data/config
 etc/mono/1.0/machine.config: $(top_srcdir)/data/net_1_1/machine.config
 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to