Public bug reported:

When attempting to create a statically linked binary using the utility
mkbundle from mono-devel-3.2.8+dfsg-4ubuntu1, it fails to find any
installed assemblies.

Apart from the core assembies, the application from the example run below 
depends on the following installed packages:
  libnotify-cil
  libappindicator0.1-cil
  libglib2.0-cil
  libgtk2.0-cil
It works fine when running unbundled e.g. mono CmisSync.exe
  
Content of current directory:
ls -l
-rwxr-xr-x 1 felfert felfert 174080 Jun 26 23:45 CmisSync.exe
-rwxr-xr-x 1 felfert felfert  43286 Jun 26 23:45 CmisSync.exe.mdb
-rwxr-xr-x 1 felfert felfert 259584 Jun 26 23:45 CmisSync.Lib.dll
-rwxr-xr-x 1 felfert felfert  89078 Jun 26 23:45 CmisSync.Lib.dll.mdb
-rwxr-xr-x 1 felfert felfert   6144 Jun 26 23:45 DataSpaceSync.Console.exe
-rwxr-xr-x 1 felfert felfert    826 Jun 26 23:45 DataSpaceSync.Console.exe.mdb
-rwxr-xr-x 1 felfert felfert 282112 Jun 26 23:45 DBreeze.dll
-rwxr-xr-x 1 felfert felfert 473600 Jun 26 23:45 DotCMIS.dll
-rwxr-xr-x 1 felfert felfert 299520 Jun 26 23:45 log4net.dll
-rwxr-xr-x 1 felfert felfert 659968 Jun 26 23:45 Moq.dll
-rwxr-xr-x 1 felfert felfert 481792 Jun 26 23:45 Newtonsoft.Json.dll
-rwxr-xr-x 1 felfert felfert 151552 Jun 26 23:45 nunit.framework.dll
-rwxr-xr-x 1 felfert felfert 353280 Jun 26 23:45 TestLibrary.dll
-rwxr-xr-x 1 felfert felfert 137292 Jun 26 23:45 TestLibrary.dll.mdb

Example run of mkbundle:
mkbundle --static --deps -o DataSpaceSync CmisSync.exe CmisSync.Lib.dll 
DotCMIS.dll DBreeze.dll DotCMIS.dll log4net.dll Newtonsoft.Json.dll 
--machine-config /etc/mono/4.5/machine.config
OS is: Linux
Note that statically linking the LGPL Mono runtime has more licensing 
restrictions than dynamically linking.
See http://www.mono-project.com/Licensing for details on licensing.
WARNING:
  Check that the machine.config file you are bundling
  doesn't contain sensitive information specific to this machine.
Sources: 7 Auto-dependencies: True

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp' or 
one of its dependencies. The system cannot find the file specified.
File name: 'gtk-sharp'
  at System.AppDomain.Load (System.String assemblyString, 
System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in 
<filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.AppDomain:Load 
(string,System.Security.Policy.Evidence,bool)
  at System.Reflection.Assembly.ReflectionOnlyLoad (System.String 
assemblyString) [0x00000] in <filename unknown>:0 
  at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean 
throwOnError) [0x00000] in <filename unknown>:0 
  at IKVM.Reflection.Universe.Load (System.String refname, 
IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in 
<filename unknown>:0 
  at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in 
<filename unknown>:0 
  at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, 
System.String codebase) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not 
load file or assembly 'gtk-sharp' or one of its dependencies. The system cannot 
find the file specified.
File name: 'gtk-sharp'
  at System.AppDomain.Load (System.String assemblyString, 
System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in 
<filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.AppDomain:Load 
(string,System.Security.Policy.Evidence,bool)
  at System.Reflection.Assembly.ReflectionOnlyLoad (System.String 
assemblyString) [0x00000] in <filename unknown>:0 
  at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean 
throwOnError) [0x00000] in <filename unknown>:0 
  at IKVM.Reflection.Universe.Load (System.String refname, 
IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in 
<filename unknown>:0 
  at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in 
<filename unknown>:0 
  at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, 
System.String codebase) [0x00000] in <filename unknown>:0

Specifying -L <path> explicitely does not help either. However setting
the MONO_PATH env-variable to corrrectly specify all necessary paths,
*does* help. So it looks like just mkbudles search path is somehow
broken.

BTW:
On an older machine, using an earlier mono (3.0.6+dfsg-1~exp1~pre) this worked 
fine.
Also, using a self-built mono-3.4.0 on a different machine (Fedora) this works 
fine as well.

CU
 -Fritz

** Affects: mono (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: trusty

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to mono in Ubuntu.
https://bugs.launchpad.net/bugs/1334932

Title:
  mkbundle fails to resolve dependencies

Status in “mono” package in Ubuntu:
  New

Bug description:
  When attempting to create a statically linked binary using the utility
  mkbundle from mono-devel-3.2.8+dfsg-4ubuntu1, it fails to find any
  installed assemblies.

  Apart from the core assembies, the application from the example run below 
depends on the following installed packages:
    libnotify-cil
    libappindicator0.1-cil
    libglib2.0-cil
    libgtk2.0-cil
  It works fine when running unbundled e.g. mono CmisSync.exe
    
  Content of current directory:
  ls -l
  -rwxr-xr-x 1 felfert felfert 174080 Jun 26 23:45 CmisSync.exe
  -rwxr-xr-x 1 felfert felfert  43286 Jun 26 23:45 CmisSync.exe.mdb
  -rwxr-xr-x 1 felfert felfert 259584 Jun 26 23:45 CmisSync.Lib.dll
  -rwxr-xr-x 1 felfert felfert  89078 Jun 26 23:45 CmisSync.Lib.dll.mdb
  -rwxr-xr-x 1 felfert felfert   6144 Jun 26 23:45 DataSpaceSync.Console.exe
  -rwxr-xr-x 1 felfert felfert    826 Jun 26 23:45 DataSpaceSync.Console.exe.mdb
  -rwxr-xr-x 1 felfert felfert 282112 Jun 26 23:45 DBreeze.dll
  -rwxr-xr-x 1 felfert felfert 473600 Jun 26 23:45 DotCMIS.dll
  -rwxr-xr-x 1 felfert felfert 299520 Jun 26 23:45 log4net.dll
  -rwxr-xr-x 1 felfert felfert 659968 Jun 26 23:45 Moq.dll
  -rwxr-xr-x 1 felfert felfert 481792 Jun 26 23:45 Newtonsoft.Json.dll
  -rwxr-xr-x 1 felfert felfert 151552 Jun 26 23:45 nunit.framework.dll
  -rwxr-xr-x 1 felfert felfert 353280 Jun 26 23:45 TestLibrary.dll
  -rwxr-xr-x 1 felfert felfert 137292 Jun 26 23:45 TestLibrary.dll.mdb

  Example run of mkbundle:
  mkbundle --static --deps -o DataSpaceSync CmisSync.exe CmisSync.Lib.dll 
DotCMIS.dll DBreeze.dll DotCMIS.dll log4net.dll Newtonsoft.Json.dll 
--machine-config /etc/mono/4.5/machine.config
  OS is: Linux
  Note that statically linking the LGPL Mono runtime has more licensing 
restrictions than dynamically linking.
  See http://www.mono-project.com/Licensing for details on licensing.
  WARNING:
    Check that the machine.config file you are bundling
    doesn't contain sensitive information specific to this machine.
  Sources: 7 Auto-dependencies: True

  Unhandled Exception:
  System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp' 
or one of its dependencies. The system cannot find the file specified.
  File name: 'gtk-sharp'
    at System.AppDomain.Load (System.String assemblyString, 
System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in 
<filename unknown>:0 
    at (wrapper remoting-invoke-with-check) System.AppDomain:Load 
(string,System.Security.Policy.Evidence,bool)
    at System.Reflection.Assembly.ReflectionOnlyLoad (System.String 
assemblyString) [0x00000] in <filename unknown>:0 
    at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean 
throwOnError) [0x00000] in <filename unknown>:0 
    at IKVM.Reflection.Universe.Load (System.String refname, 
IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in 
<filename unknown>:0 
    at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in 
<filename unknown>:0 
    at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, 
System.String codebase) [0x00000] in <filename unknown>:0 
  [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not 
load file or assembly 'gtk-sharp' or one of its dependencies. The system cannot 
find the file specified.
  File name: 'gtk-sharp'
    at System.AppDomain.Load (System.String assemblyString, 
System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in 
<filename unknown>:0 
    at (wrapper remoting-invoke-with-check) System.AppDomain:Load 
(string,System.Security.Policy.Evidence,bool)
    at System.Reflection.Assembly.ReflectionOnlyLoad (System.String 
assemblyString) [0x00000] in <filename unknown>:0 
    at IKVM.Reflection.Universe.DefaultResolver (System.String refname, Boolean 
throwOnError) [0x00000] in <filename unknown>:0 
    at IKVM.Reflection.Universe.Load (System.String refname, 
IKVM.Reflection.Module requestingModule, Boolean throwOnError) [0x00000] in 
<filename unknown>:0 
    at IKVM.Reflection.Universe.Load (System.String refname) [0x00000] in 
<filename unknown>:0 
    at MakeBundle.QueueAssembly (System.Collections.Generic.List`1 files, 
System.String codebase) [0x00000] in <filename unknown>:0

  Specifying -L <path> explicitely does not help either. However setting
  the MONO_PATH env-variable to corrrectly specify all necessary paths,
  *does* help. So it looks like just mkbudles search path is somehow
  broken.

  BTW:
  On an older machine, using an earlier mono (3.0.6+dfsg-1~exp1~pre) this 
worked fine.
  Also, using a self-built mono-3.4.0 on a different machine (Fedora) this 
works fine as well.

  CU
   -Fritz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mono/+bug/1334932/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to