Errors compiling

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

Moderator: rgerhards

Errors compiling

Postby mesanchez » Fri Mar 19, 2010 8:28 pm

I am new to rsyslog. I am trying to install it and get familiar with its functionality. I was able to configure it but I am getting errors when compiling the code. Following are the details.

Thanks is advance for your help!!!!


my OS:
Linux swtlnx3 2.6.9-34.0.2.EL #1 Fri Jun 30 10:23:19 EDT 2006 i686 i686 i386 GNU/Linux

CONFIGURATION

I ran configure as:
../configure --enable-gui successfully the last messages are:


****************************************************
rsyslog will be compiled with the following settings:

Large file support enabled: yes
Networking support enabled: yes
Regular expressions support enabled: yes
Zlib compression support enabled: yes
rsyslog runtime will be built: yes
rsyslogd will be built: yes
GUI components will be built: yes
custom module 1 will be built: no

---{ input plugins }---
Klog functionality enabled: yes (linux)
imdiag enabled: no
file input module enabled: no
input template module will be compiled: no

---{ output plugins }---
Mail support enabled: no
omprog module will be compiled: no
omstdout module will be compiled: no
omruleset module will be compiled: yes
omudpspoof module will be compiled: no
output template module will be compiled: no

---{ database support }---
MySql support enabled: no
libdbi support enabled: no
PostgreSQL support enabled: no
Oracle (OCI) support enabled: no

---{ protocol support }---
GnuTLS network stream driver enabled: no
GSSAPI Kerberos 5 support enabled: no
RELP support enabled: no
SNMP support enabled: no

---{ debugging support }---
Testbench enabled: yes
Debug mode enabled: no
Runtime Instrumentation enabled: no
Diagnostic tools enabled: no
Enhanced memory checking enabled: no
Valgrind support settings enabled: no



COMPILATION


