views:

402

answers:

2

Trying to install the Miscellaneous Package into Octave, I get this string of errors:

octave-3.2.3:17> pkg install miscellaneous-1.0.9.tar.gz configure: error: in /var/folders/0o/0ox7a-rlFVGd8pZnuF96sE+++TM/-Tmp-/oct-zTlMUh/miscellaneous-1.0.9/src': configure: error: C compiler cannot create executables See config.log' for more details. the configure script returned the following error: checking for gcc... gcc checking for C compiler default output file name... error: called from `pkg>configure_make' in file /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/pkg/pkg.m near line 1240, column 2 error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/pkg/pkg.m at line 714, column 5 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7

What is this trying to tell me? Where should I go?

Mike Briggs

A: 

I'm not sure it's related but if you are using the prepackaged Octave.app version 3.2.3 you need to reconfigure the file Octave.app/Contents/Resources/bin/mkoctfile-3.2.3 so that it will build installed packages in 32bit instead of 64bit...

The solution is to add the following snippet

CFLAGS="-m32 ${CFLAGS}" 
FFLAGS="-m32 ${FFLAGS}" 
CPPFLAGS="-m32 ${CPPFLAGS}" 
CXXFLAGS="-m32 ${CXXFLAGS}"
LDFLAGS="-m32 ${LDFLAGS}" 

in the file Octave.app/Contents/Resources/bin/mkoctfile-3.2.3 just after the "set -e" line. The problem was that in Snow Leopard compilers try always to build in 64bit, while libraries shipped with Octave are 32 bit. The -m32 flag forces the compiler to build 32bit
programs. - Guido

Original Post

Ben
I apologize for taking so long to respond. Either the alerts did not make it to my inbox, or I just plain missed them. Ben and Chris, thank you for your responses. I will try the snippet after finals are over and report back. -- Mike Briggs
Mike Briggs
A: 

I was struggling with this problem, followed your advice, and it worked perfectly! Many thanks!