LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-09-2010, 02:40 PM   #1
forrie
Member
 
Registered: Sep 2003
Distribution: RedHat
Posts: 40

Rep: Reputation: 15
Compiling rsyslog 4.x or 5.x on Redhat 5.5


We want to begin centralizing our system logs to a dedicated server, using a daemon that is flexible and offers more features. After some research, I decided to give rsyslog a whirl (versus syslog-ng). The problem has come down to compilation errors which, unfortunately, I've not been able to resolve otherwise (rsyslog forums) and it appears this is a larger problem with the product. So before I begin making another decision, I wanted to get some input from others here.

Here is a snippet of the errors:

Code:
/usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
    /usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1292: undefined reference to `ATOMIC_SUB'
    /usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
    /usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1292: undefined reference to `ATOMIC_SUB'
    /usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
    ../runtime/.libs/librsyslog.a(librsyslog_la-queue.o):/usr/local/src/rsyslog/rsyslog-5.4.0/runtime/queue.c:1292: more undefined references to `ATOMIC_SUB' follow
    collect2: ld returned 1 exit status
    make[2]: *** [rsyslogd] Error 1
    make[2]: Leaving directory `/usr/local/src/rsyslog/rsyslog-5.4.0/tools'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/rsyslog/rsyslog-5.4.0'
    make: *** [all] Error 2
So where is this ATOMIC_SUB not being defined correctly?

My configure args are very simple:

Code:
./configure --enable-mysql --enable-mail --enable-gui

When I trim this down to just enable mysql, it still has the same errors. Early on in the compile process I see these errors:


Code:
make  all-recursive
    make[1]: Entering directory `/usr/local/src/rsyslog/rsyslog-5.4.0'
    Making all in doc
    make[2]: Entering directory `/usr/local/src/rsyslog/rsyslog-5.4.0/doc'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/usr/local/src/rsyslog/rsyslog-5.4.0/doc'
    Making all in runtime
    make[2]: Entering directory `/usr/local/src/rsyslog/rsyslog-5.4.0/runtime'
      CC     librsyslog_la-rsyslog.lo
      CC     librsyslog_la-glbl.lo
    In file included from glbl.c:42:
    atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"

I tried compiling 5.5.2 and get the same errors.

So at this point it's not looking very promising. I suppose there may be a reason why Redhat's distribution (RPM) only has version 3.x of rsyslog, perhaps related to this.

Any constructive feedback would be welcomed. Even suggestions of a different product/direction.


Thanks.
 
Old 04-09-2010, 04:10 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What version gcc? What are your CFLAGS set to? Try downloading gcccpuopt, and running export CFLAGS=`sh gcccpuopt`. Some of the Google results say that the -march CFLAG is wrong, and gcccpuopt will pick the best one for your CPU.

Last edited by AlucardZero; 04-09-2010 at 04:27 PM.
 
Old 04-09-2010, 04:52 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
http://www.gossamer-threads.com/list...log/users/3404
Bottom of page :
The adding CFLAGS="-march=i686" to the configure script solved my trouble.

http://www.rsyslog.com/doc-build_from_repo.html
./configure CFLAGS="-march=i586 -mcpu=i686" --enable-imfile ... (whatever you need)

So this will do ..
Code:
./configure CFLAGS="-march=i586 -mcpu=i686" --enable-imfile --enable-mysql --enable-mail
Result : make runs with no errors.


I am not sure, you can --enable-gui .
Stops in the ( empty ) java/ directory then :
.. no rule to make target .. ( to non existing files.)
.. .....

Last edited by knudfl; 04-09-2010 at 04:59 PM.
 
Old 04-09-2010, 05:18 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,399

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
More info : The "GIT" version has the GUI files included,
rsyslog/java/com/rsyslog/gui/
http://www.rsyslog.com/doc-build_from_repo.html

git clone git://git.adiscon.com/git/rsyslog.git

cd rsyslog/ && autoreconf -fvi && configure --<options>
&& make ......... And no errors using this :
Code:
./configure CFLAGS="-march=i586 -mcpu=i686" --enable-gui --enable-mysql --enable-mail
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure failover for rsyslog kenneho Linux - Server 1 01-28-2009 08:39 AM
Problem when autostarting rsyslog gatsby Linux - Software 6 09-25-2008 11:05 AM
Problem I faced in using rsyslog prakash.akumalla Linux - Software 0 06-26-2008 04:13 AM
rsyslog issue re-iterated ... prakash.akumalla Linux - Newbie 1 06-26-2008 03:30 AM
anyone using rsyslog? slackamp Slackware 1 10-16-2007 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration