octave doesn't build DSO's with -fPIC
Ben Abbott
bpabbott at mac.com
Thu Dec 6 21:05:22 CST 2007
On Dec 6, 2007, at 6:52 PM, Ben Abbott wrote:
>
> On Dec 6, 2007, at 6:19 PM, John W. Eaton wrote:
>
>> On 6-Dec-2007, Ben Abbott wrote:
>>
>> | On Thursday, December 06, 2007, at 03:03PM, "John W. Eaton" <jwe at bevo.che.wisc.edu
>>> wrote:
>> | >On 6-Dec-2007, Jack Howarth wrote:
>> | >
>> | >| I noticed while building octave 2.9.18 on Leopard that, for
>> | >| Darwin at least, octave is not properly using the -fPIC compiler
>> | >| flag when creating objects for shared libraries. Linking non-PIC
>> | >| code into shared libraries can introduce obscure bugs and is
>> | >| discouraged.
>> | >
>> | >Perhaps this is the real source of all the trouble on Intel Mac
>> OS X
>> | >systems. Would someone please try the following patch and see if
>> it
>> | >fixes the problems? After applying it, you'll need to run
>> | >
>> | > ./autogen.sh
>> | >
>> | >to regenerate the configure script, then configure and build as
>> usual.
>> | >
>> | >Since the lines that are changed should be copied verbatim into
>> the
>> | >configure script, you might also get away with patching configure
>> | >directly.
>> | >
>> | >jwe
>> | >
>> |
>> | I don't consider my results to be conclusive. I compiled octave
>> using g95, but the dependencies may have used gfortran.
>> |
>> | ./configure '--prefix=/sw' '--infodir=${prefix}/share/info' '--
>> mandir=${prefix}/share/man' '--libexecdir=${prefix}/lib' '--
>> build=i386-apple-darwin' 'build_alias=i386-apple-darwin' 'CFLAGS=-O0
>> -g -ggdb3' 'LDFLAGS=-L/sw/lib' 'CPPFLAGS=-I/sw/include' 'CXXFLAGS=-
>> O0 -g -ggdb3' 'F77=/sw/bin/g95' 'FFLAGS=-O0'
>> |
>> | In any event, the problem with strptime apparently remains. During
>> "make check"
>> |
>> | scripts/time/datevec.m .................................panic:
>> Bus error -- stopping myself...
>> |
>> | John, is there a simple way to force the configure process to
>> treat my system's strptime as being broken? (I'm a matlab/octave and
>> fortran guy, and quickly get lost looking at shell scripts and c/c++
>> code).
>>
>> So you applied the patch, regenerated the configure script, ran
>> configure again, and the compile used -fPIC? If so, and the crash is
>> still happening, then I don't have any clues.
>
> Yes, I (1) applied the patch, (2) ./autogen.sh, (3) ./configure ... ,
> (4) make, (5) make check
>
by any chance should the sequence be (2), (1), (3), (4) and (5)?
Ben
More information about the Bug-octave
mailing list