From f14ad54c84b58a657d328934fc7eb70291a70bae Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 2 May 2016 21:17:36 -0400 Subject: [PATCH] Linux compile fixes Reapplies a fix from c3e593c20e1d5fddb6a18fdd035a04046ac19009 Updates libraries (FMOD Studio 1.08.01) Don't use boost chrono, the standard has chrono! --- autobuild.xml | 24 +++--- indra/cmake/Boost.cmake | 9 --- indra/llcommon/CMakeLists.txt | 1 - indra/llcommon/llerrorlegacy.h | 111 ---------------------------- indra/llmath/llvolume.h | 1 - indra/llprimitive/llmodelloader.cpp | 4 +- indra/llrender/llglheaders.h | 2 + indra/llrender/llshadermgr.cpp | 3 +- indra/newview/CMakeLists.txt | 1 - 9 files changed, 18 insertions(+), 138 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index a5327c0f4..ef043bd7c 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -656,11 +656,11 @@ archive hash - ef91e9966ffd6303a8805146c046c659 + a2badcf46277f7547bab0963fe262696 hash_algorithm md5 url - https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/fmodstudio-1.08.00-darwin-201603070723.tar.bz2 + https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/fmodstudio-1.08.01-darwin-201604080928.tar.bz2 name darwin @@ -698,11 +698,11 @@ archive hash - 6548495a886b385c238167f4d5e6182d + 4b307f5f2a8536b27a090301b0200805 hash_algorithm md5 url - http://depot.alchemyviewer.org/pub/windows/lib/fmodstudio-1.08.00-windows-201603070824.tar.bz2 + http://depot.alchemyviewer.org/pub/windows/lib/fmodstudio-1.08.01-windows-201604091408.tar.bz2 name windows @@ -712,18 +712,18 @@ archive hash - b80d49fd91e407fc8ab8afb3fcb4b138 + b5cbef5e8df0573a2568dffc33548852 hash_algorithm md5 url - http://depot.alchemyviewer.org/pub/windows64/lib/fmodstudio-1.08.00-windows64-201603070822.tar.bz2 + http://depot.alchemyviewer.org/pub/windows64/lib/fmodstudio-1.08.01-windows64-201604091406.tar.bz2 name windows64 version - 1.08.00 + 1.08.01 fontconfig @@ -2030,11 +2030,11 @@ archive hash - 347b0204795b11a982934fec640a4fd5 + f70cc94b1f43c4889b0dfff33f40fb11 hash_algorithm md5 url - http://depot.alchemyviewer.org/pub/windows/lib-vc14/nvapi-R361-windows-201601151015.tar.bz2 + file:///c:/devel/secondlife/packages/windows/nvapi-R361v2-windows-201604020339.tar.bz2 name windows @@ -2044,18 +2044,18 @@ archive hash - c26ef36ab5a91b9b39cf74b6fb087197 + 3058f1de30b4738bb087a21561cdd9a8 hash_algorithm md5 url - http://depot.alchemyviewer.org/pub/windows64/lib-vc14/nvapi-R352-windows64-201512130127.tar.bz2 + file:///c:/devel/secondlife/packages/windows64/nvapi-R361v2-windows64-201604020338.tar.bz2 name windows64 version - R361 + R361v2 ogg_vorbis diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 81727aef6..844d5dc49 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -36,9 +36,6 @@ else (STANDALONE) set(Boost_THREAD_LIBRARY optimized libboost_thread-mt debug libboost_thread-mt-gd) - set(Boost_CHRONO_LIBRARY - optimized libboost_chrono-mt - debug libboost_chrono-mt-gd) elseif (LINUX) set(Boost_CONTEXT_LIBRARY optimized boost_context-mt @@ -61,9 +58,6 @@ else (STANDALONE) set(Boost_THREAD_LIBRARY optimized boost_thread-mt debug boost_thread-mt-d) - set(Boost_CHRONO_LIBRARY - optimized libboost_chrono-mt - debug libboost_chrono-mt-d) elseif (DARWIN) set(Boost_CONTEXT_LIBRARY optimized boost_context-mt @@ -86,8 +80,5 @@ else (STANDALONE) set(Boost_THREAD_LIBRARY optimized boost_thread-mt debug boost_thread-mt-d) - set(Boost_CHRONO_LIBRARY - optimized libboost_chrono-mt - debug libboost_chrono-mt-d) endif (WINDOWS) endif (STANDALONE) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 497d09255..568e0b3c9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -290,7 +290,6 @@ target_link_libraries( ${Boost_REGEX_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} - ${Boost_CHRONO_LIBRARY} ${CORESERVICES_LIBRARY} ) diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index b4c3739e4..31dd20700 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -28,116 +28,5 @@ #ifndef LL_LLERRORLEGACY_H #define LL_LLERRORLEGACY_H -#include "llpreprocessor.h" - -/* - LEGACY -- DO NOT USE THIS STUFF ANYMORE -*/ - -// Specific error codes -const int LL_ERR_ASSET_REQUEST_FAILED = -1; -//const int LL_ERR_ASSET_REQUEST_INVALID = -2; -const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3; -const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4; -const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5; -const int LL_ERR_EOF = -39; -const int LL_ERR_CANNOT_OPEN_FILE = -42; -const int LL_ERR_FILE_NOT_FOUND = -43; -const int LL_ERR_FILE_EMPTY = -44; -const int LL_ERR_TCP_TIMEOUT = -23016; -const int LL_ERR_CIRCUIT_GONE = -23017; -const int LL_ERR_PRICE_MISMATCH = -23018; - - - -// Define one of these for different error levels in release... -// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output. -#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output -#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output. - - -////////////////////////////////////////// -// -// Implementation - ignore -// -// -#ifdef _DEBUG -#define SHOW_DEBUG -#define SHOW_WARN -#define SHOW_INFO -#define SHOW_ASSERT -#else // _DEBUG - -#ifdef LL_RELEASE_WITH_DEBUG_INFO -#define SHOW_ASSERT -#endif // LL_RELEASE_WITH_DEBUG_INFO - -#ifdef RELEASE_SHOW_DEBUG -#define SHOW_DEBUG -#endif - -#ifdef RELEASE_SHOW_WARN -#define SHOW_WARN -#endif - -#ifdef RELEASE_SHOW_INFO -#define SHOW_INFO -#endif - -#ifdef RELEASE_SHOW_ASSERT -#define SHOW_ASSERT -#endif - -#endif // _DEBUG - - - -#define lldebugst(type) lldebugs -#define llendflush llendl - - -#define llerror(msg, num) LL_ERRS() << "Error # " << num << ": " << msg << LL_ENDL; - -#define llwarning(msg, num) LL_WARNS() << "Warning # " << num << ": " << msg << LL_ENDL; - -#define liru_slashpos std::string(__FILE__).find_last_of("/\\") -#define liru_slashpos2 std::string(__FILE__).substr(0,liru_slashpos).find_last_of("/\\") -#define liru_assert_strip /*strip path down to lastlevel directory and filename for assert.*/\ - (liru_slashpos == std::string::npos ? std::string(__FILE__)/*just filename, print as is*/\ - : liru_slashpos2 == std::string::npos ? std::string(__FILE__)/*Apparently, we're in / or perhaps the top of the drive, print as is*/\ - : std::string(__FILE__).substr(1+liru_slashpos2))/*print foo/bar.cpp or perhaps foo\bar.cpp*/ - -//#define llassert_always(func) do { if (LL_UNLIKELY(!(func))) LL_ERRS() << "\nASSERT(" #func ")\nfile:" << liru_assert_strip << " line:" << std::dec << __LINE__ << LL_ENDL; } while(0) - -#ifdef SHOW_ASSERT -#define llassert(func) llassert_always(func) -#define llverify(func) llassert_always(func) -#else -#define llassert(func) -#define llverify(func) do {if (func) {}} while(0) -#endif - -// This can be used for function parameters that are only used by llassert. -// The ellipsis is needed in case the parameter contains comma's (ie, as part of the type, -// or trailing comma). The first version can be used as first (or only) parameter of a function, -// or as parameter in the middle when adding a trailing comma, while the second version can be -// used as last parameter. -// -// Example usage: -// -// void foo(ASSERT_ONLY(int x)); -// void foo(x, ASSERT_ONLY(int y,) int z); -// void foo(x/*,*/ ASSERT_ONLY_COMMA(int y)); // The optional /*,*/ makes it just a bit better readable. -#ifdef SHOW_ASSERT -#define ASSERT_ONLY(...) __VA_ARGS__ -#define ASSERT_ONLY_COMMA(...) , __VA_ARGS__ -#else -#define ASSERT_ONLY(...) -#define ASSERT_ONLY_COMMA(...) -#endif - -// handy compile-time assert - enforce those template parameters! -#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */ - //XXX: used in two places in llcommon/llskipmap.h #endif // LL_LLERRORLEGACY_H diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 0912c3d09..2e7f45be4 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -1093,7 +1093,6 @@ public: BOOL mGenerateSingleFace; - typedef std::vector face_list_t; face_list_t mVolumeFaces; public: diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 91b09ad75..46b8bfe13 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -31,7 +31,7 @@ #include "llmatrix4a.h" #include -#include +#include std::list LLModelLoader::sActiveLoaderList; @@ -459,7 +459,7 @@ void LLModelLoader::loadModelCallback() while (!isStopped()) { //wait until this thread is stopped before deleting self - boost::this_thread::sleep_for(boost::chrono::microseconds(100)); + std::this_thread::sleep_for(std::chrono::microseconds(100)); } //double check if "this" is valid before deleting it, in case it is aborted during running. diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index fe6001fec..7801b6c58 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -379,6 +379,8 @@ extern PFNGLGETQUERYIVARBPROC glGetQueryivARB; extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB; extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB; +extern PFNGLGETQUERYOBJECTUI64VEXTPROC glGetQueryObjectui64vEXT; + // GL_ARB_point_parameters extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB; extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB; diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index bfb3eb1a9..affbdc2c1 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -882,7 +882,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade { //dump every 128 lines LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL; - ostr = std::stringstream(); + ostr.clear(); + ostr.str(LLStringUtil::null); } } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a29a49481..a1dd9bdc8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1643,7 +1643,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${Boost_REGEX_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY} - ${Boost_CHRONO_LIBRARY} ${DBUSGLIB_LIBRARIES} ${OPENGL_LIBRARIES} ${FMOD_LIBRARY} # must come after LLAudio