octave-maintainers
[Top][All Lists]
Advanced

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

Re: Bad luck building on OSX


From: John Swensen
Subject: Re: Bad luck building on OSX
Date: Fri, 15 Jul 2011 11:43:29 -0400

On Jul 15, 2011, at 8:47 AM, Alexander Klein wrote:

> Hello,
> 
> just yesterday, I finally found the time to build 3.4.2 on OSX (10.6.8). 
> Unfortunately, the build runs fine, and even the naked binary is running:
> 
> [MiniMac:local/src/octave-3.4.2] avatar% src/octave
> GNU Octave, version 3.4.2
> Copyright (C) 2011 John W. Eaton and others.
> This is free software; see the source code for copying conditions.
> There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
> FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.
> 
> Octave was configured for "x86_64-apple-darwin10.8.0".
> 
> Additional information about Octave is available at http://www.octave.org.
> 
> Please contribute if you find this software useful.
> For more information, visit http://www.octave.org/help-wanted.html
> 
> Read http://www.octave.org/bugs.html to learn how to submit bug reports.
> 
> For information about changes from previous versions, type `news'.
> 
> octave:1> 
> 
> 
> Then again, when I try to run it as suggested, it blow up with a memory 
> management error:
> 
> [MiniMac:local/src/octave-3.4.2] avatar% ./run-octave
> GNU Octave, version 3.4.2
> Copyright (C) 2011 John W. Eaton and others.
> This is free software; see the source code for copying conditions.
> There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
> FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.
> 
> Octave was configured for "x86_64-apple-darwin10.8.0".
> 
> Additional information about Octave is available at http://www.octave.org.
> 
> Please contribute if you find this software useful.
> For more information, visit http://www.octave.org/help-wanted.html
> 
> Read http://www.octave.org/bugs.html to learn how to submit bug reports.
> 
> For information about changes from previous versions, type `news'.
> 
> octave(3824) malloc: *** error for object 0x102e8e040: pointer being freed 
> was not allocated
> *** set a breakpoint in malloc_error_break to debug
> panic: Abort trap -- stopping myself...
> octave(3824) malloc: *** error for object 0x102e8e040: pointer being freed 
> was not allocated
> *** set a breakpoint in malloc_error_break to debug
> panic: attempted clean up apparently failed -- aborting...
> Abort
> 
> Any suggestions what I could try to track down the problem?
> 
> Kind regards,
> 
>       Alex

I'm not sure what is causing the problem you are seeing, but would like to give 
my procedures for building the most recent Octave in the most painless way I 
know how.  I would note that this relies heavily on the good people who get it 
working in the MacPorts system and I just piggyback off of them.  I think it is 
possible that using this procedure could break at any time if things change in 
the Octave build process, 

1) Install MacPorts (this can be tricky your first time)
2) Build the octave-devel port:   >> sudo port build octave-devel
        a) This will build a whole slew of dependencies to go along with it.
        b) The built sources for Octave 3.4.2 will reside in: 
                <install location of 
macports>/var/macports/build/_<install>_<location>_var_macports_sources_rsync.macports.org_release_ports_math_octave-devel/work/octave-3.4.2
             For my macports setup, this is
                
/opt/local-nativegtk/var/macports/build/_opt_local-nativegtk_var_macports_sources_rsync.macports.org_release_ports_math_octave-devel/work/octave-3.4.2
3) Run this version of Octave and determine the options that were passed to 
'configure'
        octave:2> octave_config_info.config_opts
4) Get the latest sources from the Octave repository
        a) Modify the configure options you retrieved to install in an 
appropriate location.  
        b) Note that to get configure to work right I had to add two items.  I 
had to add 
                CPPFLAGS="-I/opt/local-native/include" to get configure to find 
things like ATLAS, FreeType, etc
                        and
                add -L/opt/local-native/lib to the LDFLAGS option to get it to 
find libraries like readline and others
        For my setup, I use
        ./autogen.sh
        ./configure --prefix=/opt/octave/hg20110715 
--disable-dependency-tracking --without-x --disable-docs 
--with-cholmod="-lcholmod -lmetis" CC=/opt/local-native/bin/gcc-mp-4.4 
CFLAGS="-pipe -O2 -m64" LDFLAGS="-L/opt/local-native/lib 
/opt/local-native/lib/gcc44/libstdc++.6.dylib" 
CXX=/opt/local-native/bin/g++-mp-4.4 CXXFLAGS="-pipe -O2 -m64" 
F77=/opt/local-native/bin/gfortran-mp-4.4 FFLAGS="-pipe -O2 -m64" 
CPPFLAGS="-I/opt/local-native/include"
        make
        sudo make install

I haven't had this procedure fail or give me a non-working binary in quite a 
while, however that isn't saying that it never will.  This may seem pretty 
involved at first glance, but it ends up being a pretty easy cookbook to follow 
given that the MacPorts folks have figured out how to build the latest tarball 
of Octave.  Of course, this doesn't help much at all if you are trying to get a 
Fink/MacPorts-free build of Octave with all the bells and whistles or if 
something happened in the Octave build system to break it.

<<BEGIN STARTUP TEXT>>
lcsr-jpswensen:octave jpswensen$ ./run-octave
GNU Octave, version 3.5.0+
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-apple-darwin10.8.0".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

octave:1> 
<<END STARTUP TEXT>>

Hope this helps (or is at least useful to someone),
John Swensen





reply via email to

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