Rsyslogd 3 on Solaris 10 x64

Everything related with getting rsyslog up and running (but not beyond that point ;))

Moderator: rgerhards

Rsyslogd 3 on Solaris 10 x64

Postby jkempf on Tue Jul 01, 2008 10:13 pm

So I'm using the Solaris 10 05/08 release on AMD64.

Compiler is GCC 4.02, though this has failed with GCC 3.45 also.

# gcc -v
Reading specs from /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/specs
Target: i386-pc-solaris2.8
Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4 --with-local-prefix=/opt/csw --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --enable-shared --enable-multilib --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-system-zlib --enable-languages=c,c++,f95,java,objc,ada
Thread model: posix
gcc version 4.0.2

This was installed from the blastwave.org stable packages.
The output of ./configure is athttp://www.cs.rpi.edu/~kempfj2/rsyslog-fail.txt and I've inlined what happens when I try to compile:

# gmake
gmake all-recursive
gmake[1]: Entering directory `/root/software/rsyslog-3.16.2'
Making all in .
gmake[2]: Entering directory `/root/software/rsyslog-3.16.2'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT lmnet_la-net.lo -MD -MP -MF .deps/lmnet_la-net.Tpo -c -o lmnet_la-net.lo `test -f 'net.c' || echo './'`net.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT lmnet_la-net.lo -MD -MP -MF .deps/lmnet_la-net.Tpo -c net.c -fPIC -DPIC -o .libs/lmnet_la-net.o
gcc: unrecognized option '-pthread'
In file included from action.h:30,
from syslogd.h:28,
from net.c:50:
queue.h:151: error: conflicting types for 'queue_t'
/usr/include/sys/stream.h:123: error: previous declaration of 'queue_t' was here
net.c: In function 'MaskIP6':
net.c:93: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:94: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:95: error: 'struct in6_addr' has no member named 's6_addr32'
net.c: In function 'AddAllowedSender':
net.c:296: error: 'struct in6_addr' has no member named 's6_addr32'
net.c: In function 'MaskCmp':
net.c:507: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:508: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:509: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:519: error: 'struct in6_addr' has no member named 's6_addr32'
net.c:519: error: 'u_int32_t' undeclared (first use in this function)
net.c:519: error: (Each undeclared identifier is reported only once
net.c:519: error: for each function it appears in.)
net.c:519: error: syntax error before 'htonl'
net.c:517: warning: unused variable 'net'
gmake[2]: *** [lmnet_la-net.lo] Error 1
gmake[2]: Leaving directory `/root/software/rsyslog-3.16.2'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/software/rsyslog-3.16.2'
gmake: *** [all] Error 2


So far there are three issues. The first is that the option for pthreads on !linux is -pthreads, not -pthread. The second is that queue_t is getting clobbered. The third is, well, Solaris doesn't include the s6_addr32 declarations that both Linux and FreeBSD do.

The pthreads flag problem is easy enough to fix in configure.ac. I'm not too sure how to proceed about the latter two, as well as whatever other issues will arise after they're fixed.

What's the next step in fixing this?
jkempf
New
 
Posts: 1
Joined: Tue Jul 01, 2008 9:57 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: Rsyslogd 3 on Solaris 10 x64

Postby rgerhards on Wed Jul 02, 2008 7:17 am

Thanks for helping with Solaris support. Could you re-try this with the current development version (3.19.8 or a direct pull from git HEAD)? I assume that you prefer a stable release, but getting it running will require a magnitude of changes that can not go into stable. So Solaris fixes will happen as part of the development version in any case. Given the big delta between 3.16.2 and 3.19.8, I'd like to start with the real thing right from the beginning.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Rsyslogd 3 on Solaris 10 x64

Postby ksedgwic on Mon Jul 28, 2008 4:24 am

I've taken a shot at getting rsyslogd to compile on Solaris.

I started with rsyslog-3.21.0.

I've posted the patch file here:

http://dist.bonsai.com/ken/public/rsysl ... mods.patch

Here is a synopsis of the patch changes:
----------------------------------------------------------------------------------------------------
> gcc: unrecognized option `-pthread'

Added "solaris" os_type value and made pthreads_cflags conditionally
setup "-pthreads" for solaris.

> In file included from ../template.h:28,
> from ../tools/syslogd.h:27,
> from conf.c:53:
> ./regexp.h:32: warning: declaration of 'regex' shadows a global declaration
> /usr/include/libgen.h:73: warning: shadowed declaration is here

The Solaris regex decl seems to conflict with POSIX regexp. Added
OS_SOLARIS define and disabled inclusion of libgen.h on Solaris.

> In file included from /usr/include/netinet/in.h:66,
> from ./net.h:27,
> from ../tools/syslogd.h:85,
> from conf.c:55:
> /usr/include/sys/stream.h:154: error: conflicting types for 'queue_t'
> ./queue.h:162: error: previous declaration of 'queue_t' was here

Changed "queue_t" to "qqueue_t".
Due to macros gluing names and types together did large scale
conversion of "queue" to "qqueue" in queue.{h,c}.

