> [19:13:30]: LogScan (1s) > [19:13:30]: [LogScan] from /usr/include/c++/4.1.3/cmath:53, > [19:13:30]: [LogScan] from > /var/opt/teamcity/checkout/L-oz_viewer-autobuild2010/latest/indra/llcommon/linden_common.h:48, > [19:13:30]: [LogScan] from > /var/opt/teamcity/checkout/L-oz_viewer-autobuild2010/latest/indra/newview/tests/lldateutil_test.cpp:26: > [19:13:30]: [LogScan] /usr/include/bits/huge_val.h:28:18: error: missing > binary operator before token "(" > [19:13:30]: [LogScan] /usr/include/bits/huge_val.h:30:20: error: missing > binary operator before token "(" > > With "build" in the second command instead of "configure", I'm getting the > same error, though not just for /usr/include/bits/huge_val.h but many more > system headers, too. >
Tried it today, getting that too. Huge slew of errors. Even though this looks intimidating, the reason is really simple. In OZ's version of json there is a file features.h in ../include/json/. Metaphorical speaking there he laid the bomb. It is then trigged in cmake/JsonCpp.cmake and newview/CMakeList.txt JsonCpp.cmake sets JSONCPP_INCLUDE_DIRS to ${LIBS_PREBUILD_DIR)/include/json. newview/CMakeList.txt adds JSONCPP_INCLUDE_DIRS to the system include dirs. Now the the problem with gcc is, that adding include dirs with -I makes them be searched before the system include dirs. And there our little bomb goes off. Because now the compiler findes the features.h file first in ../include/json. When it fact it needs the system one from /usr/include/features.h. One solution might be to use the -I- switch or -iquote for new gcc versions. But lucky enough there is a trivially simple fix, just use ${LIBS_PREBUILD_DIR)/include for JSONCPP_INCLUDE_DIRS. I attached a patch that does just this. Standalone builds might need some extra hackery, I did not try one of those yet. Cheers, Nicky
# HG changeset patch # User Nicky <nickyd...@yahoo.com> # Date 1298143658 -3600 # Node ID ab363082f660e186ce0bfef8bf455b6d932c2663 # Parent 07163388fcb99b292843648c6256946cc622976f Do not add <jsonpath>/include/json as an include director. Instead use <jsonpath>/include. Otherwise include/json/features.h will mask /usr/include/features. diff -r 07163388fcb9 -r ab363082f660 indra/cmake/JsonCpp.cmake --- a/indra/cmake/JsonCpp.cmake Fri Feb 18 12:50:16 2011 -0500 +++ b/indra/cmake/JsonCpp.cmake Sat Feb 19 20:27:38 2011 +0100 @@ -18,5 +18,5 @@ elseif (LINUX) set(JSONCPP_LIBRARIES libjson_linux-gcc-4.3.2_libmt) endif (WINDOWS) - set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/json) + set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) endif (STANDALONE) diff -r 07163388fcb9 -r ab363082f660 indra/newview/lltranslate.cpp --- a/indra/newview/lltranslate.cpp Fri Feb 18 12:50:16 2011 -0500 +++ b/indra/newview/lltranslate.cpp Sat Feb 19 20:27:38 2011 +0100 @@ -33,7 +33,7 @@ #include "llversioninfo.h" #include "llviewercontrol.h" -#include "reader.h" +#include "json/reader.h" // These two are concatenated with the language specifiers to form a complete Google Translate URL const char* LLTranslate::m_GoogleURL = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=";
_______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges