Difference between revisions of "Mac OS X"

From sigrok
Jump to navigation Jump to search
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[File:sigrok macosx.png|right|thumb|320px|sigrok-gui on Mac OS X]]
This page describes how to build the sigrok subprojects on Mac OS X.
 
== Building using Homebrew ==
 
These instructions have been tested on Mac OS X 10.9.1.
 
=== Requirements ===
 
Install [http://brew.sh Homebrew].
 
Tap sigrok:
 
<small>
$ '''brew tap rene-dev/sigrok'''
</small>
 
If you want [[PulseView]], you must install unstable.
 
=== Unstable ===


This page describes how to build the sigrok subprojects on Mac OS X.
<small>
$ '''brew install python3'''
$ '''brew install --HEAD libserialport'''
$ '''brew install --HEAD --with-libserialport libsigrok'''
$ '''brew install --HEAD libsigrokdecode'''
$ '''brew install --HEAD --with-libserialport sigrok-cli'''
$ '''brew install --HEAD pulseview'''
</small>
 
=== Stable ===
 
If you just want [[sigrok-cli]], you can install stable.
 
<small>
$ '''brew install sigrok-cli'''
</small>


== Building ==
== Building manually ==


These instructions have been tested on a clean install of Mac OS X 10.6.8 and 10.8.4.
These instructions have been tested on a clean install of Mac OS X 10.6.8, 10.8.4, 10.9.1 and 10.11.1.


=== Requirements ===
=== Requirements ===
Line 13: Line 46:
Install Qt, download qt-mac-opensource-4.7.4.dmg from [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x qt.nokia.com] (Only needed for [[PulseView]]).
Install Qt, download qt-mac-opensource-4.7.4.dmg from [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x qt.nokia.com] (Only needed for [[PulseView]]).


<!-- TODO: Install GTK+ libs and dependencies for [[sigrok-gtk]]. -->
Install git (not needed at least with 10.8.4):
 
Install git:


<small>
  $ '''sudo port install git-core'''
  $ '''sudo port install git-core'''
</small>


This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok).  
This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok).  


Install libusb, libzip and libftdi, the libsigrok build dependencies:
Install boost, libusb, libzip and libftdi, the libsigrok build dependencies:


  $ '''sudo port install libusb libzip libftdi0'''
<small>
  $ '''sudo port install boost libusb libzip libftdi0'''
</small>


Install autoconf, automake, glib2.0+, python 3.3, and libtool to satisfy version dependencies in the build process.
Install autoconf, automake, cmake, glib2.0+, python 3.3, libtool and pkgconfig to satisfy version dependencies in the build process.


  $ '''sudo port install autoconf automake glib2 python33 libtool'''
<small>
  $ '''sudo port install autoconf automake cmake glib2 python33 libtool pkgconfig'''
</small>


Set the PKG_CONFIG_PATH environment variable to reflect the future locations of libsigrok and libsigrokdecode for the sigrok-cli build process.
Set the PKG_CONFIG_PATH environment variable to reflect the future locations of libsigrok and libsigrokdecode for the sigrok-cli build process.


<small>
  $ '''export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/'''
  $ '''export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/'''
</small>
=== libserialport ===
[[libserialport]] is optional and required only for devices with serial connection, e.g. most multimeters. If not present during configuring libsigrok, the respective drivers in libsigrok will be disabled.
<small>
$ '''git clone git://sigrok.org/libserialport'''
$ '''cd libserialport'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''sudo make install'''
</small>


=== libsigrok ===
=== libsigrok ===


<small>
  $ '''git clone git://sigrok.org/libsigrok'''
  $ '''git clone git://sigrok.org/libsigrok'''
  $ '''cd libsigrok'''
  $ '''cd libsigrok'''
Line 41: Line 94:
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''sudo make install'''
</small>


=== libsigrokdecode ===
=== libsigrokdecode ===


<small>
  $ '''git clone git://sigrok.org/libsigrokdecode'''
  $ '''git clone git://sigrok.org/libsigrokdecode'''
  $ '''cd libsigrokdecode'''
  $ '''cd libsigrokdecode'''
Line 50: Line 105:
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''sudo make install'''
</small>


=== sigrok-cli ===
=== sigrok-cli ===


<small>
  $ '''git clone git://sigrok.org/sigrok-cli'''
  $ '''git clone git://sigrok.org/sigrok-cli'''
  $ '''cd sigrok-cli'''
  $ '''cd sigrok-cli'''
Line 59: Line 116:
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''sudo make install'''
</small>


=== PulseView ===
=== PulseView ===
Line 68: Line 126:
  $ '''sudo make install'''
  $ '''sudo make install'''


<!--
Hint: if something goes wrong, you can see what cmake is doing by running
=== sigrok-gtk ===
  $ '''cmake VERBOSE=1'''
 
'''Note:''' The GTK+ GUI is not yet usable!
 
$ '''git clone git://sigrok.org/sigrok-gtk'''
$ '''cd sigrok-gtk'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''sudo make install'''
 
=== sigrok-qt ===
 
'''Note:''' The Qt GUI is not yet usable!
 
