[syslog-ng]Trying to compile with SUN's cc compiler.

Jay Davis syslog-ng@lists.balabit.hu
Tue, 29 Apr 2003 13:56:20 -0400


Here is the results after running make.

I had to change this in the configure file:
if test $enable_debug = "yes"; then
        CFLAGS="-Wall -g"
else
#       CFLAGS="-Wall -O2"
        CFLAGS="-w -fast"
fi

-fast is optimzed. -w is supress warnings.

The offending line in objbase.h is:

#ifdef DEBUG_ALLOC

struct ol_string_header
{
  int magic; /* For a sentinel value */
};

#else   /* !DEBUG_ALLOC */

struct ol_string_header {};   <--------------Line 67.

#endif  /* !DEBUG_ALLOC */


My C is a little old. I'll have to crack out my very old Kernigan book.
Can you create a null pointer to a struct like that? Is this a picky
compiler and should ignore it? I was able to get this compiled using.
gcc. I HAVE to get this compiled with the SUN compiler. Yes I am brave.


Making all in utils
sed -e "s,_SCSH_,," make_class.in >make_class
chmod +x make_class
Making all in src
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I.
-I/export/epm/syslog-ng/libol-0.3.9/src -I.   -D_GNU_SOURCE  -w -fast -c
format.c
rm -f .libs/format.lo
cc -DHAVE_CONFIG_H -I. -I/export/epm/syslog-ng/libol-0.3.9/src -I.
-D_GNU_SOURCE -w -fast -c format.c          -KPIC -DPIC -o format.o
cc: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=v8plusa which generates code that does not run on pre-UltraSPARC
processors
"./objbase.h", line 67: syntax error before or at: }
"./objbase.h", line 73: incomplete struct/union/enum ol_string_header:
header
"./objbase.h", line 81: cannot recover from previous errors
cc: acomp failed for format.c
*** Error code 1
make: Fatal error: Command failed for target `format.lo'
Current working directory /export/epm/syslog-ng/libol-0.3.9/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

--
Jay Davis
Cell: 443-253-0469