Mono编译器不支持MySQL 5.5

时间:2018-09-03 07:08:18

标签: c# linux mono

我正在Barbary pi 3(Rasbian 8)中编译一个C#程序,该程序由MySQL 5.5.60的数据库查询组成。

使用编译命令正确编译C#程序:

mcs -r:System.dll -r:System.Data.dll -r:MySql.Data.dll <C#_prog_name>.cs

但是,在命令:mono <C#_prog_name>.exe之后,出现以下错误:

  

断言:不应在元数据处到达。c:2860 Stacktrace:在<0xffffffff>在   MySql.Data.MySqlClient.MySqlConnection..ctor()[0x00000]在   :0处   MySql.Data.MySqlClient.MySqlConnection..ctor(字符串)[0x00000]在   :0 at(包装)   带检查的远程调用)   MySql.Data.MySqlClient.MySqlConnection..ctor(字符串)[0x00019]在   Test.Program.Main()上的:0   <991e93d6783045da929959301015e2dd>:0中的[0x00015]:[包装   运行时调用)object.runtime_invoke_void   (object,intptr,intptr,intptr)[0x0004c]在   <5a4ea679bdbb464bb25219a3528cae7d>:0 / proc / self / maps:   00010000-003bd000 r-xp 00000000 b3:02 671 / usr / bin / mono-sgen   003cd000-003d1000 r--p 003ad000 b3:02 671 / usr / bin / mono-sgen   003d1000-003d4000 rw-p 003b1000 b3:02 671 / usr / bin / mono-sgen   003d4000-003e0000 RW-P 00000000 00:00 0 019eb000-01b00000 RW-P   00000000 00:00 0 [堆] 73f0d000-7420f000 r--p 00000000 b3:02   1056151
  /usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll   7420f000-744d2000 r--p 00000000 b3:02 1056159
  /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll   744d2000-74800000 r--p 00000000 b3:02 133099
  /home/pi/System.Data.dll 74800000-74821000 rw-p 00000000 00:00 0   74821000-74900000 --- p 00000000 00:00 0 7492c000-7500a000 r-xp   00000000 b3:02 1057567 /usr/lib/mono/aot-cache/arm/mscorlib.dll.so   7500a000-7501a000 --- p 006de000 b3:02 1057567
  /usr/lib/mono/aot-cache/arm/mscorlib.dll.so 7501a000-7501b000 rw-p   006de000 b3:02 1057567 /usr/lib/mono/aot-cache/arm/mscorlib.dll.so   7501b000-7502e000 rw-p 00000000 00:00 0 7502e000-75400000 r--p   00000000 b3:02 1055997 /usr/lib/mono/4.5/mscorlib.dll   75400000-75c00000 rw-p 00000000 00:00 0 75c00000-75c01000 --- p   00000000 00:00 0 75c01000-76400000 rwxp 00000000 00:00 0   76400000-76800000 rw-p 00000000 00:00 0 76954000-7695d000 r--p   00000000 b3:02 1059470
  /usr/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll   7695d000-769b8000 r--p 00000000 b3:02 132761
  /home/pi/MySql.Data.dll 769b8000-769b9000 --- p 00000000 00:00 0   769b9000-76ab8000 rwxp 00000000 00:00 0 76ab8000-76b38000 rw-p   00000000 00:00 0 76b39000-76b49000 rwxp 00000000 00:00 0   76b49000-76b4a000 rw-p 00000000 00:00 0 76b4a000-76b79000 --- p   00000000 00:00 0 76b79000-76d02000 r--p 00000000 b3:02 346
  / usr / lib / locale / locale-archive 76d02000-76e2d000 r-xp 00000000 b3:02   137259 /lib/arm-linux-gnueabihf/libc-2.19.so 76e2d000-76e3d000   --- p 0012b000 b3:02 137259 /lib/arm-linux-gnueabihf/libc-2.19.so 76e3d000-76e3f000 r--p 0012b000 b3:02 137259
  /lib/arm-linux-gnueabihf/libc-2.19.so 76e3f000-76e40000 rw-p 0012d000   b3:02 137259 /lib/arm-linux-gnueabihf/libc-2.19.so   76e40000-76e43000 rw-p 00000000 00:00 0 76e43000-76e60000 r-xp   00000000 b3:02 138741 /lib/arm-linux-gnueabihf/libgcc_s.so.1   76e60000-76e6f000 --- p 0001d000 b3:02 138741
  /lib/arm-linux-gnueabihf/libgcc_s.so.1 76e6f000-76e70000 rw-p 0001c000   b3:02 138741 /lib/arm-linux-gnueabihf/libgcc_s.so.1   76e70000-76e84000 r-xp 00000000 b3:02 137291
  /lib/arm-linux-gnueabihf/libpthread-2.19.so 76e84000-76e94000 --- p   00014000 b3:02 137291 /lib/arm-linux-gnueabihf/libpthread-2.19.so   76e94000-76e95000 r--p 00014000 b3:02 137291
  /lib/arm-linux-gnueabihf/libpthread-2.19.so 76e95000-76e96000 rw-p   00015000 b3:02 137291 /lib/arm-linux-gnueabihf/libpthread-2.19.so   76e96000-76e98000 rw-p 00000000 00:00 0 76e98000-76e9a000 r-xp   00000000 b3:02 137275 /lib/arm-linux-gnueabihf/libdl-2.19.so   76e9a000-76ea9000 --- p 00002000 b3:02 137275
  /lib/arm-linux-gnueabihf/libdl-2.19.so 76ea9000-76eaa000 r--p 00001000   b3:02 137275 /lib/arm-linux-gnueabihf/libdl-2.19.so   76eaa000-76eab000 rw-p 00002000 b3:02 137275
  /lib/arm-linux-gnueabihf/libdl-2.19.so 76eab000-76eb1000 r-xp 00000000   b3:02 137287 /lib/arm-linux-gnueabihf/librt-2.19.so   76eb1000-76ec0000 --- p 00006000 b3:02 137287
  /lib/arm-linux-gnueabihf/librt-2.19.so 76ec0000-76ec1000 r--p 00005000   b3:02 137287 /lib/arm-linux-gnueabihf/librt-2.19.so   76ec1000-76ec2000 rw-p 00006000 b3:02 137287
  /lib/arm-linux-gnueabihf/librt-2.19.so 76ec2000-76f2b000 r-xp 00000000   b3:02 137276 /lib/arm-linux-gnueabihf/libm-2.19.so   76f2b000-76f3b000 --- p 00069000 b3:02 137276
  /lib/arm-linux-gnueabihf/libm-2.19.so 76f3b000-76f3c000 r--p 00069000   b3:02 137276 /lib/arm-linux-gnueabihf/libm-2.19.so   76f3c000-76f3d000 rw-p 0006a000 b3:02 137276
  /lib/arm-linux-gnueabihf/libm-2.19.so 76f3d000-76f42000 rw-p 00000000   00:00 0 76f42000-76f44000 r--p 00000000 b3:02 132298
  /home/pi/decrypt_file_cs_to_cpp_code.exe 76f44000-76f54000 rwxp   00000000 00:00 0 76f54000-76f59000 r-xp 00000000 b3:02 18033
  /usr/lib/arm-linux-gnueabihf/libarmmem.so 76f59000-76f68000 --- p   00005000 b3:02 18033 /usr/lib/arm-linux-gnueabihf/libarmmem.so   76f68000-76f69000 rw-p 00004000 b3:02 18033
  /usr/lib/arm-linux-gnueabihf/libarmmem.so 76f69000-76f89000 r-xp   00000000 b3:02 137256 /lib/arm-linux-gnueabihf/ld-2.19.so   76f89000-76f8a000 r--p 00000000 b3:02 56217
  /usr/share/locale/zh_CN/LC_MESSAGES/libc.mo 76f8a000-76f90000 rw-p   00000000 00:00 0 76f90000-76f91000 rw-s 00000000 00:10 44948
  /dev/shm/mono.20562 76f91000-76f92000 --- p 00000000 00:00 0   76f92000-76f93000 r--p 00000000 00:00 0 76f93000-76f98000 rw-p   00000000 00:00 0 76f98000-76f99000 r--p 0001f000 b3:02 137256
  /lib/arm-linux-gnueabihf/ld-2.19.so 76f99000-76f9a000 rw-p 00020000   b3:02 137256 /lib/arm-linux-gnueabihf/ld-2.19.so 7ed97000-7edb8000   rwxp 00000000 00:00 0 [堆栈] 7ef7b000-7ef7c000 r-xp 00000000   00:00 0 [sigpage] 7ef7c000-7ef7d000 r--p 00000000 00:00 0
  [vvar] 7ef7d000-7ef7e000 r-xp 00000000 00:00 0 [vdso]   ffff0000-ffff1000 r-xp 00000000 00:00 0 [vector]本机   stacktrace:来自gdb的调试信息:无法访问地址处的内存   0x0单声道支持已加载。 [新LWP 20564] [新LWP 20563] [线程   使用libthread_db进行调试]使用主机libthread_db库   “ /lib/arm-linux-gnueabihf/libthread_db.so.1”。 0x76e7fef8 in   __libc_waitpid(无法访问地址0x0 pid = 20565,stat_loc = 0x7edb5b38,options = 0处的内存)   ../sysdeps/unix/sysv/linux/waitpid.c:40 40   ../sysdeps/unix/sysv/linux/waitpid.c:无此类文件或目录。 ID   目标ID框架3线程0x763ff450(LWP 20563)“ SGen   __pthread_cond_wait中的“ worker” 0x76e7b7a4(无法访问位于   地址px_cond_wait.c:187的地址0x50 cond = 0x3ded58,互斥锁= 0x3ded1c)   2线程0x76ab7450(LWP 20564)“ Finalizer” 0x76e7da40 in   在以下位置执行do_futex_wait(isem = isem @ entry = 0x3d6f98)   ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48 * 1线程0x76f93000   (LWP 20562)__libc_waitpid中的“单” 0x76e7fef8(无法访问内存   在地址0x0 pid = 20565,stat_loc = 0x7edb5b38,options = 0)在   ../sysdeps/unix/sysv/linux/waitpid.c:40线程3(线程0x763ff450   (LWP 20563)):无法访问地址为0x50#0 0x76e7b7a4的内存   __pthread_cond_wait(cond = 0x3ded58,Mutex = 0x3ded1c)at pthread_cond_wait.c:187#1 0x002dd054 in ?? ()无法访问内存   在地址0x50上的回溯停止了:与此相同的前一帧   框架(损坏的堆栈?)线程2(线程0x76ab7450(LWP 20564)):#0   do_futex_wait中的0x76e7da40(isem = isem @ entry = 0x3d6f98)在   ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48#1 0x76e7daf4 in   __new_sem_wait(sem = 0x3d6f98)位于../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69#2 0x0026cb50 in ?? ()   回溯停止:前一帧与此帧相同(损坏   线程1(线程0x76f93000(LWP 20562)):无法访问   __libc_waitpid中的地址0x0#0 0x76e7fef8的内存(pid = 20565,   stat_loc = 0x7edb5b38,options = 0),位于   ../sysdeps/unix/sysv/linux/waitpid.c:40#1 0x000d2a50 in ?? ()无法   访问地址0x0处的存储器回溯停止:前一帧   与此框架相同(损坏的堆栈?)   ================================================ ===============执行本机代码时获得了SIGABRT。这通常表示致命   Mono运行时错误或您使用的本机库之一   应用。   ================================================== ==============已中止

     

0 个答案:

没有答案