[opensource-dev] Linux build error: missing binary operator before token "("

Boroondas Gupte sllists at boroon.dasgupta.ch
Sat Feb 19 15:33:13 PST 2011

On 02/19/2011 08:30 PM, Nicky D. wrote:
>> [...]
>> [19:13:30]: [LogScan] /usr/include/bits/huge_val.h:30:20: error: missing
>> binary operator before token "("
>> [...]
> 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.
That analysis looks correct, so go ask Oz about that Eternal Glory he
offered on IRC. :-)

> 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
> I attached a patch that does just this.
I just tested, and reverting eeb812d81330
(the changeset that switched to the new json download) works as a
workaround, too. Though, I guess your change is the preferred way to fix
this issue, because

   1. there probably was a reason for updating jsoncpp
   2. the other jsoncpp headers in the package also have very generic
      names, so using the containing dir as a way of namespacing will
      probably avoid further conflicts in the future

> Standalone builds might need
> some extra hackery,
> I did not try one of those yet.
Since 7690f4cb5e81
<https://bitbucket.org/jenn_linden/viewer-vs2010/changeset/7690f4cb5e81>, the
jsoncpp include was probably broken for standalone anyway. (Can't test,
as standalone fails due to other (unrelated) errors.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110220/0003d694/attachment.htm 

More information about the opensource-dev mailing list