help-octave
[Top][All Lists]
Advanced

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

compiling development sources on mac


From: Rob Mahurin
Subject: compiling development sources on mac
Date: Wed, 16 Dec 2009 18:11:34 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

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

The error message refers to the snippet in libgnu/string.h (which is 
autogenerated)

        /* Copy N bytes of SRC to DEST, return pointer to bytes after the
           last written byte.  */
        #if 1
        # if ! 0
        extern void *mempcpy (void *restrict __dest, void const *restrict __src,
                              size_t __n)
             _GL_ARG_NONNULL ((1, 2));
        # endif
        #elif defined GNULIB_POSIXCHECK
        # undef mempcpy
        # define mempcpy(a,b,n) \
            (GL_LINK_WARNING ("mempcpy is unportable - " \
                              "use gnulib module mempcpy for portability"), \
             mempcpy (a, b, n))
        #endif

I can change "#if 1" to "#if 0" in the autogenerated file and the
compilation continues.  It looks like the generated file would have
property if @GNULIB_MEMPCPY@ were false when libgnu/string.h gets
generated.  How do I set this?  Is that the right solution?

(2) complaint about version of lex

If I continue the build, it eventually fails at

        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-builtins.lo -MD -MP -MF .deps/liboctinterp_la-builtins.Tpo -c 
builtins.cc  -fno-common -DPIC -o .libs/liboctinterp_la-builtins.o
        builtins.cc:22357:2: error: #error lex.l requires flex version 2.5.4 or 
later
        builtins.cc:22584: error: stray '\' in program
        [ many stray '\' errors ]


I get this error with both flex 2.5.33 and 2.5.35, so the check is
wrong somehow.  I can convert the first #error to a #warning, but the
"stray \" errors remain.  I don't know very much about flex.

Advice?  I've attached a config.log.

Thanks,
Rob Mahurin

Attachment: config.log.gz
Description: application/gunzip


reply via email to

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