Building Limesuite for Mac

Following the Building Limesuite instructions on Mac OS X El Capitan.
cmake …/ works ok and specifically finds libusb as show here

– Found libusb-1.0:
– - Includes: /opt/local/include/libusb-1.0
– - Libraries: /opt/local/lib/libusb-1.0.dylib
– USB_INCLUDE_DIRS: /opt/local/include/libusb-1.0
– USB_LIBRARIES: /opt/local/lib/libusb-1.0.dylib
– Looking for linux/spi/spidev.h
– Looking for linux/spi/spidev.h - not found
– Looking for linux/i2c-dev.h
– Looking for linux/i2c-dev.h - not found
– USB_INCLUDE_DIRS: /opt/local/include/libusb-1.0
– USB_LIBRARIES: /opt/local/lib/libusb-1.0.dylib

but when I do the make -j4 I get the following error that prevents further progress:

In file included from /Users/graham/Code/LimeSuite/src/ConnectionSTREAM/ConnectionSTREAMImages.cpp:7:
/Users/graham/Code/LimeSuite/src/ConnectionSTREAM/ConnectionSTREAM.h:24:10: fatal error: ‘libusb-1.0/libusb.h’ file not found
include libusb-1.0/libusb.h
^
27 warnings and 1 error generated.
make[2]: *** [src/CMakeFiles/LimeSuite.dir/ConnectionSTREAM/ConnectionSTREAMing.cpp.o] Error 1
27 warnings and 1 error generated.
make[2]: *** [src/CMakeFiles/LimeSuite.dir/ConnectionSTREAM/ConnectionSTREAMImages.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/LimeSuite.dir/all] Error 2
make: *** [all] Error 2

anyone got any suggestions?

It looks wrong:

Should this:
/opt/local/include/libusb-1.0

be this:
/opt/local/include

You can possible modify LimeSuite/cmake/Modules/Findlibusb-1.0.cmake and add your include path if Findlibusb-1.0.cmake is doing the wrong thing.

Thanks for your suggestion - I will attempt that, fingers crossed … not a unix intermediate let alone expert but I sure if there is a function that searches out and finds the relevant directories for dependancies then it shouldn’t complain later that it can’t find stuff. CMAKE bug?

In case there are any other Mac users out here with the same problem, I have got to the stage where it now compiles and makes OK.

I changed two references to libusb-1.0/libusb.h to remove the libusb-1.0 in the code
so that these lines read

"#include “<“libusb.h”>”

Changes made at

src/Connection_uLimeSDR/Connection_uLimeSDR.h line 22
src/ConnectionSTREAM/ConnectionSTREAM.h line 24

Dear Zendata

You also get LimeSuite when installing Pothos, through using Brew…
It worked for me on Mac, hope this helps.

gr Michel

Hi Michael

Yes thank you I am aware of the Brew option but I am already a big MacPorts user (gnuradio and lots of other stuff) and I read of a number of potential conflicts when one tries to have MacPorts and Brew installed at the same time so have not been keen to ruin anything.

I was also interested to be compiling the latest git code - not sure how up to date Brew is?

I did get everything making and compiling without wxWidgets and then using the CLI I can see my LimeSDR.
After installing wxWidgets I can cmake …/ OK but am now hitting make errors when running make -j4 … time for a new thread :slight_smile:

Hello,

I have a similar/same issue, I did not seem to have the include file error but I do have the following:

– Looking for linux/spi/spidev.h
– Looking for linux/spi/spidev.h - not found
– Looking for linux/i2c-dev.h
– Looking for linux/i2c-dev.h - not found

How did you get around these when using MacPorts?

I too have had a lot of success with gnuradio on macports. In the past generally running with rtlsdr.

I have had trouble mixing brew and macports as well.

It would be really nice if we could somehow migrate the git clone https://github.com/myriadrf/LimeSuite.git to be a macports port. Really just need the driver to build using macports which I am manually trying to do from source as you did above. I cannot resolve the spi/i2c issues and it only builds the following:

mlksys:bin mlk$ ls bin
LimeSuiteGUI basicRX dualRXTX gpio_example singleRX

…/LimeSuiteGUI DOES execute after being build by macports, just did not get the driver and other stuff.

Thanks for any assistance,
mlk

PS:

macOS version 10.12.6

Xcode 9.0 Build version 9A235

PPS: cmake …/ says:

mlksys:buildDir administrator$ cmake ../
-- The C compiler identification is AppleClang 9.0.0.9000037
-- The CXX compiler identification is AppleClang 9.0.0.9000037
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:13 (cmake_policy):
  The OLD behavior for policy CMP0015 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Found SQLITE3: /usr/lib/libsqlite3.dylib  
