sysroot and json.h
Jeffrey Bastian
jbastian at redhat.com
Tue Mar 31 21:33:00 UTC 2015
In January, commit 690de7ffb96c changed the Makefile.am files to use gcc
sysroot support for the json headers and libraries:
http://kernel.ubuntu.com/git?p=hwe/fwts.git;a=commit;h=690de7ffb96c
This is breaking the build process on Fedora 21:
=======================================================================
libtool: compile: gcc -DHAVE_CONFIG_H .... -I=/usr/include/json -I=/usr/include/json-c .... -c fwts_ac_adapter.c -fPIC -DPIC -o .libs/libfwts_la-fwts_ac_adapter.o
In file included from ../../../src/lib/include/fwts.h:84:0,
from fwts_ac_adapter.c:19:
../../../src/lib/include/fwts_json.h:23:18: fatal error: json.h: No such file or directory
#include <json.h>
^
compilation terminated.
=======================================================================
The json.h file is in /usr/include/json-c/json.h where it's supposed to
be, it's just that the -I= flag isn't working without --sysroot too.
I can manually compile this file if I re-run the above command and add a
"--sysroot=/" flag, so I tried doing
./configure --with-sysroot=/
make
but the "--with-sysroot" flag to configure does not add a "--sysroot"
flag to the gcc command line so that didn't work.
Then I tried
CFLAGS=--sysroot=/ ./configure
but that failed in the configure script.
So for now I have to revert this patch to get it to compile.
Can the -I= for json.h only be used if you also have --sysroot defined?
That is, it should be either
--sysroot=/some/path -I=/usr/include/json -I=/usr/include/json-c
(exclusive-)or
-I/usr/include/json -I/usr/include/json-c
Thank you,
Jeff Bastian
More information about the fwts-devel
mailing list