[Mono-bugs] [Bug 471862] New: System.DllNotFoundException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 3 04:41:10 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=471862


           Summary: System.DllNotFoundException
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.0.x
          Platform: PowerPC-64
        OS/Version: SLES 11
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: csvadiraj at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Found on; SLES-11-ppc64
Mono Version 2.0.1

DllImport on some libraries which are present in the LD_LIBRARY_PATH fails to
import.

Error Thrown:

Unhandled Exception: System.DllNotFoundException: librpm
  at (wrapper managed-to-native) DllImp:rpmvercmp (string,string)
  at DllImp.Main () [0x00000] 



TestCase:
using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.Threading;
public class DllImp
{

        [DllImport("librpm")]
        static extern int rpmvercmp (string a, string b);

    public static void Main()
    {
        rpmvercmp("gcc","gcc") ;
    }
}







Other info

#ldconfig -p | grep librpm

        librpmio-4.4.so (libc6,64bit) => /usr/lib64/librpmio-4.4.so
        librpmglue.so (libc6,64bit) => /usr/lib/librpmglue.so
        librpmdb-4.4.so (libc6,64bit) => /usr/lib64/librpmdb-4.4.so
        librpmbuild-4.4.so (libc6,64bit) => /usr/lib64/librpmbuild-4.4.so
        librpm-4.4.so (libc6,64bit) => /usr/lib64/librpm-4.4.so


#file /usr/lib64/librpm-4.4.so
/usr/lib64/librpm-4.4.so: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco
7500, version 1 (SYSV), dynamically linked, stripped

# file /usr/lib64/librpm.so
/usr/lib64/librpm.so: symbolic link to `librpm-4.4.so'


DllImport succeeds on other platforms.

Also on ppc64 it succeeds on file with signature such as
# file /usr/lib64/libc.so
/usr/lib64/libc.so: ASCII C program textcat /usr/lib64/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-powerpc)
GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a  AS_NEEDED (
/lib64/ld64.so.1 ) )


Expected Behavior:
Should import the library like it does on other platforms.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list