Newsyland Blog tail -f /dev/brain >> blog.newsyland.com

19Dec/071

Installing odcctools on Leopard

Instructions for installing odcctools in Mac OS X 10.5 Leopard (on Intel Macbook Pro Core 2 Duo) via macports:

I was attempting to get matplotlib, the python plotting library, installed via macports and the first problem is that the library is dependent on odcctools (20061117_0), which fails to build in the x86_64 environment.

But, we can get it to build...:

1) (clean the slate)

$sudo port -v selfupdate;sudo portindex
$sudo port clean --all odcctools

2) (this part will fail)

$sudo port install odcctools

Output:

---> Fetching odcctools
---> Verifying checksum(s) for odcctools
---> Extracting odcctools
---> Configuring odcctools
---> Building odcctools with target default
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_odcctools/work/odcctools/odcctools" && make default " returned error 2
Command output: cd libstuff && make
/usr/bin/gcc-4.0 -Wall -Wno-long-double -Wno-import -DHAVE_CONFIG_H -I/opt/local/include -I../include -I../include -O2 -fno-builtin-round -fno-builtin-trunc -no-cpp-precomp -mdynamic-no-pic -c -o allocate.o allocate.c
In file included from ../include/libkern/OSByteOrder.h:70,
from ../include/mach/ndr.h:94,
from ../include/mach/clock_priv.h:7,
from ../include/mach/mach_interface.h:37,
from ../include/mach/mach.h:62,
from allocate.c:26:
../include/libkern/machine/OSByteOrder.h:45: error: redefinition of '_OSSwapInt16'
/usr/include/libkern/i386/_OSByteOrder.h:49: error: previous definition of '_OSSwapInt16' was here
../include/libkern/machine/OSByteOrder.h:54: error: redefinition of '_OSSwapInt32'
/usr/include/libkern/i386/_OSByteOrder.h:58: error: previous definition of '_OSSwapInt32' was here
../include/libkern/machine/OSByteOrder.h:63: error: redefinition of '_OSSwapInt64'
/usr/include/libkern/i386/_OSByteOrder.h:69: error: previous definition of '_OSSwapInt64' was here
make[1]: *** [allocate.o] Error 1
make: *** [libstuff] Error 2
Error: Status 1 encountered during processing.

3)
(hint from http://code.google.com/p/iphone-dev/issues/detail?id=106#c1 )
From this path,
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_odcctools/work/odcctools/odcctools
in each subdirectory, look for a "Makefile". IF the file has a "MYINCLUDES" line, add this after the equals ( = ) sign:
"-isysroot /Developer/SDKs/MacOSX10.4u.sdk" (w/o quotes). If the Makefile doesn't contain a line which starts with MYINCLUDES, then ignore it.

e.g. This is how the line will look after putting in:
...
MYINCLUDES = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I$(builddir) -I$(srcdir) -I$(top_builddir)/include \
-I$(top_srcdir)/include $(INCPRIVEXT) $(FORHDRS)
...

4) (continue installation)

$sudo port install odcctools

Output:

---> Building odcctools with target default
---> Staging odcctools into destroot
---> Installing odcctools 20061117_0
---> Activating odcctools 20061117_0
---> Cleaning odcctools

Done.

Next, I tried to continue the installation of matplotlib (e.g. sudo port install py25-matplotlib ), but <sigh> now g95 won't compile...

[UPDATE 22 Sat, 2007: py25-matplotlib, including g25 now installs via Macports!!]

Filed under: Python Leave a comment
Comments (1) Trackbacks (0)

Leave a comment


Trackbacks are disabled.