|
|
|
Find jsoncpp headers and library, this library name depends on your gcc version. Should work for all Linux distributions. Maybe MacOS X also.
I added the attached file to indra/cmake.
Then my configure finished without errors, but the build failed here: /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp: In static member function 'static BOOL LLTranslate::parseGoogleTranslate(std::string, std::string&, std::string&)': /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:106: error: 'Json' has not been declared /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:106: error: expected `;' before 'root' /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:107: error: 'Json' has not been declared /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:107: error: expected `;' before 'reader' /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:108: error: 'reader' was not declared in this scope /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:108: error: 'root' was not declared in this scope You'll need to install jsoncpp, for which there's not yet a Debian package (though that work is well underway).
Here's the latest source: Here's the changelog of the Linden mods: More info on the library can be found upstream: Revision 2785
Fix for SNOW-240 (Fix up standalone builds to find jsoncpp) Files affected: Attaching SNOW-240.patch to fix up JsonCpp.cmake. Aleric, the reason why the configure didn't fail for you was because JSONCPP_FIND_REQUIRED ON wasn't set. The attached patch does what all of the other .cmake files does, which sets that variable as well as the FIND_QUIETLY variable. That should make the build failure more intuitive.
Ok, with this the configure gives an error that it can't find jsconcpp
CMake Error at cmake/FindJsonCpp.cmake:44 (MESSAGE): Could not find JSONCpp library I got the tip.tar.bz2 file, extracted it somewhere, read the README files After grepping the sources I finally did: python scons.py platform=linux64-gcc libs this results in a file ./buildscons/linux64-gcc-4.3.3/src/lib_json/libjson_linux64-gcc-4.3.3_libmt.so There are no instructions to install this in any file, nor anything that even How to install this? Rob,
the added FindJsonCpp.cmake fails for me because as is done in indra/cmake/00-Common.cmake line 98 After fixing the missing ${CMAKE_CXX_COMPILER_ARG1} problem and installing
the header and the library manually so that FindJsonCpp.cmake finds them, I still get the exact same compile error as before: /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:106: error: 'Json' has not been declared /usr/src/secondlife/secondlife/snowglobe/snowglobe-svn/indra/newview/lltranslate.cpp:106: error: expected `;' before 'root' etc. Imho, the problem is that the headerfile is found, but never included. I have an additional problem with FindJsonCpp.cmake that it ignores
the values of ${CMAKE_EXE_LINKER_FLAGS} and ${CMAKE_CXX_FLAGS}. The first can contain one or more strings -L/some/path/lib and then /some/path/lib should be I can't fix this myself, cause I don't know cmake :/ Shouldn't need to, GNU ld looks for /lib[64] /usr/lib[64] automatically.
Same for include -I /usr/include is automatically searched by GCC. Just check your cmake cache to make sure it found the locations CMakeCache.txt:JSONCPP_INCLUDE_DIR:PATH=/usr/include I think this commit message was supposed to go here, instead in
lindenrobot added a comment - 26/Sep/09 01:07 PM Fixup for Files affected: Attached SNOW-240v1-2.diff, needed if one uses ccache.
Revision 2795
SNOW-240: Use CMAKE_CXX_COMPILER_ARG1 when invoking compiler. Files affected: I think this is pretty much done now, right?
If the failure message can point to a wiki page or to this issue to help resolve this dependency, this would be great and make compilation go smoother without being left in the dark about what to do next and more quickly achieve resolution. This is why I reopened it.
Thanks |
||||||||||||||||||||||||||||||||||||||||||||
use_prebuilt_binary(jsoncpp) if (WINDOWS) set(JSONCPP_LIBRARIES debug json_vc80d optimized json_vc80) elseif (DARWIN) set(JSONCPP_LIBRARIES json_mac-universal-gcc_libmt) elseif (LINUX) set(JSONCPP_LIBRARIES jsoncpp) endif (WINDOWS) set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/jsoncpp)(that's just the JsonCpp.cmake without the if(standalone) conditional around it)
I've never tried this myself, so I can't vouch for if it's going to be remotely successful. I can easily see it failing at the "use_prebuild_library(jsoncpp)" part if standalone is defined. If that happens, you can try manually downloading the appropriate prebuilt, unpacking in your tree, and edit that line out of the file.
BTW, I compiled a 64-bit Linux version of JsonCpp while I was updating libraries yesterday, which you can grab from the location in the patch on
SNOW-241. In particular, the Linux 64-bit library is http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/jsoncpp-svn-r69-linux64-20090922.tar.bz2