cfengine compilation errors on Solaris

When building cfengine on Solaris systems, make sure GNU flex and GNU m4 are installed.

Errors when using /usr/ccs/bin/yacc instead of GNU flex:

$ make
...
/bin/bash ../ylwrap cflex.l lex.yy.c cflex.c -- lex 
got /files0/home/hutchib/pkg/cfengine-2\.1\.21/src/
"/files0/home/hutchib/pkg/cfengine-2.1.21/src/cflex.l":line 513: Error: Too many transitions
696/1000 nodes(%e), 11359/12000 positions(%p), 1000/2000 (%n), 178754 transitions,
299/10000 packed char classes(%k),  16007/16000 packed transitions(%a),  0/30000 output slots(%o)
*** Error code 1
make: Fatal error: Command failed for target `cflex.c'
Current working directory /files0/home/hutchib/pkg/cfengine-2.1.21/src
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /files0/home/hutchib/pkg/cfengine-2.1.21/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

Note: If you are installing GNU flex from Sunfreeware, you may also need to install the libintl and libiconv packages.

$ flex
ld.so.1: flex: fatal: libintl.so.3: open failed: No such file or directory
Killed

$ flex
ld.so.1: flex: fatal: libiconv.so.2: open failed: No such file or directory
Killed

Errors when using /usr/ccs/bin/m4 instead of GNU m4:

/bin/bash ../ylwrap cflex.l lex.yy.c cflex.c -- flex 
got /home/hutchib/pkg/cfengine-2\.1\.21/src/
flex: fatal internal error, exec failed
../ylwrap: line 82: 13243 Broken Pipe             $prog ${1+"$@"} "$input"
*** Error code 1
make: Fatal error: Command failed for target `cflex.c'
Current working directory /home/hutchib/pkg/cfengine-2.1.21/src
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /home/hutchib/pkg/cfengine-2.1.21/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

Back to brandonhutchinson.com.
Last modified: 2007/03/06