Mac build instructions
Contents
Mac Build Instructions
These instructions were written based on a system running Mac OS X 10.6.4 (Snow Leopard).
libpinproc Prerequisites
libpinproc uses libftdi1 to talk to the P-ROC hardware. libftdi1 depends on libusb-1.0.x
libpinproc's example program (pinproctest) depends on the yaml-cpp project. In order to build yaml-cpp, cmake is required.
Note: If you see an error such as "configure: error: no acceptable C compiler found in $PATH" You may also need to install the command line compilers from Xcode by following the instructions here.
libusb
Building libusb version 1.0.9:
./configure make CFLAGS="-arch i386" sudo make install
libftdi1
Building libftdi1 version 1.1.0:
mkdir bin cd bin cmake -DCMAKE_OSX_ARCHITECTURES=i386 .. make sudo make install
yaml-cpp
yaml-cpp is used by libpinproctest.
- Download and extract yaml-cpp into a directory of your choice. Latest version tested: 0.2.6
- If you haven't already installed cmake, install it now.
- From the command line, 'cd' into your yaml-cpp directory and run the following commands:
mkdir bin cd bin cmake .. make sudo make install
libpinproc
- Download (and extract) libpinproc into a directory of your choice. Note - make sure you select the desired branch to download (either master or dev).
- Download either by clicking 'Download Sources' or by installing a git client and checking out the repository.
- From the command line, 'cd' into the libpinproc directory and run the following commands:
- Supported:
mkdir bin cd bin cmake -DCMAKE_OSX_ARCHITECTURES=i386 -DBUILD_SHARED_LIBS=ON .. make sudo make install
pypinproc
- Build pypinproc - libpinproc Python extension
- Download (and extract) pypinproc into a directory of your choice. Note - make sure you select the desired branch to download (either master or dev).
- Download either by clicking 'Download Sources' or by installing a git client and checking out the repository.
- Download (and extract) pypinproc into a directory of your choice. Note - make sure you select the desired branch to download (either master or dev).
By default distutils likes to build i386 and PPC binaries, presumably for creating a binary distribution. In our case we only want the current architecture, the one we used to build the previous libraries. The pypinproc setup.py script checks for the ARCH environment variable; if it is set it will build pypinproc using that architecture.
ARCH=i386 python setup.py build sudo python setup.py install
PyYAML
Install PyYAML: