Configure works but make fails

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

Moderator: rgerhards

Google Ads


Configure works but make fails

Postby usaims » Tue Apr 12, 2016 9:47 pm

I'm trying to install rsyslog on slackware. I'm using:

./configure --enable-imfile --enable-snmp

which worked and returned no errors but I run a 'make', I get the following:

root@logs:/home/rod/misc/rsyslog-8.17.0# make
make all-recursive
make[1]: Entering directory `/home/rod/misc/rsyslog-8.17.0'
Making all in compat
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/compat'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/compat'
Making all in runtime
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/runtime'
CC librsyslog_la-rsyslog.lo
In file included from msg.h:26:0,
from batch.h:30,
from wti.h:28,
from rsyslog.c:69:
../template.h:33:18: fatal error: json.h: No such file or directory
#include <json.h>
^
compilation terminated.
make[2]: *** [librsyslog_la-rsyslog.lo] Error 1
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rod/misc/rsyslog-8.17.0'
make: *** [all] Error 2
root@logs:/home/rod/misc/rsyslog-8.17.0#


I know json.h exists on the machine, thank you inadvance.
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Urgent Question?

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

Re: Configure works but make fails

Postby dlang » Tue Apr 12, 2016 9:57 pm

8.17 requires either json-c or libfastjson (libfastjson fixes some data corruption problems that json-c has), 8.18 will require libfastjson

I think there is a configure option to tell the build where the json development stuff is.
dlang
Frequent Poster
 
Posts: 1001
Joined: Mon Sep 15, 2008 7:44 am

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 5:06 pm

I installed libfastjson but I still have compile issues on Slackware.

If I do
Code: Select all
./configure --enable-imfile --enable-snmp
without setting environmental variables or CFLAGS, I get:

configure: error: Package requirements (libfastjson) were not met:
No package 'libfastjson' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables JSON_C_CFLAGS
and JSON_C_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


Then I will
Code: Select all
export JSON_C_LIBS=/usr/local/include/libfastjson
and then I will do
Code: Select all
./configure --enable-imfile --enable-snmp
again. It configures without errors. But when I do a 'make', I get:

root@logs:/home/rod/misc/rsyslog-8.17.0# make
make all-recursive
make[1]: Entering directory `/home/rod/misc/rsyslog-8.17.0'
Making all in compat
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/compat'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/compat'
Making all in runtime
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/runtime'
CC librsyslog_la-rsyslog.lo
In file included from msg.h:26:0,
from batch.h:30,
from wti.h:28,
from rsyslog.c:69:
../template.h:33:18: fatal error: json.h: No such file or directory
#include <json.h>
^
compilation terminated.
make[2]: *** [librsyslog_la-rsyslog.lo] Error 1
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rod/misc/rsyslog-8.17.0'
make: *** [all] Error 2
root@logs:/home/rod/misc/rsyslog-8.17.0#


I have json.h - it exists.

/usr/local/include/libfastjson/json.h

Thank you for any assistance.
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby dlang » Wed Apr 13, 2016 6:42 pm

take a look at config.log and it should show you exactly what it's looking for when it fails.

that path for libfastjson does look correct.
dlang
Frequent Poster
 
Posts: 1001
Joined: Mon Sep 15, 2008 7:44 am

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 7:47 pm

Now I have libfastjson and json-c installed.

I did
Code: Select all
make clean


and I did a

Code: Select all
export JSON_C_LIBS=$JSON_C_LIBS:/usr/local/include/json-c


Code: Select all
echo $JSON_C_CFLAGS
/usr/local/include/libfastjson:/usr/local/include/json-c


Code: Select all
echo $JSON_C_LIBS
/usr/local/include/libfastjson:/usr/local/include/json-c


Code: Select all
root@logs:/usr/local/include/libfastjson# ls -al
total 112
drwxr-xr-x 2 root root  4096 Apr 12 15:58 ./
drwxr-xr-x 6 root root  4096 Apr 13 14:28 ../
-rw-r--r-- 1 root root  1214 Apr 12 15:58 arraylist.h
-rw-r--r-- 1 root root   699 Apr 12 15:58 bits.h
-rw-r--r-- 1 root root  1629 Apr 12 15:58 debug.h
-rw-r--r-- 1 root root  1670 Apr 12 15:58 json.h
-rw-r--r-- 1 root root   684 Apr 12 15:58 json_c_version.h
-rw-r--r-- 1 root root   163 Apr 12 15:58 json_config.h
-rw-r--r-- 1 root root   255 Apr 12 15:58 json_inttypes.h
-rw-r--r-- 1 root root 25015 Apr 12 15:58 json_object.h
-rw-r--r-- 1 root root  8187 Apr 12 15:58 json_object_iterator.h
-rw-r--r-- 1 root root  1370 Apr 12 15:58 json_object_private.h
-rw-r--r-- 1 root root  6853 Apr 12 15:58 json_tokener.h
-rw-r--r-- 1 root root  1245 Apr 12 15:58 json_util.h
-rw-r--r-- 1 root root  9733 Apr 12 15:58 linkhash.h
-rw-r--r-- 1 root root   548 Apr 12 15:58 math_compat.h
-rw-r--r-- 1 root root  2678 Apr 12 15:58 printbuf.h
-rw-r--r-- 1 root root   407 Apr 12 15:58 random_seed.h


