0
votes

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

1
The important part seems to be “error: C compiler cannot create executables”. Do you do have a compiler installed? It comes with the developer tools (along with Xcode). Look for it on your install DVD or download from Apple (you will probably need to regerister for a free Apple Developer Connection account to download). - Chris Johnsen

1 Answers

0
votes

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