sdr# on mac

Here you can discuss radio related computer software and computer control of radio equipment.
Post Reply
mountainpenguin
Regular
Regular
Posts: 56
Joined: 23 Nov 2011, 15:08

sdr# on mac

Post by mountainpenguin » 24 Jul 2012, 14:42

steps to get sdrsharp running on a mac:
install mac ports

Code: Select all

sudo port install cmake
sudo port install portaudio +universal
sudo port install libusb +universal
get the librtl git
make a build dir and change into it

Code: Select all

cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/local/ -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" ..

Code: Select all

make
and finally install it

Code: Select all

sudo make install
install mono on osx
download sdrsharp and unzip it
symlink port audio and librtl:

Code: Select all

ls -s /opt/local/lib/libportaudio.2.dylib .

Code: Select all

ls -s /opt/local/lib/libportaudio.dylib .

Code: Select all

ls -s /opt/local/lib/librtlsdr.dylib .
All done now launch sdrsharp

Code: Select all

 mono SDRSharp.exe
If it fails check that all the libs have i386 as well as x86_64 (mono is 32 bit at the moment)

Code: Select all

file libportaudio.2.dylib 
libportaudio.2.dylib: Mach-O universal binary with 2 architectures
libportaudio.2.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libportaudio.2.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
the
Mach-O dynamically linked shared library i386
is the important bit

funx
New User
New User
Posts: 3
Joined: 30 Apr 2013, 02:07
Call Sign: SOON

Re: sdr# on mac

Post by funx » 30 Apr 2013, 02:12

Hi,
I tried this and got a crash when running mono sdrSharp.exe.

Can you specify your versions? OS, Dongle, lib versions, mono version, sdrSharp version?

I finally installed monoDevelop to try and debug and apparently the portAudio is failing on my side. I have Snow Leopard 10.6.8 and the current latest syable of all the dependencies...

Cheers,
Eric

mountainpenguin
Regular
Regular
Posts: 56
Joined: 23 Nov 2011, 15:08

Re: sdr# on mac

Post by mountainpenguin » 03 May 2013, 08:38

I am running mountain lion
I think it should be easier on 10.6 as irrc that is more 32 bit biased ..
do you definatly have everything in the build chain 32 bit ?

funx
New User
New User
Posts: 3
Joined: 30 Apr 2013, 02:07
Call Sign: SOON

Re: sdr# on mac

Post by funx » 04 May 2013, 05:08

Hi,

Thanks for the reply. i think 10.6.8 is also 64 bit, but without the icloud, iOS look-a-like stuff of Lion, Mountain Lion...

Here is a copy of the file command on all the libs:
  • /opt/local/lib/libportaudio.2.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libportaudio.2.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    /opt/local/lib/libportaudio.2.dylib (for architecture i386): Mach-O dynamically linked shared library i386

    /opt/local/lib/libportaudiocpp.0.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libportaudiocpp.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    /opt/local/lib/libportaudiocpp.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386

    /opt/local/lib/libportaudiocpp.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libportaudiocpp.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    /opt/local/lib/libportaudiocpp.dylib (for architecture i386): Mach-O dynamically linked shared library i386

    /opt/local/lib/libusb-1.0.0.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libusb-1.0.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    /opt/local/lib/libusb-1.0.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386

    /opt/local/lib/libusb-1.0.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libusb-1.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    /opt/local/lib/libusb-1.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386

    /opt/local/lib/librtlsdr.0.0.0.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/librtlsdr.0.0.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386
    /opt/local/lib/librtlsdr.0.0.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

    /opt/local/lib/librtlsdr.0.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/librtlsdr.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386
    /opt/local/lib/librtlsdr.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86

    /opt/local/lib/librtlsdr.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/librtlsdr.dylib (for architecture i386): Mach-O dynamically linked shared library i386
    /opt/local/lib/librtlsdr.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Also here is the tail of the crash when running mono SDRSharp,exe:
  • #26 0x0000d862 in mono_jit_runtime_invoke (method=0x80041c, obj=0x0, params=0xbffff7f8, exc=0x0) at mini.c:5813
    #27 0x001a90aa in mono_runtime_invoke (method=0x80041c, obj=0x0, params=0xbffff7f8, exc=0x0) at object.c:2788
    #28 0x001abc21 in mono_runtime_exec_main (method=0x80041c, args=0x46ae00, exc=0x0) at object.c:3972
    #29 0x001aae31 in mono_runtime_run_main (method=0x80041c, argc=0, argv=0xbffffa48, exc=0x0) at object.c:3594
    #30 0x0006aff5 in mono_jit_exec (domain=0x465e00, assembly=0x613560, argc=1, argv=0xbffffa44) at driver.c:944
    #31 0x0006d589 in mono_main (argc=2, argv=0xbffffa40) at driver.c:1003
    #32 0x00002759 in main (argc=2, argv=0xbffffa40) at main.c:89

    =================================================================
    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
Do mind sharing your SDRSharp and lib version numbers? I will try debugging more with monoDevelop when I next get a chance. My usb dongle is a Nooelec RTL2832U with R820T stock. Works well with Gqrx, but not yet with SDRSharp (under mac OSX).

Thanks and Cheers,

Eric

funx
New User
New User
Posts: 3
Joined: 30 Apr 2013, 02:07
Call Sign: SOON

Re: sdr# on mac

Post by funx » 04 May 2013, 17:29

Hi,

Got it working using most of your procedure, but had to build the latest version from the svn trunk folder of SDRSharp.

In case someone else want to try this, I also had to
- sudo port install pkgconfig or similar otherwise cmake couldn't build librtl ( I actually installed more than that sudo port install pkgconfig autoconf automake libtool, so you might want to try these too. YMMV)
- Build the latest SDRSharp code using the solution file in Xamarian Studio/MonoDevelop. (Not bad reimplementation of Visual Studio C#, IMHO)
- uncomment the RTL USB section XML in the SDRSharp.exe.config for the RTLSDR USB, in order to enable the menu option
- Repeat creating symboling links in my Release folder the generated SDRSharp code... i.e. "ln -s /opt/local/lib/libportaudio.2.dylib ." for all the libs

Plays, but GUI sloow once processing starts on my Core2Duo 2.2Ghz aging Macbookpro, but somewhat usable if very patient... lol.
Might be better on newer MACs, Parallels/VMWare or directly in Windows...

Thanks for the writeup of getting this running up on MAC. Saved time for sure and was fun getting to finally try mono out! :D

Cheers,
Eric

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests