[Mono-dev] How to use lib64 in mono 4.3?
Miguel de Icaza
miguel at xamarin.com
Tue Oct 6 17:24:56 UTC 2015
Ok, that looks like an issue with your Autoconf installation (did you run
autogen, or is this the one we ship)?
In any case the challenge is that your lib64 directory needs to be listed
in your ld.so.conf, otherwise calls to dlopen will fail.
On Tue, Oct 6, 2015 at 12:17 PM, psantosl at codicesoftware.com <
psantosl at codicesoftware.com> wrote:
> Hi again,
>
> I'll try to be clearer this time, I think I was too cryptic before :)
>
> I just built my mono from latest now this way:
>
> $ ./configure --prefix=/home/pablo/monobin-4.3-head && make && make install
>
> $ mono --version
> Mono JIT compiler version 4.3.0 (master/020a7c6 Tue Oct 6 18:06:22 CEST
> 2015)
> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
> www.mono-project.com
> TLS: __thread
> SIGSEGV: altstack
> Notifications: epoll
> Architecture: amd64
> Disabled: none
> Misc: softdebug
> LLVM: supported, not enabled.
> GC: sgen
>
>
> I have this program:
>
> $ cat Program.cs
> using System;
>
> using Mono.Unix;
>
> namespace testunixdirinfo
> {
> class MainClass
> {
> public static void Main (string[] args)
> {
> UnixDirectoryInfo dir = new UnixDirectoryInfo (args [0]);
> }
> }
> }
>
> Then I build my program:
>
> $ mcs Program.cs -r Mono.Posix.dll
>
> And run it and get this:
>
> $ mono Program.exe .
>
> Unhandled Exception:
> System.TypeInitializationException: The type initializer for
> 'Mono.Unix.Native.Syscall' threw an exception. --->
> System.DllNotFoundException: */home/pablo/monobin-4.**3*
> *-head/lib/libMonoPosixHelper.so*
> at (wrapper managed-to-native) Mono.Unix.Native.Syscall:get_at_fdcwd ()
> at Mono.Unix.Native.Syscall..cctor () <0x41356870 + 0x0002b> in
> <filename unknown>:0
> --- End of inner exception stack trace ---
> at Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory () <0x41356550 +
> 0x0008f> in <filename unknown>:0
> at Mono.Unix.UnixPath._GetFullPath (System.String path) <0x41356430 +
> 0x0002b> in <filename unknown>:0
> at Mono.Unix.UnixPath.GetFullPath (System.String path) <0x413563f0 +
> 0x0000f> in <filename unknown>:0
> at Mono.Unix.UnixFileSystemInfo..ctor (System.String path) <0x41355f80 +
> 0x00053> in <filename unknown>:0
> at Mono.Unix.UnixDirectoryInfo..ctor (System.String path) <0x41355f50 +
> 0x00013> in <filename unknown>:0
> at testunixdirinfo.MainClass.Main (System.String[] args) <0x41355d40 +
> 0x00043> in <filename unknown>:0
> [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The
> type initializer for 'Mono.Unix.Native.Syscall' threw an exception. --->
> System.DllNotFoundException:
> /home/pablo/monobin-4.2/lib/libMonoPosixHelper.so
> at (wrapper managed-to-native) Mono.Unix.Native.Syscall:get_at_fdcwd ()
> at Mono.Unix.Native.Syscall..cctor () <0x41356870 + 0x0002b> in
> <filename unknown>:0
> --- End of inner exception stack trace ---
> at Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory () <0x41356550 +
> 0x0008f> in <filename unknown>:0
> at Mono.Unix.UnixPath._GetFullPath (System.String path) <0x41356430 +
> 0x0002b> in <filename unknown>:0
> at Mono.Unix.UnixPath.GetFullPath (System.String path) <0x413563f0 +
> 0x0000f> in <filename unknown>:0
> at Mono.Unix.UnixFileSystemInfo..ctor (System.String path) <0x41355f80 +
> 0x00053> in <filename unknown>:0
> at Mono.Unix.UnixDirectoryInfo..ctor (System.String path) <0x41355f50 +
> 0x00013> in <filename unknown>:0
> at testunixdirinfo.MainClass.Main (System.String[] args) <0x41355d40 +
> 0x00043> in <filename unknown>:0
>
>
> It doesn't find the libMonoPosixHelper.so under "lib" because it is
> actually under lib64 (I just built my mono with make, nothing special :-S).
>
> $ ls /home/pablo/monobin-4.3-head/
> bin/ etc/ include/ lib/ lib64/ share/
>
> $ ls /home/pablo/monobin-4.3-head/lib64/
> libikvm-native.a libMonoPosixHelper.la
> libmono-profiler-log.so
> libikvm-native.la libMonoPosixHelper.so
> libmono-profiler-log.so.0
> libikvm-native.so libmono-profiler-aot.a
> libmono-profiler-log.so.0.0.0
> libmono-2.0.a libmono-profiler-aot.la
> libmonosgen-2.0.a
> libmono-2.0.la libmono-profiler-aot.so
> libmonosgen-2.0.la
> libmono-2.0.so libmono-profiler-aot.so.0
> libmonosgen-2.0.so
> libmono-2.0.so.1 libmono-profiler-aot.so.0.0.0
> libmonosgen-2.0.so.1
> libmono-2.0.so.1.0.0 libmono-profiler-iomap.a
> libmonosgen-2.0.so.1.0.0
> libmonoboehm-2.0.a libmono-profiler-iomap.la
> libMonoSupportW.a
> libmonoboehm-2.0.la libmono-profiler-iomap.so
> libMonoSupportW.la
> libmonoboehm-2.0.so libmono-profiler-iomap.so.0
> libMonoSupportW.so
> libmonoboehm-2.0.so.1 libmono-profiler-iomap.so.0.0.0 mono
> libmonoboehm-2.0.so.1.0.0 libmono-profiler-log.a pkgconfig
> libMonoPosixHelper.a libmono-profiler-log.la
>
>
> I'm obviously doing something wrong, but I'd love to know what should I do
> to configure it correctly. (BTW, just copying lib64 inside lib makes it
> work, but I guess this is not the way to do it :P).
>
>
> Thanks again!
>
> pablo
>
>
> On 10/5/2015 22:42, Miguel de Icaza wrote:
>
> Hello,
>
> I do not follow, what "new lib64" thing? That sounds like a packaging
> issue, more than a Mono issue.
>
> Miguel.
>
> On Mon, Oct 5, 2015 at 12:44 PM, <psantosl at codicesoftware.com>
> psantosl at codicesoftware.com <psantosl at codicesoftware.com> wrote:
>
>> Hi,
>>
>> We're having trouble understanding the new lib64 thing in mono 4.3 (we're
>> trying to move Plastic SCM to 4.3 now).
>>
>> A simple app like this one:
>>
>> using Mono.Unix;
>> namespace testunixdirinfo
>> {
>> class MainClass
>> {
>> public static void Main(string[] args)
>> {
>> UnixDirectoryInfo dir = new UnixDirectoryInfo(args[0]);
>> }
>> }
>> }
>>
>> Fails saying it can't find lib/libMonoPosixHelper.so, which is now under
>> lib64 instead.
>>
>> It is easy to fix just moving it under lib inside your mono binaries, but
>> I guess this is not the right way to do it :confounded:
>>
>> This is the build we're using Mono JIT compiler version 4.3.0
>> (explicit/b6dfce6.
>>
>> Thanks!
>>
>> pablo
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20151006/56911d06/attachment-0001.html>
More information about the Mono-devel-list
mailing list