From 06b98a56d4422647cffae9b52577cf2ae8aa8991 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 25 Nov 2009 15:57:38 +0100 Subject: doc: added info on compile settings for atomic ops when building from source --- doc/build_from_repo.html | 29 +++++++++++++++++++++++++++-- doc/manual.html | 1 + 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/doc/build_from_repo.html b/doc/build_from_repo.html index 8d3b20fe..a06863e1 100644 --- a/doc/build_from_repo.html +++ b/doc/build_from_repo.html @@ -43,12 +43,37 @@ you downloaded an official distribution tarball (see the rsyslog install guide, starting at step 2, for further details about that). +

Special Compile-Time Options

+

On some platforms, compile-time issues occur, like the one shown below: +


+make[2]: Entering directory `/home/az/RSyslog/rsyslog-5.5.0/tools'
+  CCLD   rsyslogd
+rsyslogd-omfile.o: In function `getClockFileAccess':
+/home/az/RSyslog/rsyslog-5.5.0/tools/omfile.c:91: undefined reference to `__sync_fetch_and_add_8'
+/home/az/RSyslog/rsyslog-5.5.0/tools/omfile.c:91: undefined reference to `__sync_fetch_and_add_8'
+/home/az/RSyslog/rsyslog-5.5.0/tools/omfile.c:91: undefined reference to `__sync_fetch_and_add_8'
+
+

Note that the exact error messages can be different. These type of errors stem down to +atomic instruction support in GCC, which is somewhat depending on the machine architecture it +compiles code for. Very old machines (like the original i386) do not even at all provide support +for these instructions. +

The availability of atomic instructions is vital for rsyslog - it can not be built without them. +Consequently, there is a configure check included for them. But under some circumstances, +GCC seems to report they are available, but does not provide implementations for +all of them (at least this is my observation...). The simple cure is to make sure that +GCC generates code for a modern-enough architecture. This, for example, can be done as +follows: +


+./configure CFLAGS="-march=i586 -mcpu=i686" --enable-imfile ... (whatever you need)
+
+

These settings should resolve the issue . +

[manual index] [rsyslog site]

This documentation is part of the rsyslog project.
-Copyright © 2008 by Rainer Gerhards and +Copyright © 2008, 2009 by Rainer Gerhards and Adiscon. Released under the GNU GPL -version 1.2 or higher.

+version 3 or higher.

diff --git a/doc/manual.html b/doc/manual.html index 480bf56c..c672af58 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -69,6 +69,7 @@ syslog sender over NAT (online only)
  • debug support in rsyslog
  • Developer Documentation
  • -- cgit v1.2.3