octave-maintainers
[Top][All Lists]
Advanced

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

cannot generate a compliable builtins.cc


From: Rob Mahurin
Subject: cannot generate a compliable builtins.cc
Date: Sat, 19 Dec 2009 15:47:02 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

I am trying to get the development sources to build on OSX 10.5 using
dependencies installed by MacPorts.  Currently my build stops 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-builtins.lo -MD -MP -MF .deps/liboctinterp_la-builtins.Tpo -c 
builtins.cc  -fno-common -DPIC -o .libs/liboctinterp_la-builtins.o
        builtins.cc:22405:2: error: #error lex.l requires flex version 2.5.4 or 
later
        builtins.cc:22632: error: stray '\' in program
        [many more stray '\' errors omitted]
        [ ... ]
        builtins.cc:52: error: expected initializer before '.' token
        In file included from /usr/include/fcntl.h:23,
                         from builtins.cc:46702:
        /usr/include/sys/fcntl.h:377: error: expected declaration before end of 
line
        make[3]: *** [liboctinterp_la-builtins.lo] Error 1
        
The complaint about my lex version, and the "stray '\'" errors, come
from a section of code that seems to include lex.ll rather than
lex.cc.  The "expected initializer" errors come from function
prototypes like

        static void install_bitfcns.cc_fcns (void)

If I change the Makefile rule for generating builtins.cc to

        builtins.cc: $(DEF_FILES:.ll=.cc) mkbuiltins
                $(srcdir)/mkbuiltins $(DEF_FILES:.ll=.cc) > address@hidden
                mv address@hidden $@

and change the function name definitions in mkbuiltins to

        fcn=`echo "$arg" | $SED 's,.*/,,; s/\.(df|cc)//; s/-/_/g;'`
        echo "  install_${fcn}_fcns ();"

then the first error becomes

        In file included from builtins.cc:77:
        ../config.h: In function 'void install_bitfcns_cc_fcns()':
        ../config.h:1317: error: expected unqualified-id before string constant

where the string constant in question comes from a line starting 
with 'extern "C" {'.  That looks like a pretty standard construction,
so I'm not sure I have made anything better.

I've attached a context diff of the changes I made, just to be clear,
but I appreciate any advice.

Thanks,
Rob

Attachment: break_builtins_differently.patch
Description: Text document


reply via email to

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