pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building PSPP on a Mac


From: Richard Brittain
Subject: Building PSPP on a Mac
Date: Fri, 10 Oct 2008 23:01:21 -0400 (EDT)

Building PSPP on Mac OSX

Hi,
I'm helping to evaluate PSPP and wanted a Mac version, but the installation notes don't have much advice about building this on a Mac, so I plugged away and got a version that seems to install and run. I also a found a few questions about this in the list archives, but few answers, so I thought this list might like a description of what worked for me. I've done this right through on two PPC macs running 10.4.11. I've not yet tried it on a 10.5 system, or an intel Mac. I'm just a tinkerer, not a developer, when it comes to Macs, so there may be a more efficient way to do this.

1. Install Xcode developer tools and X11.

I needed to upgrade Xcode to the latest version (2.4.1 for 10.4
systems) to make some errors in 'configure' go away.  You have to
do that by downloading the .dmg from the Apple Developer web site.
Xcode does not seem to get updates through the 'System Update'
mechanism.  The GUI version of PSPP needs X11 (not installed by
default in 10.4, but on the distribution CD, optional packages).

2. Install MacPorts from <http://www.macports.org/>, if you don't already have it.

3. Edit /etc/profile or ~/.profile and ~/.bashrc
and add "/opt/local/bin" to your $PATH setting. At the same time, add "/usr/local/bin" if it isn't there already, since pspp will install itself there.

4. Make sure the ports package is updated, and install all the prerequisite libraries for PSPP

sudo port selfupdate
sudo port install yelp gsl plotutils

This will run for _hours_, downloading sources from BSD ports
repositories and compiling and installing them.  It will automatically
pull down all needed prerequisite packages.  On my system I ended
up with 94 port packages installed.  You can use "port list installed"
to see them.  All of the prerequisites are supported ports.  Some
of the packages are just newer versions of things which the Mac has
already, like perl and python.  I suspect that the vast majority of the stuff
installed by this step is not needed at run time by pspp.

5. Download the PSPP tarball and unpack it.

I think it might help to put it in a location without weird characters
in the pathname.  The "configure" script generated some errors which
might have been due to my current directory being "User's Documents"

6. In a terminal, cd to the unpacked psp source tree and run configure

./configure CPPFLAGS="/opt/local/include" LDFLAGS="-L/opt/local/lib 
-L/usr/local/lib/pspp"

The /opt/local settings let it find all the libraries installed by
MacPorts.  The /usr/local/lib/pspp seems to be necessary to let it
later find the pspp dynamic libraries which will be placed there
at the install step.

7. Build pspp

    make

8. Test it

    make check

I get 1 failing test in the set of 158.  The actual message is:
1c1
< /private/tmp/pspp-tst-8859/foo.sps:10: error: DISPLAY: AKSDJ is not a 
variable name.
---
/tmp/pspp-tst-8859/foo.sps:10: error: DISPLAY: AKSDJ is not a variable name.
3c3
< /private/tmp/pspp-tst-8859/foo.sps:10: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
---
/tmp/pspp-tst-8859/foo.sps:10: error: Stopping syntax file processing
here to avoid a cascade of dependent command failures.
examine output 1
FAILED
FAIL: tests/command/insert.sh

9.  Install it (assuming the above error isn't too critical)

   sudo make install

At this point "pspp" seems to work for batch mode operation. To get the GUI we need to start X11 and also augment the shared library search path.

10.  Make symlinks for libpsppire.so and libpsppwidgets.so

The dynamic library routines seem to be hard coded to look for .so files, but on the Mac they are called .dylib files, which seem to be equivalent.

cd /usr/local/lib/pspp
sudo ln -s libpspsswidgets.dylib libpsppwidgets.so
sudo ln -s libpsppire.dylib libpsppire.so

11.  Start X11 and an xterm window.

Make sure that $DISPLAY is set, and that /usr/local/bin is in your search path in the xterm window.

12. Set $DYLD_LIBRARY_PATH

Set $DYLD_LIBRARY_PATH to allow the dynamic link loader to find the psppire and psppwidgets libaries.

export DYLD_LIBRARY_PATH=/usr/local/lib/pspp

This can be added to ~/.bashrc so that it always takes effect, or there could be a simple wrapper script to start up psppire which sets $DYLD_LIBRARY_PATH first. I'm not sure why this is needed for /usr/local/lib/pspp and not for /opt/local/lib.

13. Run it!

     psppire


I've not yet figured out how to get other than  ASCII output from psppire,
or generate plots and charts. The reference manual (running in 'yelp') seems to throw errors on some of the cross linked pages. I also get a few warnings in the terminal window when certain features are selected in psppire. I'd like to try and figure out the minimum set of run-time files needed, so that I could copy the executables to another machine with a simple tarball, and avoid this day-long compilation exercise (if pspp proves useful - I'm not the statistician!).

Richard
--
Richard Brittain,  Kiewit Computing Services, 6224 Baker/Berry Library
                   Dartmouth College, Hanover NH 03755
Email: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]