无法在Linux下的单声道应用程序上运行mkbundle

时间:2017-07-19 17:57:09

标签: linux mono mkbundle

我刚刚发现了mkbundle,并希望用它将我的单声道应用程序变成一个可以在Linux机器上运行但不安装Mono的可执行文件。

我收到大量错误消息,如下所示:

-bash-4.1$ mkbundle -o accountserver --deps --static Accounts.exe Mono.Data.Sqlite.dll MySql.Data.dll System.Data.SQLite.dll mustache-sharp.dll Newtonsoft.Json.dll 2>&1 | more
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.
Sources: 6 Auto-dependencies: True
   embedding: /home/nikki/personal.old/Accounts.exe
 config from: /home/nikki/personal.old/Accounts.exe.config
   embedding: /opt/mono/lib/mono/4.5/mscorlib.dll
   embedding: /opt/mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
   embedding: /opt/mono/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
   embedding: /opt/mono/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
   embedding: /opt/mono/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
   embedding: /opt/mono/lib/mono/gac/System.Security/4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
   embedding: /home/nikki/personal.old/Newtonsoft.Json.dll
   embedding: /opt/mono/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
   embedding: /opt/mono/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll
   embedding: /opt/mono/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll
   embedding: /opt/mono/lib/mono/gac/Mono.Data.Tds/4.0.0.0__0738eb9f132ed756/Mono.Data.Tds.dll
   embedding: /opt/mono/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll
   embedding: /opt/mono/lib/mono/gac/System.EnterpriseServices/4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
   embedding: /opt/mono/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
   embedding: /opt/mono/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
   embedding: /opt/mono/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization
.dll
   embedding: /home/nikki/personal.old/MySql.Data.dll
   embedding: /opt/mono/lib/mono/gac/System.Configuration.Install/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install
.dll
   embedding: /opt/mono/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
   embedding: /opt/mono/lib/mono/gac/System.Management/4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
   embedding: /opt/mono/lib/mono/gac/Mono.Data.Sqlite/4.0.0.0__0738eb9f132ed756/Mono.Data.Sqlite.dll
   embedding: /opt/mono/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
   embedding: /opt/mono/lib/mono/gac/System.Web.ApplicationServices/4.0.0.0__31bf3856ad364e35/System.Web.ApplicationServ
ices.dll
   embedding: /opt/mono/lib/mono/gac/System.Runtime.Serialization.Formatters.Soap/4.0.0.0__b03f5f7f11d50a3a/System.Runti
me.Serialization.Formatters.Soap.dll
   embedding: /opt/mono/lib/mono/gac/System.Web.Services/4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
   embedding: /opt/mono/lib/mono/gac/System.ComponentModel.DataAnnotations/4.0.0.0__31bf3856ad364e35/System.ComponentMod
el.DataAnnotations.dll
   embedding: /home/nikki/personal.old/mustache-sharp.dll
   embedding: /opt/mono/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
   embedding: /opt/mono/lib/mono/gac/Mono.CSharp/4.0.0.0__0738eb9f132ed756/Mono.CSharp.dll
   embedding: /home/nikki/personal.old/System.Data.SQLite.dll
Compiling:
as -o temp.o temp.s
cc -o accountserver -Wall `pkg-config --cflags mono-2` temp.c  `pkg-config --libs-only-L mono-2` -Wl,-Bstatic -lmono-2.0
 -Wl,-Bdynamic `pkg-config --libs-only-l mono-2 | sed -e "s/\-lmono-2.0 //"` temp.o
temp.c: In function 'install_dll_config_files':
temp.c:107: warning: pointer targets in passing argument 2 of 'mono_register_config_for_assembly' differ in signedness
/opt/mono/lib/pkgconfig/../../include/mono-2.0/mono/metadata/assembly.h:101: note: expected 'const char *' but argument
is of type 'const unsigned char *'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-xdebug.o): In function `xdebug_end_emit':
(.text+0x143): undefined reference to `__jit_debug_descriptor'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-xdebug.o): In function `xdebug_end_emit':
(.text+0x164): undefined reference to `__jit_debug_register_code'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `add_types':
(.text+0x6a): undefined reference to `LLVMInt32Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `add_types':
(.text+0x7a): undefined reference to `LLVMPointerType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `ThisType':
(.text+0xa3): undefined reference to `LLVMInt32Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `ThisType':
(.text+0xb3): undefined reference to `LLVMPointerType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `ObjRefType':
(.text+0xd3): undefined reference to `LLVMInt32Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `ObjRefType':
(.text+0xe3): undefined reference to `LLVMPointerType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `md_string':
(.text+0x119): undefined reference to `LLVMMDString'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `regtype_to_llvm_type':
(.text+0x161): undefined reference to `LLVMDoubleType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `regtype_to_llvm_type':
(.text+0x171): undefined reference to `LLVMInt64Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `regtype_to_llvm_type':
(.text+0x181): undefined reference to `LLVMInt32Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `gen_bb':
(.text+0x1e3): undefined reference to `LLVMAppendBasicBlock'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `llvm_type_to_stack_type':
(.text+0x223): undefined reference to `LLVMInt8Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `llvm_type_to_stack_type':
(.text+0x231): undefined reference to `LLVMInt16Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `llvm_type_to_stack_type':
(.text+0x259): undefined reference to `LLVMFloatType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `llvm_type_to_stack_type':
(.text+0x262): undefined reference to `LLVMDoubleType'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `llvm_type_to_stack_type':
(.text+0x271): undefined reference to `LLVMInt32Type'
/opt/mono/lib/pkgconfig/../../lib/libmono-2.0.a(libmini_la-mini-llvm.o): In function `.L38':
(.text+0x2e1): undefined reference to `LLVMDoubleType'

(余数被截断 - 有成千上万的。)

我做错了什么?

-bash-4.1$ cc -v
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

0 个答案:

没有答案