-- SQLITE3: TRUE
-- SQLITE3_INCLUDE_DIRS: /usr/include
-- SQLITE3_LIBRARIES: /usr/lib/libsqlite3.dylib
-- Found libusb-1.0:
--  - Includes: /usr/local/include/libusb-1.0
--  - Libraries: /usr/local/lib/libusb-1.0.dylib
-- USB_INCLUDE_DIRS: /usr/local/include/libusb-1.0
-- USB_LIBRARIES: /usr/local/lib/libusb-1.0.dylib
-- Looking for linux/spi/spidev.h
-- Looking for linux/spi/spidev.h - not found
-- Looking for linux/i2c-dev.h
-- Looking for linux/i2c-dev.h - not found
-- USB_INCLUDE_DIRS: /usr/local/include/libusb-1.0
-- USB_LIBRARIES: /usr/local/lib/libusb-1.0.dylib
-- Found wxWidgets: -L/usr/local/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework AudioToolbox;-framework System;-framework OpenGL;-lwx_osx_cocoau_richtext-3.0;-lwx_baseu_xml-3.0;-lwx_osx_cocoau_html-3.0;-lwx_osx_cocoau_xrc-3.0;-lwx_osx_cocoau_adv-3.0;-lwx_osx_cocoau_aui-3.0;-lwx_osx_cocoau_core-3.0;-lwx_baseu-3.0;-lwx_osx_cocoau_gl-3.0 (found version "3.0.3") 
-- wxWidgets_DEFINITIONS: _FILE_OFFSET_BITS=64;WXUSINGDLL;__WXMAC__;__WXOSX__;__WXOSX_COCOA__
-- wxWidgets_INCLUDE_DIRS: /usr/local/lib/wx/include/osx_cocoa-unicode-3.0;/usr/local/include/wx-3.0
-- wxWidgets_LIBRARIES: -L/usr/local/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework AudioToolbox;-framework System;-framework OpenGL;-lwx_osx_cocoau_richtext-3.0;-lwx_baseu_xml-3.0;-lwx_osx_cocoau_html-3.0;-lwx_osx_cocoau_xrc-3.0;-lwx_osx_cocoau_adv-3.0;-lwx_osx_cocoau_aui-3.0;-lwx_osx_cocoau_core-3.0;-lwx_baseu-3.0;-lwx_osx_cocoau_gl-3.0
-- Found Gnuplot: /opt/local/bin/gnuplot (found version "5.2.2") 
-- GNUPlot Found
-- 
-- ######################################################
-- ## LimeSuite enabled features
-- ######################################################
-- 
 * LimeSuiteHeaders, The lime suite headers
 * LimeSuiteLibrary, The lime suite library
 * ConnectionSTREAM, STREAM Connection support
 * Connection_uLimeSDR, uLimeSDR Connection support
 * ConnectionXillybus, PCIE Xillybus Connection support
 * LimeSuiteGUI, GUI Application for LimeSuite
 * LimeSuiteExamples, LimeSuite library API examples
 * LimeUtilCommand, Command line device discovery utility
 * SoapySDRLMS7, SoapySDR bindings for LMS7
 * LimeSuiteDocAPI, LMS API Doxygen documentation

-- ######################################################
-- ## LimeSuite disabled features
-- ######################################################
-- 
 * ConnectionEVB7COM, EVB+COM Connection support
 * ConnectionSTREAM_UNITE, STREAM+UNITE Connection support
 * ConnectionNovenaRF7, NovenaRF7 Connection support
 * LimeSuiteDesktop, LimeSuite freedesktop integration

-- Install prefix: /usr/local
-- Build timestamp: 2017-12-27
-- Lime Suite version: 17.12.0-gd352c002
-- ABI/so version: 17.12-1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mlk/LimeSuite/buildDir

I tried building on my mac from scratch (High Sierra 10.13), and ran into issues with the final step in linking the GUI with wxWidgets. So I broke down and decided to give Homebrew a shot. However, the vanilla instructions for setting up the tap immediately fails. Also the Wiki has been down for a couple of days at least… Anyway, here is the tap problem, which seems pretty fundamental:

brew tap pothosware/homebrew-pothos
==> Tapping pothosware/pothos
Cloning into ‘/usr/local/Homebrew/Library/Taps/pothosware/homebrew-pothos’…
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 29 (delta 10), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (29/29), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/pothosware/homebrew-pothos/pothossoapy.rb
No available formula with the name “pothossoapy”
In formula file: /usr/local/Homebrew/Library/Taps/pothosware/homebrew-pothos/pothossoapy.rb
Expected to find class Pothossoapy, but only found: Pothossdr.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/pothosware/homebrew-pothos/pothosflow.rb
No available formula with the name “pothosflow”
In formula file: /usr/local/Homebrew/Library/Taps/pothosware/homebrew-pothos/pothosflow.rb
Expected to find class Pothosflow, but only found: Pothosgui.
Error: Cannot tap pothosware/pothos: invalid syntax in tap!