octave 3.6.2 not even configured on 10.8 #13879

Closed
PeterNSteinmetz opened this Issue Aug 2, 2012 · 24 comments

Projects

None yet

9 participants

Just tried building octave, which is now at version 3.6.2, under MacOS 10.8 "Mountain Lion".

The build doesn't even finish the configuration, with the complaint that:

checking whether /usr/local/bin/gfortran generates correct size integers... no
configure: error: your Fortran compiler must have an option to make integers the same size as octave_idx_type (int).  See the file INSTALL for more information.

Some type of 32 vs 64 bit integer problem? I assume this formula used to work under Lion.

Member
mxcl commented Aug 2, 2012

Someone mentions octave here: #13787.

Curious, doing export EXPORT LANG=EN causes it to configure, but then runs into a different error during make all, concerning the definition of the F77_FUNC macro in libcruf/misc/f77-fcn.h and f77-fcn.c.

This is also mentioned in the thread referenced by me above. Apparently this problem arises because during configuration the name mangling for fortran is not properly determined and the definition of F77_FUNC is never written out.

This same problem also arises if one tries to modify the formula and compile the older version 3.2.4.

Owner

Can you see if this was fixed by 00ba4df? Thanks!

Looks like 00ba4df still has problems, this version is not finishing the configuration.