$ '''git clone git://sigrok.org/sigrok-qt'''
$ '''cd sigrok-qt'''
$ '''PKG_CONFIG_PATH=/usr/local/lib/pkgconfig qmake -spec macx-g++'''
$ '''make'''
$ '''sudo make install'''
 
If you get warnings claiming potential symbol conflicts when running qmake, you are likely not invoking '''qmake-qt4'''. Try running '''qmake-qt4''' to force the correct version.
 
Open the sigrok-qt application just built:
 
  $ '''open -a sigrok-qt.app'''
-->


== Notes ==
== Notes ==
Line 101: Line 133:
* To build on Snow Leopard (10.6) you need to use the [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x Cocoa (32bit and 64bit) Qt libraries]. Don't use the default download link on that page but the one you can find further down the page.
* To build on Snow Leopard (10.6) you need to use the [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x Cocoa (32bit and 64bit) Qt libraries]. Don't use the default download link on that page but the one you can find further down the page.
* Currently we are using [http://www.macports.org/ macports] for the libusb dependency and are relying on the fact that macports are installed in /opt/local.
* Currently we are using [http://www.macports.org/ macports] for the libusb dependency and are relying on the fact that macports are installed in /opt/local.
* See also [http://xor-gate.org/writings/sigrok-osx-scratchbuild Wafelijzer's efforts to build Mac OS X binaries].
** Python framework incorrect build for OS X [http://bugs.python.org/issue15353 issue 15353]
** Python framework incorrect build for OS X [http://bugs.python.org/issue15353 issue 15353]


Line 108: Line 139:
* Find a sane way to bundle libusb with the sigrok.app.
* Find a sane way to bundle libusb with the sigrok.app.
* Include an icon with the app.
* Include an icon with the app.
* [[Mac OS X/Dylib|Set the relative paths in the binary's and DyLibs]]
* [[Mac OS X/Dylib|Set the relative paths in the binary's and DyLibs]].
* [[Mac OS X/Universal| Building universal DyLibs and binaries]]
* [[Mac OS X/Universal|Building universal DyLibs and binaries]].
* Bundle the dynamic libraries with [http://macdylibbundler.sourceforge.net MacDylibBundler]
* Bundle the dynamic libraries with [http://macdylibbundler.sourceforge.net MacDylibBundler].


== Resources ==
== Resources ==

Revision as of 20:38, 4 August 2016

This page describes how to build the sigrok subprojects on Mac OS X.

Building using Homebrew

These instructions have been tested on Mac OS X 10.9.1.

Requirements

Install Homebrew.

Tap sigrok:

$ brew tap rene-dev/sigrok

If you want PulseView, you must install unstable.

Unstable

$ brew install python3
$ brew install --HEAD libserialport
$ brew install --HEAD --with-libserialport libsigrok
$ brew install --HEAD libsigrokdecode
$ brew install --HEAD --with-libserialport sigrok-cli
$ brew install --HEAD pulseview

Stable

If you just want sigrok-cli, you can install stable.

$ brew install sigrok-cli

Building manually

These instructions have been tested on a clean install of Mac OS X 10.6.8, 10.8.4, 10.9.1 and 10.11.1.

Requirements

Install MacPorts, follow the guide on macports.org (this step will require Xcode and Command Line Tools for Xcode be installed on your machine, which are also a dependencies to build sigrok).

Install Qt, download qt-mac-opensource-4.7.4.dmg from qt.nokia.com (Only needed for PulseView).

Install git (not needed at least with 10.8.4):

$ sudo port install git-core

This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok).

Install boost, libusb, libzip and libftdi, the libsigrok build dependencies:

$ sudo port install boost libusb libzip libftdi0

Install autoconf, automake, cmake, glib2.0+, python 3.3, libtool and pkgconfig to satisfy version dependencies in the build process.

$ sudo port install autoconf automake cmake glib2 python33 libtool pkgconfig

Set the PKG_CONFIG_PATH environment variable to reflect the future locations of libsigrok and libsigrokdecode for the sigrok-cli build process.

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

libserialport

libserialport is optional and required only for devices with serial connection, e.g. most multimeters. If not present during configuring libsigrok, the respective drivers in libsigrok will be disabled.

$ git clone git://sigrok.org/libserialport
$ cd libserialport
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

libsigrok

$ git clone git://sigrok.org/libsigrok
$ cd libsigrok
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

libsigrokdecode

$ git clone git://sigrok.org/libsigrokdecode
$ cd libsigrokdecode
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

sigrok-cli

$ git clone git://sigrok.org/sigrok-cli
$ cd sigrok-cli
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

PulseView

$ git clone git://sigrok.org/pulseview
$ cd pulseview
$ cmake .
$ make
$ sudo make install

Hint: if something goes wrong, you can see what cmake is doing by running

$ cmake VERBOSE=1

Notes

  • To build on Snow Leopard (10.6) you need to use the Cocoa (32bit and 64bit) Qt libraries. Don't use the default download link on that page but the one you can find further down the page.
  • Currently we are using macports for the libusb dependency and are relying on the fact that macports are installed in /opt/local.

TODO

Resources