Public bug reported: It seems PortMidi is being compiled incorrectly. PortMidi provides two libraries, libportmidi and libporttime. libportmidi uses libporttime which means it should link against it, but it doesn't:
$ ldd /usr/lib/libportmidi.so linux-gate.so.1 => (0xffffe000) libasound.so.2 => /usr/lib/libasound.so.2 (0xb7ebb000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d87000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d60000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d5c000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d49000) /lib/ld-linux.so.2 (0x80000000) When programming in C it may required to link against both libraries, libporttime and libportmidi to use libportmidi, which is bad; but when trying to use it from C# it gets even worse, because you never link against the library, you just open and use it, so the application dies with a missing symbol. Here's the interesting output: Mono-INFO: DllImport attempting to load: 'portmidi'. Mono-INFO: DllImport loading location: 'libportmidi.so'. Mono-INFO: DllImport error loading library: '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Mono-INFO: DllImport loading library: './libportmidi.so'. Mono-INFO: DllImport error loading library './libportmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'portmidi'. Mono-INFO: DllImport error loading library 'portmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading location: 'libportmidi'. Mono-INFO: DllImport error loading library: '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Mono-INFO: DllImport loading library: './libportmidi'. Mono-INFO: DllImport error loading library './libportmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libportmidi'. Mono-INFO: DllImport error loading library '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. (bin/Debug/Score Reading Trainer.exe:9408): Mono-WARNING **: DllImport unable to load library '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Mono-INFO: DllImport attempting to load: 'portmidi'. Mono-INFO: DllImport loading location: 'libportmidi.so'. Mono-INFO: DllImport error loading library: '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Mono-INFO: DllImport loading library: './libportmidi.so'. Mono-INFO: DllImport error loading library './libportmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'portmidi'. Mono-INFO: DllImport error loading library 'portmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading location: 'libportmidi'. Mono-INFO: DllImport error loading library: '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Mono-INFO: DllImport loading library: './libportmidi'. Mono-INFO: DllImport error loading library './libportmidi.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libportmidi'. Mono-INFO: DllImport error loading library '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. (bin/Debug/Score Reading Trainer.exe:9408): Mono-WARNING **: DllImport unable to load library '/usr/lib/libportmidi.so: undefined symbol: Pt_Time'. Unhandled Exception: System.DllNotFoundException: portmidi at (wrapper managed-to-native) PortMidi.MidiStream:Pm_Initialize () at ScoreReadingTrainer.MainClass.Main (System.String[] args) [0x00000] Take a look at the include files and you'll see Pt_Time is part of libporttime. Thank you. ** Affects: portmidi (Ubuntu) Importance: Undecided Status: Unconfirmed -- PortMidi is incorrectly compiled https://launchpad.net/bugs/93728 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs