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 » 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 » 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: 2641
Joined: Thu Feb 13, 2003 11:57 am

Re: Rsyslogd 3 on Solaris 10 x64

Postby ksedgwic » 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 » 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 » 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 » 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

Re: Rsyslogd 3 on Solaris 10 x64

Postby Celtic_bhoy » Wed Jan 14, 2009 3:11 pm

I have exactly the same problem as described in the above thread

my output follows

mv -f .deps/librsyslog_la-glbl.Tpo .deps/librsyslog_la-glbl.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_PATH_MODDIR=\"/usr/local/lib/rsyslog/\" -I.. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT librsyslog_la-conf.lo -MD -MP -MF .deps/librsyslog_la-conf.Tpo -c -o librsyslog_la-conf.lo `test -f 'conf.c' || echo './'`conf.c
gcc -DHAVE_CONFIG_H -I. -I.. -D_PATH_MODDIR=\"/usr/local/lib/rsyslog/\" -I.. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT librsyslog_la-conf.lo -MD -MP -MF .deps/librsyslog_la-conf.Tpo -c conf.c -fPIC -DPIC -o .libs/librsyslog_la-conf.o
gcc: unrecognized option `-pthread'
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:52: warning: shadowed declaration is here
In file included from /usr/include/netinet/in.h:41,
from ./net.h:27,
from ../tools/syslogd.h:85,
from conf.c:53:
/usr/include/sys/stream.h:115: error: conflicting types for 'queue_t'
./queue.h:162: error: previous declaration of 'queue_t' was here
conf.c: In function `doIncludeDirectory':
conf.c:113: error: `NAME_MAX' undeclared (first use in this function)
conf.c:113: error: (Each undeclared identifier is reported only once
conf.c:113: error: for each function it appears in.)
make[2]: *** [librsyslog_la-conf.lo] Error 1
make[2]: Leaving directory `/root/rsyslog-3.20.2/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/rsyslog-3.20.2'
make: *** [all] Error 2


I am attempting to install rsyslog on the following machine

SunOS pr2341 5.8 Generic_117350-39 sun4u sparc SUNW,Sun-Fire-280R

I have attempted with the following versions rsyslog-3.18.2 rsyslog-3.20.2 rsyslog-4.1.3

without success.

Can anyone confirm if the patch suggested by ksedgwic above is acceptable ?

Or direct me to a version which I can install cleanly. It does not have to be a stable version but a stable version would
be appreciated or am I picking up the wrong packages completely.

Any help much apprecaited

Charlie Clark
Celtic_bhoy
New
 
Posts: 8
Joined: Wed Jan 14, 2009 2:52 pm

Re: Rsyslogd 3 on Solaris 10 x64

Postby rgerhards » Wed Jan 14, 2009 3:42 pm

Unfortunately I lost a lot of funding due to the financial crisis. The "victims" of this are primarily feature that I think an Enterprise is interested in (in the hopes that one may come along and sponsor it ;)). I have just re-checked my thoughts and have also seen that we have a sponsoring request open: http://www.rsyslog.com/Article313.phtml

If the local system log socket is not needed, porting it should be much easier. But I think there is still a couple of things to touch. I remember that somebody mentioned (maybe even in this thread) that Solaris has a queue_t, which we also have and so this needs to be tweaked. Many other things too. If you go for the integration, I can probably help you every now and then, but I unfortunately have currently very limited time to work on those things. It's a shame... (I'd really like to see rsyslog run on Solaris).

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

Re: Rsyslogd 3 on Solaris 10 x64

Postby SunTzuTech » Tue Jan 27, 2009 4:07 pm

Celtic_bhoy wrote:I have exactly the same problem as described in the above thread

my output follows

mv -f .deps/librsyslog_la-glbl.Tpo .deps/librsyslog_la-glbl.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_PATH_MODDIR=\"/usr/local/lib/rsyslog/\" -I.. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT librsyslog_la-conf.lo -MD -MP -MF .deps/librsyslog_la-conf.Tpo -c -o librsyslog_la-conf.lo `test -f 'conf.c' || echo './'`conf.c
gcc -DHAVE_CONFIG_H -I. -I.. -D_PATH_MODDIR=\"/usr/local/lib/rsyslog/\" -I.. -pthread -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT librsyslog_la-conf.lo -MD -MP -MF .deps/librsyslog_la-conf.Tpo -c conf.c -fPIC -DPIC -o .libs/librsyslog_la-conf.o
gcc: unrecognized option `-pthread'
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:52: warning: shadowed declaration is here
In file included from /usr/include/netinet/in.h:41,
from ./net.h:27,
from ../tools/syslogd.h:85,
from conf.c:53:
/usr/include/sys/stream.h:115: error: conflicting types for 'queue_t'
./queue.h:162: error: previous declaration of 'queue_t' was here
conf.c: In function `doIncludeDirectory':
conf.c:113: error: `NAME_MAX' undeclared (first use in this function)
conf.c:113: error: (Each undeclared identifier is reported only once
conf.c:113: error: for each function it appears in.)
make[2]: *** [librsyslog_la-conf.lo] Error 1
make[2]: Leaving directory `/root/rsyslog-3.20.2/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/rsyslog-3.20.2'
make: *** [all] Error 2


I am attempting to install rsyslog on the following machine

SunOS pr2341 5.8 Generic_117350-39 sun4u sparc SUNW,Sun-Fire-280R

I have attempted with the following versions rsyslog-3.18.2 rsyslog-3.20.2 rsyslog-4.1.3

without success.

Can anyone confirm if the patch suggested by ksedgwic above is acceptable ?

Or direct me to a version which I can install cleanly. It does not have to be a stable version but a stable version would
be appreciated or am I picking up the wrong packages completely.

Any help much apprecaited

Charlie Clark


My employer standardized on 3.20.3 before realizing that solaris support wasn't there, so
I am tasked with getting the port work.

I've used the patches above against the 3.20.3 base, and the patches apply with a bit
of offset fuzz, but for the most part, they appear to be clean enough to move forward.

What wasn't discussed in the patch, is that you have to redo the configure script
with aclocal. I've run into a problem with RELP, which I've never heard about.

Ben
SunTzuTech
New
 
Posts: 2
Joined: Tue Jan 27, 2009 4:03 pm

Re: Rsyslogd 3 on Solaris 10 x64

Postby SunTzuTech » Tue Jan 27, 2009 7:16 pm

rgerhards wrote:Unfortunately I lost a lot of funding due to the financial crisis. The "victims" of this are primarily feature that I think an Enterprise is interested in (in the hopes that one may come along and sponsor it ;)). I have just re-checked my thoughts and have also seen that we have a sponsoring request open: http://www.rsyslog.com/Article313.phtml

If the local system log socket is not needed, porting it should be much easier. But I think there is still a couple of things to touch. I remember that somebody mentioned (maybe even in this thread) that Solaris has a queue_t, which we also have and so this needs to be tweaked. Many other things too. If you go for the integration, I can probably help you every now and then, but I unfortunately have currently very limited time to work on those things. It's a shame... (I'd really like to see rsyslog run on Solaris).

Rainer


I can build rsyslogd-3.20.3 with the above patch, and a quick fix to some code that
was added to rsyslogd after the patch was created, and it works on Solaris 10 x86/sparc
in standalone mode. will be testing it more later. Am also trying to get one of my
C code warriors I know to perhaps figure out the issue with the local logging.

a quick "aclocal -I/usr/local/share/aclocal -I/usr/share/aclocal" and setting LDFLAGS
so that gcc will pickup it's libraries, and it built and ran in debug mode with no
fiddling. On my system, I had to add autoconf, automake, gnu m4, gmake,
libsigsegv, libtool and perl from SunFreeware in addition to what was already there.

I'll post a patch later today or tommorow, once I'm sure it's building with no issues.

Thanks to the OP. I was just starting to work on the port when I happend on this
patch.

The bad news:

there appears to be some issue with how it looks up strerror_r on Solaris 9 (which
Solaris 9 does not have), but yet still uses it. any autofoo warriors out there?
I'm assuming I'll see the same issue on Solaris 8 as well...
Ben
SunTzuTech
New
 
Posts: 2
Joined: Tue Jan 27, 2009 4:03 pm

Re: Rsyslogd 3 on Solaris 10 x64

Postby rgerhards » Tue Mar 24, 2009 4:45 pm

Looks like I have finally spotted the original contributor of the Solaris patch ;)

I have integrated it meanwhile, there is also a blog post about the limit.

Just thought I let you know.

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

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron