octave-maintainers
[Top][All Lists]
Advanced

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

Re: compiling development sources on mac


From: Ben Abbott
Subject: Re: compiling development sources on mac
Date: Fri, 18 Dec 2009 16:33:11 -0500

On Friday, December 18, 2009, at 12:16PM, "Rob Mahurin" <address@hidden> wrote:
>On Thu, Dec 17, 2009 at 06:47:21PM -0500, Ben Abbott wrote:
>> On Dec 16, 2009, at 6:11 PM, Rob Mahurin wrote:
>> > I'm trying to build the octave development sources on OS X 10.5.8,
>> > using dependencies installed via MacPorts.  I haven't tried to build
>> > development sources since before gnulib/libtool was added to the process.
>> > Currently I can get stuck in one of two places.
>> > 
>> > (1) trouble with libgnu/string.h
>> > 
>> > My refresh-and-compile command is
>> > 
>> >    hg pull && 
>> >    hg update && 
>> >    LIBTOOLIZE=glibtoolize ./autogen.sh &&  
>> >    ./configure CC=gcc-mp-4.3 CXX=g++-mp-4.3 F77=gfortran-mp-4.3 
>> > LDFLAGS=-L/opt/local/lib && 
>> >    nice make -j4 
>> > 
>> > The compile fails with
>> > 
>> >    libtool: compile:  g++-mp-4.3 -DHAVE_CONFIG_H -I. -I.. 
>> > -I/opt/local/include -I../libgnu -I../libcruft/misc -I../liboctave 
>> > -I../liboctave -I. -I. -I/opt/local/include -g -O2 -DHAVE_CONFIG_H 
>> > -mieee-fp -I/opt/local/include/freetype2 -I/opt/local/include 
>> > -I/opt/local/include -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 
>> > -D_THREAD_SAFE -g -O2 -MT liboctinterp_la-lex.lo -MD -MP -MF 
>> > .deps/liboctinterp_la-lex.Tpo -c lex.cc  -fno-common -DPIC -o 
>> > .libs/liboctinterp_la-lex.o
>> > In file included from lex.cc:20:
>> >    ../libgnu/string.h:135: error: expected ',' or '...' before '__dest'
>> >    ../libgnu/string.h:137: error: nonnull argument with out-of-range 
>> > operand number (argument 1, operand 2)
>> >    lex.cc:281: warning: use of old-style cast
>> >    [many more warnings about old-style casts]
>> >    make[3]: *** [liboctinterp_la-lex.lo] Error 1
>> >    make[2]: *** [all] Error 2
>> >    make[1]: *** [all-recursive] Error 1
>> >    make: *** [all] Error 2
>> 
>> Rob,
>> 
>> I came across the thread below.
>> 
>>      
>> http://old.nabble.com/string.h:82:-error:-expected-`,'-or-`...'-before-"__dest"-tt17579480.html#a17579907
>> 
>> Which prompted me to add the line below at the top of md5.c ... My
>> error was different from yours. My build failed at md5.c, not with
>> lex.cc
>> 
>>      #include <config.h>
>> 
>> I needed to add this line to the top of ...
>> 
>>      liboctave/md5.c
>>      src/gl2ps.c
>> 
>> With those two changes, my build completed without error. However it
>> doesn't run due to dylib conflicts which, I understand, are specific
>> to my configuration.
>
>Thanks.  Today I have to modify those files as well.
>
>If I insert an include statement at the top of lex.cc, the
>compile continues.  However, lex.cc is not part of the developer
>sources:
>
>       $ rm src/lex.cc && make -C src lex.cc
>       /bin/sh ../build-aux/ylwrap lex.ll lex.octave_.c lex.cc -- flex -I -I
>
>The generated lex.cc includes <config.h> about twelve hundred lines
>in, where the contents of lex.ll appear.  But <string.h> is included
>in the generated output up near the top of the file.  Is there a
>"right" way to include <config.h> near the top of lex.cc, since that's
>apparently a gnulib requirement?
>
>> p.s. as this discussion related to the developers sources, I've
>> moved it to the maintainers mail list.
>
>Thanks.  In my original message I described a second failure in
>builtins.cc.  My build now stops there.  Should I re-post details to
>this list?
>
>Thanks,
>Rob

Yes, please repost.

In the event, it is helpful to you I'm attaching a shell script which builds 
Octave for me on Mac OS 10.6. Octave builds without complaint.

I use Fink for my dependencies. Fink uses gcc 4.4.2 when it can. Since FLKT 
does not build with non-Apple compilers on Mac OSX, Fink uses gcc 4.2.1 for 
FLTK. Mixing gcc 4.4.2 and 4.4.1 appears to be a problem for me since libtool 
was added (I get a bus-error when I try to run octave).

It should be straight forward to modify the script to use MacPorts for the 
dependencies.

If you're able to build successfully, please let me know. Otherwise, I'll be 
waiting for a f90 compiler that playes nice with gcc 4.2.1.

Ben

Attachment: build_octave.sh
Description: Binary data

Attachment: lo-specfun.patch
Description: Binary data


reply via email to

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