Building rsyslogd from source fails in ./tools directory

This is the place for developers to discuss bugs, new features and everything else about code changes.

Google Ads


Building rsyslogd from source fails in ./tools directory

Postby UntamedSpud » Thu Apr 16, 2015 8:55 pm

Greetings all-

I am trying to build rsyslogd-8.9.0 from source on a Red Hat Enterprise Linux machine, version 7.0, gcc 4.8.3. I've gone down the prerequisite list and have everything installed, compiled from source, and in /usr/local/lib and /usr/local/include. To hush the ./Configure nags for "missing" packages, I did go and setup the following environment variables
Code: Select all
export CFLAGS="-I/usr/local/include -I/usr/local/include/json-c"
export LDFLAGS="-L/usr/local/lib"

export LIBESTR_CFLAGS="-I/usr/local/include"
export LIBESTR_LIBS="-L/usr/local/lib -lestr"

export JSON_C_CFLAGS=$CFLAGS
export JSON_C_LIBS=$LDFLAGS

export LIBUUID_CFLAGS=$CFLAGS
export LIBUUID_LIBS=$LDFLAGS


Made it through the ./Configure just fine, but have the following failure in the compile

Code: Select all
Making all in tools
make[2]: Entering directory `/usr/local/src/rsyslogd/rsyslog-8.9.0/tools'
  CC       rsyslogd-syslogd.o
  CC       rsyslogd-rsyslogd.o
  CC       rsyslogd-omshell.o
  CC       rsyslogd-omusrmsg.o
  CC       rsyslogd-omfwd.o
  CC       rsyslogd-omfile.o
  CC       rsyslogd-ompipe.o
  CC       rsyslogd-omdiscard.o
  CC       rsyslogd-pmrfc5424.o
  CC       rsyslogd-pmrfc3164.o
  CC       rsyslogd-smtradfile.o
  CC       rsyslogd-smfile.o
  CC       rsyslogd-smfwd.o
  CC       rsyslogd-smtradfwd.o
  CC       rsyslogd-iminternal.o
  CCLD     rsyslogd
../runtime/.libs/librsyslog.a(librsyslog_la-rsyslog.o): In function `rsrtInit':
rsyslog.c:(.text+0x82): undefined reference to `stdlog_init'
../runtime/.libs/librsyslog.a(librsyslog_la-glbl.o): In function `glblProcessCnf':
glbl.c:(.text+0x180f): undefined reference to `stdlog_open'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o): In function `msgDestruct':
msg.c:(.text+0x132c): undefined reference to `json_object_put'
msg.c:(.text+0x134f): undefined reference to `json_object_put'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o): In function `MsgSerialize':
msg.c:(.text+0x1d21): undefined reference to `json_object_get_string'
msg.c:(.text+0x1d76): undefined reference to `json_object_get_string'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o): In function `MsgDeserialize':
msg.c:(.text+0x2689): undefined reference to `json_tokener_new'
msg.c:(.text+0x26bf): undefined reference to `json_tokener_parse_ex'
msg.c:(.text+0x26d6): undefined reference to `json_tokener_free'
msg.c:(.text+0x2728): undefined reference to `json_tokener_new'
msg.c:(.text+0x275e): undefined reference to `json_tokener_parse_ex'
msg.c:(.text+0x2775): undefined reference to `json_tokener_free'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o): In function `msgSetUUID':
msg.c:(.text+0x2e96): undefined reference to `uuid_generate'
../runtime/.libs/librsyslog.a(librsyslog_la-msg.o): In function `msgGetJSONMESG':
msg.c:(.text+0x4274): undefined reference to `json_object_new_object'
msg.c:(.text+0x428c): undefined reference to `json_object_new_string'



      <<< truncated >>>


template.c:(.text+0x935): undefined reference to `json_object_new_string_len'
template.c:(.text+0x954): undefined reference to `json_object_object_add'
rsyslogd-rsyslogd.o: In function `logmsgInternal':
/usr/local/src/rsyslogd/rsyslog-8.9.0/tools/rsyslogd.c:776: undefined reference to `stdlog_log'
../grammar/.libs/libgrammar.a(libgrammar_la-rainerscript.o): In function `var2Number':
/usr/local/src/rsyslogd/rsyslog-8.9.0/grammar/rainerscript.c:1204: undefined reference to `json_object_get_int64'
../grammar/.libs/libgrammar.a(libgrammar_la-rainerscript.o): In function `var2String':
/usr/local/src/rsyslogd/rsyslog-8.9.0/grammar/rainerscript.c:1234: undefined reference to `json_object_get_string'
../grammar/.libs/libgrammar.a(libgrammar_la-rainerscript.o): In function `evalVar':
/usr/local/src/rsyslogd/rsyslog-8.9.0/grammar/rainerscript.c:1789: undefined reference to `json_object_get_string'
collect2: error: ld returned 1 exit status
make[2]: *** [rsyslogd] Error 1
make[2]: Leaving directory `/usr/local/src/rsyslogd/rsyslog-8.9.0/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/rsyslogd/rsyslog-8.9.0'
make: *** [all] Error 2
[Wed Apr 15 19:00:57:rsyslog-8.9.0 ] #


I came across this line on the (http://www.rsyslog.com/doc/build_from_repo.html) web page

Code: Select all
./configure CFLAGS="-march=i586 -mcpu=i686" --enable-imfile ... (whatever you need)


and tried it, but my gcc 4.8.x didn't seem to like it and I get nowhere.

Can anyone tell me what it is I'm missing on my system (or missing in the documents) that I need to do to get past this hurdle?

Thanks in advance for your assistance.
UntamedSpud
New
 
Posts: 2
Joined: Thu Apr 16, 2015 4:29 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: Building rsyslogd from source fails in ./tools directory

Postby dlang » Fri Apr 17, 2015 1:49 am

It looks to me like most of your error messages are json related, which tells me that it's not happy with the json-c install that you have. what version of json-c do you have on the system?
dlang
Frequent Poster
 
Posts: 1001
Joined: Mon Sep 15, 2008 7:44 am

Re: Building rsyslogd from source fails in ./tools directory

Postby UntamedSpud » Fri Apr 17, 2015 3:17 pm

dlang wrote:It looks to me like most of your error messages are json related, which tells me that it's not happy with the json-c install that you have. what version of json-c do you have on the system?

Thanks for the response. I checked on the version, and I have json-c-0.12 installed in /usr/local/lib and it passed it's self check, so I'm at a loss as to why it doesn't cleanly run with rsyslog:

Code: Select all
 # ls -ld /usr/local/lib/libjson-c.*
-rw-r--r--. 1 root root 222484 Apr 15 15:51 /usr/local/lib/libjson-c.a
-rwxr-xr-x. 1 root root    931 Apr 15 15:51 /usr/local/lib/libjson-c.la
lrwxrwxrwx. 1 root root     18 Apr 15 15:51 /usr/local/lib/libjson-c.so -> libjson-c.so.2.0.1
lrwxrwxrwx. 1 root root     18 Apr 15 15:51 /usr/local/lib/libjson-c.so.2 -> libjson-c.so.2.0.1
-rwxr-xr-x. 1 root root 135519 Apr 15 15:51 /usr/local/lib/libjson-c.so.2.0.1
#


and

Code: Select all
# make check
.
.
.
============================================================================
Testsuite summary for json-c 0.12
============================================================================
# TOTAL: 12
# PASS:  12
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================


and though there WAS a version put on the OS by Redhat, I removed it for this build.
UntamedSpud
New
 
Posts: 2
Joined: Thu Apr 16, 2015 4:29 pm

Google Ads



Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron