octave-maintainers
[Top][All Lists]
Advanced

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

Re: More on OSX build problems


From: Matthew Lewis
Subject: Re: More on OSX build problems
Date: Mon, 9 Jan 2012 14:50:36 -0600

So, I took your advice and tried to compile octave 3.4.3 from source
to see if it had the same malloc_error_break.  Here's what I did.....

using Sudo
1) removed gfortran binary package that I had installed from R project
2) removed the following MacPorts: gcc44, gcc_selection, apple-gcc42
3) reinstalled gcc44 MacPort
then in user directory (not using sudo)
4) ran octave-3.4.3/configure with ALL the "-without" flags.
5) this minimal octave binary passes almost all tests, and a 'make
install' puts it in user directory
6) minimize embedded.cc from OCtave Manual to just initialize the
embedded interpreter:
#include <iostream>
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>

int
main (void)
{
     string_vector argv (2);
       argv(0) = "embedded";
       argv(1) = "-q";

       octave_main (2, argv.c_str_vec(), 1);

       return 0;
     }
7) use output of verbose mode of 'mkoctfile', compile embedded.cc
using only library from user folder:

rodimusprime:bin mlewis$ g++-mp-4.4 -c
-I/Users/mlewis/Downloads/tmp/include/octave-3.4.3/octave/..
-I/Users/mlewis/Downloads/tmp/include/octave-3.4.3/octave
-I/Users/mlewis/Downloads/tmp/include   embedded.cc -o embedded.o

rodimusprime:bin mlewis$ g++-mp-4.4
-I/Users/mlewis/Downloads/tmp/include/octave-3.4.3/octave/..
-I/Users/mlewis/Downloads/tmp/include/octave-3.4.3/octave
-I/Users/mlewis/Downloads/tmp/include    -o embedded embedded.o
-L/Users/mlewis/Downloads/tmp/lib/octave/3.4.3
-L/Users/mlewis/Downloads/tmp/lib -loctinterp -loctave

rodimusprime:bin mlewis$ ./embedded
embedded(26352) malloc: *** error for object 0x7f89e866a800: pointer
being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

rodimusprime:bin mlewis$ otool -L ./embedded
./embedded:
        /Users/mlewis/Downloads/tmp/lib/octave/3.4.3/liboctinterp.0.dylib
(compatibility version 1.0.0, current version 1.0.0)
        /Users/mlewis/Downloads/tmp/lib/octave/3.4.3/liboctave.0.dylib
(compatibility version 1.0.0, current version 1.0.0)
        /opt/local/lib/gcc44/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.13.0)
        /opt/local/lib/gcc44/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 159.0.0)
rodimusprime:bin mlewis$

8) I discover the exact same problem as with MacPort octave 3.2.4
perhaps this is a gcc44 problem? anyone seen this before?
any help on figuring this out would be much appreciated?
I want to sort this out before moving to Xcode......

mlewis




On Fri, Jan 6, 2012 at 1:45 PM, Dr. Alexander Klein
<address@hidden> wrote:
> Am 06.01.2012 um 18:01 schrieb mlewis1973:
>
>> embedded(85428) malloc: *** error for object 0x7fa0a9090a90: pointer being
>> freed was not allocated
>> *** set a breakpoint in malloc_error_break to debug
>> Abort trap: 6
>> }}}
>
> Matthew,
>
> this problem turned out to be a real showstopper, and it was only after 
> several days that I was finally able to fix it with Jarno's help. Here's what 
> I did to get it running under Snow Leopard:
>
> I had to track down the library that was getting confused with the system 
> library. In my case, it turned out that the gfortran binary I had installed 
> drags around its own libstdc++.dylib in /usr/local/gfortran/lib, the system 
> has its own version in /usr/lib, and if you have gcc installed, you'll most 
> likely find another one in /usr/local/lib/ if you built from scratch, or some 
> other place if you use a packet manager.
>
> In my case, to make sure that the gcc-version is used in favour of any other 
> version I think that I simply issued
>
> export LDFLAGS="/usr/local/lib/libstdc++.dylib"
>
> before ./configure, and all was fine ever after.
>
> Good luck,
>
>        Alex
>
> --
>          Dr. Alexander Klein, Diplom-Mathematiker
>
> Physiologisches Institut       |               TransMIT Zentrum
> Raum 543                       |        für Numerische Methoden
> Aulweg 129                     |          Heinrich-Buff-Ring 44
> 35392 Giessen                  |                  35392 Giessen
>


reply via email to

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