checking for Fortran 77 name-mangling scheme... configure: error: in `/private/tmp/homebrew-octave-3.6.2-lSo3/octave-3.6.2':
configure: error: cannot compile a simple Fortran program

If you want, I can provide the config.log (but need to know how to do that)

chinux23 commented Aug 8, 2012

Looks like I am not alone here. I got into the same problem building from the source of octave on mountain lion.

@mxcl mxcl was assigned Aug 31, 2012
Member
mxcl commented Aug 31, 2012

Could use a config.log.

The errors at the end of the install run:


checking whether we are using the GNU Fortran 77 compiler... yes
checking whether /usr/local/bin/gfortran accepts -g... yes
checking how to get verbose linking output from /usr/local/bin/gfortran... -v
checking for Fortran 77 libraries of /usr/local/bin/gfortran...  -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lm -lgfortranbegin -lgfortran
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... unknown
configure: WARNING: unknown Fortran name-mangling scheme
configure: defining FFLAGS to be -O
checking whether /usr/local/bin/gfortran generates correct size integers... no
configure: error: your Fortran compiler must have an option to make integers the same size as octave_idx_type (int).  See the file INSTALL for more information.
config.log was copied to /Users/peter/Library/Logs/Homebrew
==> Exit Status: 1
https://github.com/mxcl/master/blob/master/Library/Formula/octave.rb#L85
==> Build Environment
HOMEBREW_VERSION: 0.9.3
HEAD: 174e84b44248b44a3fd4da19611ba3e8c83b99bb
CPU: dual-core 64-bit penryn
OS X: 10.8.1-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
X11: 2.7.2 in /opt/X11
LD: cc
CFLAGS: -D_REENTRANT
CXXFLAGS: -D_REENTRANT
MAKEFLAGS: -j1
CMAKE_PREFIX_PATH: /usr/local/opt/texinfo:/usr/local/opt/readline:/usr/local:/usr/X11
CMAKE_INCLUDE_PATH: /usr/X11/include/freetype2:/usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
HOMEBREW_MAKE_JOBS: 1
ACLOCAL_PATH: /usr/local/share/aclocal:/opt/X11/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/texinfo/bin:/usr/local/bin:/usr/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: Failed executing: ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.2 --with-blas=-Wl,-framework\ -Wl,Accelerate --with-umfpack=-lumfpack\ -lsuitesparseconfig --without-framework-carbon (octave.rb:85)

The output from brew doctor:

Warning: You may have installed MacGPG2 via the package installer.
Several other checks in this script will turn up problems, such as stray
dylibs in /usr/local and permissions issues with share and man in /usr/local/.
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libblkid.2.0.dylib    /usr/local/lib/libcharset.1.0.0.dylib    /usr/local/lib/libcom_err.1.1.dylib    /usr/local/lib/libe2p.2.1.dylib    /usr/local/lib/libext2fs.2.1.dylib    /usr/local/lib/libgcc_s.1.dylib    /usr/local/lib/libgcc_s.10.4.dylib    /usr/local/lib/libgcc_s.10.5.dylib    /usr/local/lib/libgcrypt.11.5.2.dylib    /usr/local/lib/libgfortran.2.0.0.dylib    /usr/local/lib/libgpg-error.0.5.0.dylib    /usr/local/lib/libiconv.2.4.0.dylib    /usr/local/lib/libss.1.0.dylib    /usr/local/lib/libtcl8.4.dylib    /usr/local/lib/libtcl8.5.dylib    /usr/local/lib/libtk8.4.dylib    /usr/local/lib/libtk8.5.dylib    /usr/local/lib/libusb-0.1.4.4.4.dylib    /usr/local/lib/libusbpp-0.1.4.4.4.dylib    /usr/local/lib/libuuid.1.1.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
    /usr/local/lib/libgfortran.la    /usr/local/lib/libusbpp.la
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libassuan-pth.a    /usr/local/lib/libassuan.a    /usr/local/lib/libgfortran.a    /usr/local/lib/libtclstub8.4.a    /usr/local/lib/libtclstub8.5.a    /usr/local/lib/libtkstub8.4.a    /usr/local/lib/libtkstub8.5.a
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

    brew install p11-kit

Run `brew missing` for more details.
Member
mxcl commented Aug 31, 2012

The config.log is cut short. Please paste it in a gist.

While we're at it please read this: https://github.com/mxcl/homebrew/wiki/Bug-Fixing-Checklist

Everytime a build fails the last line says "Please read this: https://github.com/mxcl/homebrew/wiki/Bug-Fixing-Checklist" by ignoring that you have upset me.

I did read that actually, but didn't quite get what the business about a gist was about.

I have a private gist for this now now at https://gist.github.com/aaf915674630b0919f7d . Does it need to be public? If so, I'll change it.

Contributor

Please delete the comment above that has the config.log in it

Member
mxcl commented Aug 31, 2012

Builds for me:

==> Summary
/usr/local/Cellar/octave/3.6.2: 1735 files, 44M, built in 38.3 minutes
$ brew -c1
/usr/local-0.9.3 10.8.1 4.4.1-noclt clang-421 llvm-2336 /opt/X11-2.7.2

What is the brew -c1 command? That says unknown command for me.

I just updated to e65131d, which including a change to the octave formula. It is still failing in the configure.

I notice my environment has
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152

whereas the output of the brew -c1 command has -noclt, no sure if that matters.

Could it be 'bottled' so we don't all have to build it?

gag commented Sep 1, 2012

Builds for me too

==> Summary
/usr/local/Cellar/octave/3.6.2: 1735 files, 44M, built in 15.2 minutes
brew install octave  2543.10s user 231.84s system 255% cpu 18:07.15 total
Member
mxcl commented Sep 3, 2012

@adamv is the only one of us who understands fortran stuff properly. Any thoughts Adam?

Really we need someone to step up and support a proper fortran tap.

Contributor
2bits commented Sep 3, 2012

@PeterNSteinmetz You have a 32bit / 64bit clash going on somewhere:

configure:33989: gcc -o conftest -D_REENTRANT -D_THREAD_SAFE -pthread   conftest.c cfortran_test.o -lm    -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lm -lgfortranbegin -lgfortran >&5
ld: warning: ignoring file cfortran_test.o, file was built for i386 which is not the architecture being linked (x86_64): cfortran_test.o
ld: warning: ignoring file /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgfortranbegin.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgfortranbegin.a
ld: warning: ignoring file /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcc.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcc.a
Undefined symbols for architecture x86_64:
  "_FOOBAR_", referenced from:
      _main in cc08MObl.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
configure:33989: $? = 1
[snip conftest]
configure:34089: result: unknown
configure:34144: WARNING: unknown Fortran name-mangling scheme
configure:34387: defining FFLAGS to be -O
configure:34407: checking whether /usr/local/bin/gfortran generates correct size integers

All the Fortran tests are failing with that. It's not normal to see. I'll mess with it some more.

Contributor
2bits commented Sep 3, 2012

What I get on my system doing for that test:

configure:33989: gcc -o conftest -D_REENTRANT -D_THREAD_SAFE -pthread   conftest.c cfortran_test.o -lm    -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/x86_64 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/../../.. -lm -lgfortranbegin -lgfortran >&5
configure:33989: $? = 0
configure:34047: gcc -o conftest -D_REENTRANT -D_THREAD_SAFE -pthread   conftest.c cfortran_test.o -lm    -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/x86_64 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1 -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc -L/usr/local/Cellar/gfortran/4.2.4-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/../../.. -lm -lgfortranbegin -lgfortran >&5
configure:34047: $? = 0
configure:34089: result: lower case, underscore, no extra underscore
configure:34387: defining FFLAGS to be -O
configure:34407: checking whether /usr/local/bin/gfortran generates correct size integers

So what I think is happening is that you didn't install Homebrew's gfortran. At this time, I don't think other Fortran installs work well. @Sharpie is that correct?

In my install it was a problem with gfortran. I had an older gfortran in /usr/local/bin. I did an update and tried brew install gfortran and it complained that there as a problem linking into /usr/local/lib/gcc (which is owned by root and without group write permissions). I changed the ownership of /usr/local/lib/gcc temporarily to me, then finished the install with brew link gfortran, which worked, and then gives

gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

brew install octave now configures and builds!

==> Summary
/usr/local/Cellar/octave/3.6.2: 1735 files, 44M, built in 17.8 minutes

Looking at the octave formula, it seems that the ENV.fortran setting isn't enough for this formula. Perhaps an explicit dependence on brew's gfortran and some sort of fix for the gfortran formula to make it install normally is in order?

Contributor
Sharpie commented Sep 3, 2012

At this time, I don't think other Fortran installs work well. @Sharpie is that correct?

Well, some compilers work and some don't. But the essential point is that Homebrew's GFortran is the only compiler we test with and the only compiler we really have a chance of re-producing bugs with.

If true, then shouldn't that compiler should be installable without the need to change ownership on /usr/local/lib/gcc ?

Contributor
Sharpie commented Sep 3, 2012

If true, then shouldn't that compiler should be installable without the need to change ownership on /usr/local/lib/gcc?

If Homebrew is installed to /usr/local (the default), then the user running Homebrew needs to have write access to /usr/local/lib and all of its subdirectories. Otherwise, symlinking doesn't work as you found out.

If anything, the error message needs to be better, but that is already under discussion in #8850.

Contributor
adamv commented Sep 4, 2012

So is Octave compiling for you now?

Yes, it is. With Sharpie's comment about write access on /usr/local and all subdirs, I will close the issue. Thanks.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.