Kodi Community Forum

Full Version: [LINUX] Fedora Core 15 / github latest compilation failure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

I'm trying to build from source on Fedora Core 15, having pulled direct from github, and I'm getting a compilation error.

Code:
g++ -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2  -shared -o /home/lucas/Downloads/xbmc/addons/screensaver.rsxs.solarwinds/Solarwinds.xbs ../src/solarwinds/*.o ../src/common.o ../src/color.o ../lib/libmisc.a -lXmu
g++ -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2  -shared -o /home/lucas/Downloads/xbmc/addons/screensaver.rsxs.plasma/Plasma.xbs     ../src/plasma/*.o     ../src/common.o ../src/color.o ../lib/libmisc.a -lXmu
g++ -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2  -shared -o /home/lucas/Downloads/xbmc/addons/screensaver.rsxs.euphoria/Euphoria.xbs   ../src/euphoria/*.o   ../src/pngimage.o ../src/common.o ../src/color.o ../lib/libmisc.a -lXmu -lpng
make[1]: Leaving directory `/home/lucas/Downloads/xbmc/xbmc/screensavers/rsxs-0.9/xbmc'
make -C xbmc
make[1]: Entering directory `/home/lucas/Downloads/xbmc/xbmc'
CPP     Application.o
In file included from interfaces/json-rpc/JSONUtils.h:31:0,
                 from interfaces/json-rpc/JSONRPC.h:30,
                 from Application.cpp:136:
/home/lucas/Downloads/xbmc/xbmc/utils/JSONVariantParser.h:63:5: error: token "{" is not valid in preprocessor expressions
/home/lucas/Downloads/xbmc/xbmc/utils/JSONVariantParser.h:69:5: error: token "{" is not valid in preprocessor expressions
/home/lucas/Downloads/xbmc/xbmc/utils/JSONVariantParser.h:75:5: error: token "{" is not valid in preprocessor expressions
make[1]: *** [Application.o] Error 1
make[1]: Leaving directory `/home/lucas/Downloads/xbmc/xbmc'
make: *** [xbmc/xbmc.a] Error 2

I know it's expected of bleeding edge stuff, but most tutorials seem to recommend pulling direct from the HEAD. I tried a few different revisions, but seemed to get similar issues - is there a certain revision/tag that I should be using? Or a prebuilt rpm or something?

Cheers
Hi,
xbmc is not a fault, fedora's yajl-devel package is.
Edit /usr/include/yajl/yajl_version.h
Replace
#define YAJL_MAJOR ${YAJL_MAJOR}
#define YAJL_MINOR ${YAJL_MINOR}
#define YAJL_MICRO ${YAJL_MICRO}
with
#define YAJL_MAJOR 1
#define YAJL_MINOR 0
#define YAJL_MICRO 11

Otherwise, you can also edit xbmc code.. changing the preprocessor condition.

I have submitted a bug report to Fedora's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=714659

What you can do instead of modifying the include file is to update your yajl* packages to rawhide (yum --enablerepo=rawhide update yajl*), it's fixed there.
Thanks - that worked!

Doh! not being a C/C++ guy, I didn't think to actually try and debug it - pretty obvious now - thanks!!
This should be taken care of in 71f5fa909908ac68f002ccb3868246341c9e4a08 if it doesn't please state full build log failing in ticket #11609

EDIT: Oh, just saw about the defines. Well those are surely wrong, so seems to be fedoras fault. Thanks for submitting a ticket to them!
I'm compiling xbmc from git right now and thought I should point this also applies to yajl-devel on Mandriva 2011.0