> conf.c: In function `doIncludeDirectory':
> conf.c:115: error: `NAME_MAX' undeclared (first use in this function)
> conf.c:115: error: (Each undeclared identifier is reported only once
> conf.c:115: error: for each function it appears in.)
> conf.c:135: error: too many arguments to function `readdir_r'

Added #define NAME_MAX MAXNAMELEN under OS_SOLARIS.

> conf.c: In function `doIncludeDirectory':
> conf.c:138: error: too many arguments to function `readdir_r'

Added _POSIX_PTHREAD_SEMANTICS=1 under OS_SOLARIS.

> modules.c: In function `Load':
> modules.c:568: error: `PATH_MAX' undeclared (first use in this function)
> modules.c:568: error: (Each undeclared identifier is reported only once
> modules.c:568: error: for each function it appears in.)

Added #define PATH_MAX MAXPATHLEN under OS_SOLARIS.

> wtp.c: In function `wtpStartWrkr':
> wtp.c:484: warning: implicit declaration of function `pthread_yield'

Added #define of pthread_yield to sched_yield under OS_SOLARIS.

> net.c: In function `MaskIP6':
> net.c:437: error: structure has no member named `s6_addr32'
> net.c:438: error: structure has no member named `s6_addr32'

Added s6_addr32 define for OS_SOLARIS.
Added u_int32_t typedef for OS_SOLARIS.

> In file included from ../template.h:28,
> from syslogd.c:144:
> ../runtime/regexp.h:32:
> warning: declaration of 'regex' shadows a global declaration
> /usr/include/libgen.h:73: warning: shadowed declaration is here

Added and removed headers under OS_SOLARIS in tools/syslogd.c
----------------------------------------------------------------------------------------------------

The biggest change was the renaming of rsyslogd's "queue_t" to "qqueue_t"; perhaps there is a better way to hide the Solaris queue_t?

I'm having trouble running the resulting binary. The call to bind in plugins/imuxsock.c is failing with
errno = 48 "Operation not supported". Is it possible that Solaris doesn't support PF_UNIX, SOCK_DGRAM sockets?

Other documentation on the web suggests that Solaris uses a STREAMS socket; what would be the best way to add support for SOCK_STREAM sockets?

Hope this helps!

Ken

Ken Sedgwick
Bonsai Software, Inc.
http://www.bonsai.com/ken/
(510) 610-4162
ken+5a4@bonsai.com
Public Key: http://www.bonsai.com/ken/ken.asc
GPG Fingerprint: 851E 3B07 E586 0843 9434 5CC7 4033 3B9B 3F3F 9640
ksedgwic
New
 
Posts: 1
Joined: Mon Jul 28, 2008 4:01 am

Re: Rsyslogd 3 on Solaris 10 x64

Postby jrivel on Tue Aug 26, 2008 3:24 pm

I'm running into basically the same issues, running OpenSolaris snv_91 on i386 hardware (Sun X2200).
I've tried rsyslog-3.18.3, rsyslog-3.19.11 and rsyslog-3.21.3.

Let me know how you make out. We're currently using syslog-ng, but would like to use some of the functionality that rsyslog offers over syslog-ng, specifically the "store and forward" functionality.

Thanks,
Josh
jrivel
New
 
Posts: 1
Joined: Tue Aug 26, 2008 3:20 pm

Re: Rsyslogd 3 on Solaris 10 x64

Postby puddlejumper on Wed Oct 08, 2008 2:11 am

Solaris 10 - Sun 280 (SPARC) - tyring to use it for network only syslog collection...

rsyslog-3.18.4

bash-3.00# make
make all-recursive
Making all in .
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT lmnet_la-net.lo -MD -MP -MF .deps/lmnet_la-net.Tpo -c -o lmnet_la-net.lo `test -f 'net.c' || echo './'`net.c
gcc -DHAVE_CONFIG_H -I. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT lmnet_la-net.lo -MD -MP -MF .deps/lmnet_la-net.Tpo -c net.c -fPIC -DPIC -o .libs/lmnet_la-net.o
gcc: unrecognized option `-pthread'
In file included from action.h:30,
from syslogd.h:28,
from net.c:50:
queue.h:162: error: conflicting types for 'queue_t'
/usr/include/sys/stream.h:123: error: previous declaration of 'queue_t' was here



bash-3.00# ./configure --disable-pthreads
configure: error: rsyslog v3 does no longer support single threading mode -- use a previous version for that
puddlejumper
New
 
Posts: 2
Joined: Wed Oct 08, 2008 2:07 am

Re: Rsyslogd 3 on Solaris 10 x64

Postby puddlejumper on Wed Oct 08, 2008 2:37 am

same issue on all of the following.

gcc version 3.4.6

rsyslog-2.0.6
rsyslog-3.21.5
rsyslog-3.18.4
puddlejumper
New
 
Posts: 2
Joined: Wed Oct 08, 2008 2:07 am

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron