sysroot and json.h
Colin Ian King
colin.king at canonical.com
Wed Apr 1 13:48:07 UTC 2015
On 31/03/15 22:33, Jeffrey Bastian wrote:
> 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.
I suggest trying:
CFLAGS=--sysroot= ./configure
I don't have access to a Fedora 21 installation at hand, so I can't test
this out to see if it works.
>
> 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