Code: Select all
root@logs:/usr/local/include/json-c# ls -al
total 108
drwxr-xr-x 2 root root  4096 Apr 13 14:28 ./
drwxr-xr-x 6 root root  4096 Apr 13 14:28 ../
-rw-r--r-- 1 root root  1214 Apr 13 14:28 arraylist.h
-rw-r--r-- 1 root root   699 Apr 13 14:28 bits.h
-rw-r--r-- 1 root root  1629 Apr 13 14:28 debug.h
-rw-r--r-- 1 root root   681 Apr 13 14:28 json.h
-rw-r--r-- 1 root root   684 Apr 13 14:28 json_c_version.h
-rw-r--r-- 1 root root   163 Apr 13 14:28 json_config.h
-rw-r--r-- 1 root root   255 Apr 13 14:28 json_inttypes.h
-rw-r--r-- 1 root root 25088 Apr 13 14:28 json_object.h
-rw-r--r-- 1 root root  8187 Apr 13 14:28 json_object_iterator.h
-rw-r--r-- 1 root root  1271 Apr 13 14:28 json_object_private.h
-rw-r--r-- 1 root root  6853 Apr 13 14:28 json_tokener.h
-rw-r--r-- 1 root root  1245 Apr 13 14:28 json_util.h
-rw-r--r-- 1 root root  9546 Apr 13 14:28 linkhash.h
-rw-r--r-- 1 root root  2194 Apr 13 14:28 printbuf.h
-rw-r--r-- 1 root root   407 Apr 13 14:28 random_seed.h




Then I did...

Code: Select all
./configure --enable-imfile --enable-snmp


This is the error:
root@logs:/home/rod/misc/rsyslog-8.17.0# make
make all-recursive
make[1]: Entering directory `/home/rod/misc/rsyslog-8.17.0'
Making all in compat
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/compat'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/compat'
Making all in runtime
make[2]: Entering directory `/home/rod/misc/rsyslog-8.17.0/runtime'
CC librsyslog_la-rsyslog.lo
In file included from ../template.h:73:0,
from msg.h:26,
from batch.h:30,
from wti.h:28,
from rsyslog.c:69:
./msg.h:34:18: fatal error: json.h: No such file or directory
#include <json.h>
^
compilation terminated.
make[2]: *** [librsyslog_la-rsyslog.lo] Error 1
make[2]: Leaving directory `/home/rod/misc/rsyslog-8.17.0/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rod/misc/rsyslog-8.17.0'
make: *** [all] Error 2
root@logs:/home/rod/misc/rsyslog-8.17.0#



I looked in config.log

configure:13741: checking for json_object_new_object in -ljson-c
configure:13766: gcc -std=gnu99 -o conftest -g -O2 /usr/local/include/libfastjson conftest.c -ljson-c /usr/local/include/libfas
tjson:/usr/local/include/json-c >&5
gcc: error: /usr/local/include/libfastjson:/usr/local/include/json-c: No such file or directory
configure:13766: $? = 1
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby rgerhards » Wed Apr 13, 2016 8:11 pm

Cflags does not look right. I would suggest to use pkg-config instead of doing it manually. You probably need to set the pkg_config_path (in caps) environment variable. See:http://linux.die.net/man/1/pkg-config
rgerhards
Site Admin
 
Posts: 3807
Joined: Thu Feb 13, 2003 11:57 am

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 8:49 pm

I looked for the pkgconfig directory.

Code: Select all
root@logs:/home/rod/misc/rsyslog-8.17.0# locate pkgconfig | grep json
/usr/lib64/pkgconfig/json-c.pc
/usr/local/lib/pkgconfig/libfastjson.pc
root@logs:/home/rod/misc/rsyslog-8.17.0#


I verified that the PKG_CONFIG_PATH is set.

Code: Select all
root@logs:/home/rod/misc/rsyslog-8.17.0# echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig


Samething configure works but make gets the same error.
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby rgerhards » Wed Apr 13, 2016 8:52 pm

Have you unset the other environment variables?
rgerhards
Site Admin
 
Posts: 3807
Joined: Thu Feb 13, 2003 11:57 am

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 9:16 pm

I have other variables that I need to set to make configure return no errors

Code: Select all
export JSON_C_CFLAGS=/usr/local/include/libfastjson


If I don't, then configure will error with this:

Code: Select all
configure: error: Package requirements (libfastjson) were not met:

No package 'libfastjson' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables JSON_C_CFLAGS
and JSON_C_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


Code: Select all
root@logs:/home/rod/misc/rsyslog-8.17.0# env | egrep -i '(pkgconfig|json)'
JSON_C_CFLAGS=/usr/local/include/libfastjson
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig


Thank you in advance.
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby rgerhards » Wed Apr 13, 2016 9:20 pm

If you need the variables, your pkg config path is wrong.
rgerhards
Site Admin
 
Posts: 3807
Joined: Thu Feb 13, 2003 11:57 am

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 9:30 pm

What should be my PKG_CONFIG_PATH?
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby usaims » Wed Apr 13, 2016 10:48 pm

configure and make worked, I fixed the path -- thank you.

Code: Select all
root@logs:/home/rod/misc/rsyslog-8.17.0# locate pkgconfig | grep -i json
/usr/lib64/pkgconfig/json-c.pc
/usr/lib64/pkgconfig/QJson.pc
/usr/local/lib/pkgconfig/libfastjson.pc


Code: Select all
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig
usaims
Avarage
 
Posts: 18
Joined: Wed Mar 30, 2016 10:04 pm

Re: Configure works but make fails

Postby rgerhards » Thu Apr 14, 2016 6:49 am

I am glad it worked for you. Sorry for being terse, I was on a phone ;)
rgerhards
Site Admin
 
Posts: 3807
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