swtlnx3 [.../rsyslog-5.4.0] make
make all-recursive
make[1]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0'
Making all in doc
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/doc'
Making all in runtime
make[2]: Entering directory `/user/mesanchez/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!"
glbl.c: In function `SetGlobalInputTermination':
glbl.c:136: warning: implicit declaration of function `ATOMIC_STORE_1_TO_INT'
CC librsyslog_la-conf.lo
CC librsyslog_la-parser.lo
parser.c: In function `ParseMsg':
parser.c:446: warning: 'localRet' might be used uninitialized in this function
CC librsyslog_la-msg.lo
In file included from msg.c:50:
atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
msg.c: In function `msgDestruct':
msg.c:802: warning: implicit declaration of function `ATOMIC_INC_AND_FETCH'
CC librsyslog_la-linkedlist.lo
CC librsyslog_la-objomsr.lo
CC librsyslog_la-stringbuf.lo
CC librsyslog_la-datetime.lo
CC librsyslog_la-srutils.lo
CC librsyslog_la-errmsg.lo
CC librsyslog_la-debug.lo
In file included from debug.c:52:
atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
debug.c:896: warning: ignoring #pragma GCC diagnostic
debug.c:922: warning: ignoring #pragma GCC diagnostic
CC librsyslog_la-obj.lo
CC librsyslog_la-modules.lo
CC librsyslog_la-apc.lo
CC librsyslog_la-sync.lo
CC librsyslog_la-expr.lo
CC librsyslog_la-ctok.lo
CC librsyslog_la-ctok_token.lo
CC librsyslog_la-stream.lo
CC librsyslog_la-var.lo
CC librsyslog_la-wtp.lo
In file included from wtp.c:42:
./atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
wtp.c:207: warning: ignoring #pragma GCC diagnostic
wtp.c:248: warning: ignoring #pragma GCC diagnostic
wtp.c:328: warning: ignoring #pragma GCC diagnostic
wtp.c: In function `wtpWorker':
wtp.c:332: warning: unused variable `pszDbgHdr'
wtp.c:333: warning: unused variable `thrdName'
wtp.c: At top level:
wtp.c:368: warning: ignoring #pragma GCC diagnostic
CC librsyslog_la-wti.lo
In file included from wti.c:54:
atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
wti.c: In function `wtiSetState':
wti.c:109: warning: implicit declaration of function `ATOMIC_STORE_1_TO_INT'
wti.c:111: warning: implicit declaration of function `ATOMIC_STORE_0_TO_INT'
wti.c: At top level:
wti.c:244: warning: ignoring #pragma GCC diagnostic
wti.c:309: warning: ignoring #pragma GCC diagnostic
CC librsyslog_la-sysvar.lo
CC librsyslog_la-vm.lo
CC librsyslog_la-vmstk.lo
CC librsyslog_la-vmprg.lo
CC librsyslog_la-vmop.lo
CC librsyslog_la-queue.lo
In file included from queue.c:57:
atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
queue.c: In function `DoDeleteBatchFromQStore':
queue.c:1291: warning: implicit declaration of function `ATOMIC_SUB'
CC librsyslog_la-ruleset.lo
CC librsyslog_la-rule.lo
CC librsyslog_la-prop.lo
In file included from prop.c:45:
atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
CC librsyslog_la-cfsysline.lo
cfsysline.c: In function `doGetSize':
cfsysline.c:220: warning: integer constant is too large for "long" type
cfsysline.c:221: warning: integer constant is too large for "long" type
cfsysline.c:222: warning: integer constant is too large for "long" type
CC librsyslog_la-action.lo
../action.c:969: warning: ignoring #pragma GCC diagnostic
../action.c:995: warning: ignoring #pragma GCC diagnostic
../action.c:1003: warning: ignoring #pragma GCC diagnostic
../action.c:1024: warning: ignoring #pragma GCC diagnostic
../action.c:1259: warning: ignoring #pragma GCC diagnostic
../action.c:1283: warning: ignoring #pragma GCC diagnostic
CC librsyslog_la-threads.lo
CC librsyslog_la-parse.lo
CC librsyslog_la-outchannel.lo
CC librsyslog_la-template.lo
../template.c: In function `ExtendBuf':
../template.c:64: warning: long int format, size_t arg (arg 2)
../template.c:64: warning: long int format, size_t arg (arg 3)
../template.c:64: warning: long int format, size_t arg (arg 2)
../template.c:64: warning: long int format, size_t arg (arg 3)
CCLD librsyslog.la
CC lmregexp_la-regexp.lo
CCLD lmregexp.la
CC lmzlibw_la-zlibw.lo
CCLD lmzlibw.la
CC lmnet_la-net.lo
CCLD lmnet.la
CC lmnetstrms_la-netstrms.lo
CC lmnetstrms_la-netstrm.lo
CC lmnetstrms_la-nssel.lo
nssel.c:173: warning: unused parameter 'piNumReady'
CCLD lmnetstrms.la
CC lmstrmsrv_la-strmsrv.lo
strmsrv.c:511: warning: ignoring #pragma GCC diagnostic
strmsrv.c:619: warning: ignoring #pragma GCC diagnostic
CC lmstrmsrv_la-strms_sess.lo
CCLD lmstrmsrv.la
CC lmnsd_ptcp_la-nsd_ptcp.lo
CC lmnsd_ptcp_la-nsdsel_ptcp.lo
CCLD lmnsd_ptcp.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime'
Making all in .
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0'
CC lmtcpsrv_la-tcps_sess.lo
CC lmtcpsrv_la-tcpsrv.lo
tcpsrv.c:525: warning: ignoring #pragma GCC diagnostic
tcpsrv.c:606: warning: ignoring #pragma GCC diagnostic
CCLD lmtcpsrv.la
CC lmtcpclt_la-tcpclt.lo
CCLD lmtcpclt.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0'
Making all in plugins/immark
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/immark'
CC immark_la-immark.lo
CCLD immark.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/immark'
Making all in plugins/imuxsock
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imuxsock'
CC imuxsock_la-imuxsock.lo
CCLD imuxsock.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imuxsock'
Making all in plugins/imtcp
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imtcp'
CC imtcp_la-imtcp.lo
CCLD imtcp.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imtcp'
Making all in plugins/imudp
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imudp'
CC imudp_la-imudp.lo
CCLD imudp.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/imudp'
Making all in plugins/omtesting
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/omtesting'
CC omtesting_la-omtesting.lo
CCLD omtesting.la
make[2]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/plugins/omtesting'
Making all in tools
make[2]: Entering directory `/user/mesanchez/rsyslog/rsyslog-5.4.0/tools'
CC rsyslogd-syslogd.o
syslogd.c:1172: warning: 'generateConfigDAGAction' defined but not used
CC rsyslogd-omshell.o
CC rsyslogd-omusrmsg.o
CC rsyslogd-omfwd.o
omfwd.c: In function `doAction':
omfwd.c:414: warning: 'psz' might be used uninitialized in this function
CC rsyslogd-omfile.o
In file included from omfile.c:67:
../runtime/atomic.h:64:3: warning: #warning "atomic builtins not available, using nul operations - rsyslogd will probably be racy!"
omfile.c: In function `getClockFileAccess':
omfile.c:95: warning: implicit declaration of function `ATOMIC_INC_AND_FETCH'
CC rsyslogd-ompipe.o
CC rsyslogd-omdiscard.o
CC rsyslogd-pmrfc5424.o
CC rsyslogd-pmrfc3164.o
CC rsyslogd-iminternal.o
CC rsyslogd-pidfile.o
CCLD rsyslogd
rsyslogd-omfile.o(.text+0x79b): In function `doAction':
/user/mesanchez/rsyslog/rsyslog-5.4.0/tools/omfile.c:95: undefined reference to `ATOMIC_INC_AND_FETCH'
rsyslogd-omfile.o(.text+0xa07):/user/mesanchez/rsyslog/rsyslog-5.4.0/tools/omfile.c:95: undefined reference to `ATOMIC_INC_AND_FETCH'
rsyslogd-omfile.o(.text+0xa67):/user/mesanchez/rsyslog/rsyslog-5.4.0/tools/omfile.c:95: undefined reference to `ATOMIC_INC_AND_FETCH'
../runtime/.libs/librsyslog.a(librsyslog_la-glbl.o)(.text+0x316): In function `SetGlobalInputTermination':
/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/glbl.c:136: undefined reference to `ATOMIC_STORE_1_TO_INT'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o)(.text+0xbf6): In function `msgDestruct':
/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/msg.c:802: undefined reference to `ATOMIC_INC_AND_FETCH'
../runtime/.libs/librsyslog.a(librsyslog_la-wti.o)(.text+0x3d): In function `wtiSetState':
/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/wti.c:109: undefined reference to `ATOMIC_STORE_1_TO_INT'
../runtime/.libs/librsyslog.a(librsyslog_la-wti.o)(.text+0x53):/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/wti.c:111: undefined reference to `ATOMIC_STORE_0_TO_INT'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x301e): In function `DequeueConsumable':
/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x302c):/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/queue.c:1292: undefined reference to `ATOMIC_SUB'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x30c9):/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x30d7):/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/queue.c:1292: undefined reference to `ATOMIC_SUB'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x33da):/user/mesanchez/rsyslog/rsyslog-5.4.0/runtime/queue.c:1291: undefined reference to `ATOMIC_SUB'
../runtime/.libs/librsyslog.a(librsyslog_la-queue.o)(.text+0x33e8):/user/mesanchez/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 `/user/mesanchez/rsyslog/rsyslog-5.4.0/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/user/mesanchez/rsyslog/rsyslog-5.4.0'
make: *** [all] Error 2
swtlnx3 [.../rsyslog-5.4.0]
mesanchez
New
 
Posts: 1
Joined: Fri Mar 19, 2010 8:20 pm

Professional Services Information

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

Re: Errors compiling

Postby forrie » Thu Apr 08, 2010 8:03 pm

I've arrived at the same problem, on Redhat 5.5 -- same errors, with a snippet of this being:

Code: Select all
/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: Select all
./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, which may point to the problem:

Code: Select all
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.


Thanks.
forrie
New
 
Posts: 4
Joined: Tue Jan 19, 2010 10:54 pm

Re: Errors compiling

Postby forrie » Fri Apr 09, 2010 5:45 pm

I see a number of complaints about various compiling errors and difficulties with rsyslog. Given the number of potential problems, I think we will back off our plans to roll this out until it becomes more stable. Or, perhaps, we'll consider using the RHEL distributed version which is still at 3.x.
forrie
New
 
Posts: 4
Joined: Tue Jan 19, 2010 10:54 pm

Re: Errors compiling

Postby Burn » Sat Apr 10, 2010 4:13 pm

this has been dicussed a number of times. You need to add -march=i686 to CFLAGS when compiling on i386.
I have rsyslog 5.4.0 rpms compiled on centos 5.4, but forum requirements for attachments are too strict.
Burn
Frequent Poster
 
Posts: 56
Joined: Wed Jan 20, 2010 7:15 am

Re: Errors compiling

Postby forrie » Mon Apr 12, 2010 8:16 pm

Thank you, this fixed the problem.

I guess my follow-up question would be why ./configure isn't doing this automatically -- as it seems like a reasonable thing it should do?
forrie
New
 
Posts: 4
Joined: Tue Jan 19, 2010 10:54 pm

Re: Errors compiling

Postby Burn » Sun Apr 18, 2010 7:30 pm

this I do not know %)
Burn
Frequent Poster
 
Posts: 56
Joined: Wed Jan 20, 2010 7:15 am

Re: Errors compiling

Postby rgerhards » Tue Apr 20, 2010 3:04 pm

It is considered bad practice to modify CFLAGS without the user knowing.
User avatar
rgerhards
Site Admin
 
Posts: 2778
Joined: Thu Feb 13, 2003 11:57 am

Re: Errors compiling

Postby forrie » Tue Apr 20, 2010 3:11 pm

I guess, but if it prevents the product from compiling (as has been in my case), which results in x amount of time trying to figure out why... then why even use ./configure --- I'll just run the flags myself.

Point taken, but I disagree :-)



rgerhards wrote:It is considered bad practice to modify CFLAGS without the user knowing.
forrie
New
 
Posts: 4
Joined: Tue Jan 19, 2010 10:54 pm

Re: Errors compiling

Postby rgerhards » Tue Apr 20, 2010 3:15 pm

Well, the only solution than would be to probe the system for which CPU is present. This also means that we need to check which compiler is being used. This opens up a big can of worms. I guess this is the primary reason why it is considered bad practice.

In any case, we have recently included a patch that makes rsyslog compile without atomic instructions and then fall back to (much slower) semaphore operations. That should also solve that issue.
User avatar
rgerhards
Site Admin
 
Posts: 2778
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron