Problems compiling cruft-cleanout branch on Snow Leopard and Ubuntu 9.10

Simon Knight simon.knight at gmail.com
Mon Nov 16 05:50:46 UTC 2009


Hi,
I have been trying to compile the cruft-cleanout branch on both Snow
Leopard and Ubuntu 9.10, without luck. I have been following the
instructions at http://irrtoolset.isc.org/wiki/CruftCleanout
On Snow Leopard, following these steps:
    svn co svn://irrtoolset.isc.org/branches/cruft-cleanout
    cd cruft-cleanout
    glibtoolize
    autoreconf -i
    automake
     ./configure
    make

Gives the error:

g++ -DHAVE_CONFIG_H -I. -I../../src     -g -O2  -MT command.l.o -MD
-MP -MF .deps/command.l.Tpo -c -o command.l.o command.l.cc
command.l:85: error: redefinition of ‘int commandlineno’
command.l.cc:362: error: ‘int commandlineno’ previously defined here
make: *** [command.l.o] Error 1

command.l.cc lines 358-362:
typedef int yy_state_type;

extern int commandlineno;

int commandlineno = 1;

and command.l lines 84-86:
#ifndef HAVE_YYLINENO
int yylineno;
#endif // HAVE_YYLINENO

Versions:
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
bison (GNU Bison) 2.4.1

I am not sure what the cause of this error is. I know Snow Leopard has
caused issues for other software packages to compile, has anyone had
any luck with it and irrtoolset?


******
On Ubuntu 9.10, I get the error:
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src -g -O2 -MT
prefix.lo -MD -MP -MF .deps/prefix.Tpo -c prefix.cc  -fPIC -DPIC -o
.libs/prefix.o
prefix.cc: In member function ‘void PrefixRange::parse(const char*)’:
prefix.cc:187: error: invalid conversion from ‘const char*’ to ‘char*’
prefix.cc:189: error: invalid conversion from ‘const char*’ to ‘char*’
prefix.cc:192: error: invalid conversion from ‘const char*’ to ‘char*’
prefix.cc: In member function ‘void IPv6PrefixRange::parse(const char*)’:
prefix.cc:596: error: invalid conversion from ‘const char*’ to ‘char*’


Versions:
g++ (Ubuntu 4.4.1-4ubuntu8) 4.4.1
bison (GNU Bison) 2.4.1

This looks to be related to version 4.4 of GCC that Ubuntu 9.10 uses
by default - http://gcc.gnu.org/gcc-4.4/porting_to.html
It might be worth updating the wiki to reflect this.

Thanks!
Simon



More information about the irrtoolset mailing list