diff --git a/README_BUILD_FIRESTORM_LINUX.txt b/README_BUILD_FIRESTORM_LINUX.txt index 2e856043a1..b83c57fb0f 100755 --- a/README_BUILD_FIRESTORM_LINUX.txt +++ b/README_BUILD_FIRESTORM_LINUX.txt @@ -1,4 +1,4 @@ -First, make sure gcc-5.4 and g++-5.4 are installed. +First, make sure gcc-7.5.0 and g++-7.5.0 are installed. If you want to use licensed FMOD or KDU build libraries (they are optional) you have to provision these yourself. If you're licensing these with Phoenix/Firestorm, ask for the libraries for fmod and kdu. Put them into: diff --git a/autobuild.xml b/autobuild.xml index 7579bf3d3e..7fc918b6a1 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3,6 +3,34 @@ installables + breakpad + + copyright + Copyright (C) google + license + BSD + license_file + LICENSES/google_breakpad.txt + name + breakpad + platforms + + linux64 + + archive + + hash + 482c2b25bbfd25edc058a02f82da39b2 + url + http://3p.firestormviewer.org/breakpad-4708e6fb-linux64_bionic-220392253.tar.bz2 + + name + linux + + + version + 2.48.0 + glib copyright @@ -480,9 +508,9 @@ archive hash - 29eb0d338020242454b77b278c11d3e7 + 401f317fbb67623c97a7b9d8b6627ef1 url - http://3p.firestormviewer.org/boost-1.72-linux64-202021511.tar.bz2 + http://3p.firestormviewer.org/boost-1.72-linux64_bionic-220402045.tar.bz2 name linux64 @@ -605,26 +633,14 @@ name darwin64 - linux - - archive - - hash - d83896f28716f34b7b49d61a23283c4c - url - http://3p.firestormviewer.org/colladadom-2.3.180871403-linux-180871403.tar.bz2 - - name - linux - linux64 archive hash - df6fe4c80b96ec20b5ee6f56419e6b9f + 88ee58d6548deae6c306f125b6461d61 url - http://3p.firestormviewer.org/colladadom-2.3.202021526-linux64-202021526.tar.bz2 + http://3p.firestormviewer.org/colladadom-2.3.220402056-linux64_bionic-220402056.tar.bz2 name linux64 @@ -928,9 +944,9 @@ archive hash - 2f8fdc6950620cee3a526ede27e068aa + 8d532edd648448d78e6daa0cc5f821f9 url - http://3p.firestormviewer.org/dullahan-1.12.2.202109282040_91.1.23_g04c8d56_chromium-91.0.4472.164-linux64-212711840.tar.bz2 + http://3p.firestormviewer.org/dullahan-1.12.2.202202071031_91.1.23_g04c8d56_chromium-91.0.4472.164-linux64-220380931.tar.bz2 name linux64 diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 6909a94e4b..fe319a587b 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -165,11 +165,6 @@ endif (WINDOWS) if (LINUX) set(CMAKE_SKIP_RPATH TRUE) - - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0.0 ) - message( FATAL_ERROR "GCC greater 9.4.0 is not supported. Recompile boost for support of GCC 10.0.0 and up." ) - endif() - # # And another hack for FORTIFY_SOURCE. Some distributions (for example Gentoo) define FORTIFY_SOURCE by default. # Check if this is the case, if yes, do not define it again. @@ -225,10 +220,6 @@ if (LINUX) endif (NOT USESYSTEMLIBS) set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") - - if( NOT (CMAKE_CXX_COMPILER MATCHES ".*clang") ) - set( CMAKE_CXX_FLAGS "-fabi-version=9 ${CMAKE_CXX_FLAGS}" ) - endif() endif (LINUX) diff --git a/indra/cmake/GLIB.cmake b/indra/cmake/GLIB.cmake index ce0ac3e76f..186195e078 100644 --- a/indra/cmake/GLIB.cmake +++ b/indra/cmake/GLIB.cmake @@ -6,6 +6,6 @@ if( LINUX ) set(GLIB_FOUND ON CACHE BOOL "Build against glib 2") set(GLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/glib-2.0 ${LIBS_PREBUILT_DIR}/lib/release/glib-2.0/include ) set(GLIB_LIBRARIES libgobject-2.0.a libglib-2.0.a libffi.a libpcre.a) - set(GIO_LIBRARIES libgio-2.0.a libgmodule-2.0.a -lresolv) + set(GIO_LIBRARIES libgio-2.0.a libgmodule-2.0.a -lresolv ${GLIB_LIBRARIES} ) add_definitions(-DLL_GLIB=1) endif() diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 1bbfff6f98..fe52d1a9c9 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -3,12 +3,14 @@ include(Linking) include(Prebuilt) if (LINUX) - set(OPENAL ON CACHE BOOL "Enable OpenAL") + use_prebuilt_binary(openal) #Always need the .so for voice + set(OPENAL OFF CACHE BOOL "Enable OpenAL") else (LINUX) set(OPENAL OFF CACHE BOOL "Enable OpenAL") endif (LINUX) if (OPENAL) + message( WARNING "Using OpenAL is discouraged due to no maintenance of the viewers openal integration, possible memory leaks and no support for streaming audio. Switch to fmodstudio if possible" ) set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL") if (USESYSTEMLIBS) include(FindPkgConfig) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 3cb47a072c..c6ff24414b 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -16,3 +16,21 @@ endif (BUILD_HEADLESS) include(FindOpenGL) +if(LINUX) + if( NOT OPENGL_FOUND ) + message( FATAL_ERROR "OpenGL not found, install mesa-common-dev libgl1-mesa-dev" ) + endif() + + find_file( GLUH "GL/glu.h" ) + if( NOT GLUH ) + message( FATAL_ERROR "GL/glu.h not found, install libglu1-mesa-dev" ) + endif() + find_library( XINERAMA Xinerama ) + if( NOT XINERAMA ) + message( FATAL_ERROR "Cannot link with -lXinerame, install libxinerama-dev" ) + endif() + find_library( XRANDR Xrandr) + if( NOT XRANDR ) + message( FATAL_ERROR "Cannot link with -lXrandr, install libxrandr-dev" ) + endif() +endif() diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index f709f35403..af8610e261 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -12,17 +12,19 @@ endif (INSTALL_PROPRIETARY) if (USE_BUGSPLAT) if (NOT USESYSTEMLIBS) include(Prebuilt) - use_prebuilt_binary(bugsplat) if (WINDOWS) + use_prebuilt_binary(bugsplat) set(BUGSPLAT_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) elseif (DARWIN) + use_prebuilt_binary(bugsplat) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") message("Bugsplat for OSX not fully implemented, please adapt llappdelegate-objc.mm to honor options of sending user name and settings.xml.") else (WINDOWS) - message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") + use_prebuilt_binary(breakpad) + set(BUGSPLAT_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/libbreakpad.a ${ARCH_PREBUILT_DIRS_RELEASE}/libbreakpad_client.a ) endif (WINDOWS) else (NOT USESYSTEMLIBS) set(BUGSPLAT_FIND_QUIETLY ON) @@ -32,7 +34,12 @@ if (USE_BUGSPLAT) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") - set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) + if( LINUX ) + set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/breakpad) + add_compile_definitions(__STDC_FORMAT_MACROS) + else() + set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) + endif() set(BUGSPLAT_DEFINE "LL_BUGSPLAT") endif (USE_BUGSPLAT) diff --git a/indra/doxygen/CMakeLists.txt b/indra/doxygen/CMakeLists.txt index 84188bd32f..616b5cd09c 100644 --- a/indra/doxygen/CMakeLists.txt +++ b/indra/doxygen/CMakeLists.txt @@ -4,7 +4,7 @@ # other commands to guarantee full compatibility # with the version specified ## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly -cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 02b1d38fa9..0ec4898b77 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -13,7 +13,7 @@ include(Copy3rdPartyLibs) include(ZLIB) include(URIPARSER) -include_directories( +include_directories( SYSTEM ${EXPAT_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 3a58c029b0..d4c4d29f50 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -80,7 +80,7 @@ const int LL_ERR_NOERR = 0; #endif // !_DEBUG -#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL +#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) { LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL; /* call abort, this will not be reached but signaled GCC after this line the program exists*/ std::abort(); } #define llassert_always(func) llassert_always_msg(func, #func) diff --git a/indra/newview/fs_viewer_manifest.py b/indra/newview/fs_viewer_manifest.py index 6ff50c7b3f..28467eb274 100644 --- a/indra/newview/fs_viewer_manifest.py +++ b/indra/newview/fs_viewer_manifest.py @@ -162,3 +162,63 @@ class FSViewerManifest: if self.path( src,dst ) == 0: self.missing.pop() + def fs_generate_breakpad_symbols_for_file( self, aFile ): + from os import makedirs, remove + from os.path import join, isfile + import subprocess + from shutil import move + + dumpSym = join( self.args["build"], "..", "packages", "bin", "dump_syms" ) + if not isfile( dumpSym ): + return + + symbolFile = aFile +".sym" + + with open( symbolFile, "w") as outfile: + subprocess.call( [dumpSym, aFile ], stdout=outfile ) + + firstline = open( symbolFile ).readline().strip() + + if firstline != "": + module, os, bitness, hash, filename = firstline.split(" ") + symbolDir = join( "symbols", filename, hash ) + try: + makedirs( symbolDir ) + except: + pass + move( symbolFile, symbolDir ) + + if isfile( symbolFile ): + remove( symbolFile ) + + def fs_save_breakpad_symbols(self, osname): + from glob import glob + import sys + from os.path import isdir + from shutil import rmtree + import tarfile + + #if isdir( "symbols" ): + # rmtree( "symbols" ) + + #files = glob( "%s/bin/*" % self.args['dest'] ) + #for f in files: + # self.fs_generate_breakpad_symbols_for_file( f ) + + #files = glob( "%s/lib/*.so" % self.args['dest'] ) + #for f in files: + # self.fs_generate_breakpad_symbols_for_file( f ) + + + if isdir( "symbols" ): + for a in self.args: + print("%s: %s" % (a, self.args[a])) + symbolsName = "%s/Phoenix_%s_%s_%s_symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(), + self.fs_channel_legacy_oneword(), + '-'.join( self.args['version'] ), + self.args['viewer_flavor'], + osname, + self.address_size) + + fTar = tarfile.open( symbolsName, "w:bz2") + fTar.add("symbols", arcname=".") diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ad3c72e89f..b19cb23f13 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2709,7 +2709,7 @@ void LLAppViewer::initLoggingAndGetLastDuration() // Remove the last ".old" log file. std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, - APP_NAME + ".log"); + APP_NAME + ".old"); LLFile::remove(old_log_file); // Get name of the log file diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index af00bd64e7..5bdfa0725e 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -45,6 +45,12 @@ #include +#if LL_SEND_CRASH_REPORTS +#include "breakpad/client/linux/handler/exception_handler.h" +#include "breakpad/common/linux/http_upload.h" +#include "lldir.h" +#endif + #define VIEWERAPI_SERVICE "com.secondlife.ViewerAppAPIService" #define VIEWERAPI_PATH "/com/secondlife/ViewerAppAPI" #define VIEWERAPI_INTERFACE "com.secondlife.ViewerAppAPI" @@ -131,6 +137,14 @@ LLAppViewerLinux::~LLAppViewerLinux() { } +#if LL_SEND_CRASH_REPORTS +static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) +{ + printf("Dump path: %s\n", descriptor.path() ); + return succeeded; +} +#endif + bool LLAppViewerLinux::init() { // g_thread_init() must be called before *any* use of glib, *and* @@ -143,8 +157,8 @@ bool LLAppViewerLinux::init() #if LL_SEND_CRASH_REPORTS if (success) { - LLAppViewer* pApp = LLAppViewer::instance(); - pApp->initCrashReporting(); + google_breakpad::MinidumpDescriptor *descriptor = new google_breakpad::MinidumpDescriptor(gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"")); + google_breakpad::ExceptionHandler *eh = new google_breakpad::ExceptionHandler(*descriptor, NULL, dumpCallback, NULL, true, -1); } #endif diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index da787bd549..f65ef398f4 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -54,6 +54,13 @@ #include "llcontrolavatar.h" #include "lldrawpoolavatar.h" +// Tentatively ignoring mismatched new/delete from the MemTrackableNonVirtual. I think according to the docs +// they are properly matched +#if LL_LINUX +#pragma GCC diagnostic ignored "-Wmismatched-new-delete" +#endif +// + const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9d237018fa..a713246161 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1403,7 +1403,8 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer image = LLImageFormatted::createFromType(codec); if (image.isNull()) { - image->setLastError("Couldn't open the image to be uploaded."); + // Pointer is null! + //image->setLastError("Couldn't open the image to be uploaded."); return FALSE; } if (!image->load(filename)) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 422f130057..2035f8b46b 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1272,7 +1272,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures() // Check whether the BOM capability is different to last time we changed region (even across login) void LLVOAvatarSelf::checkBOMRebakeRequired() { - if(!getRegion()) + if(getRegion()) { auto newBOMStatus = getRegion()->bakesOnMeshEnabled(); if(!gSavedSettings.getBOOL("CurrentlyUsingBakesOnMesh") != newBOMStatus) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5a6f1067a9..a9bad65b56 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -464,7 +464,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (TEM_INVALID == result) { // There's something bogus in the data that we're unpacking. - dp->dumpBufferToLog(); std::string region_name = "unknown region"; if (getRegion()) { diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 58d8e61e14..a51b7000d9 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -61,6 +61,9 @@ with the same filename but different name + + + diff --git a/indra/newview/skins/default/xui/da/floater_world_map.xml b/indra/newview/skins/default/xui/da/floater_world_map.xml index 0086fb0cbe..6794d73381 100644 --- a/indra/newview/skins/default/xui/da/floater_world_map.xml +++ b/indra/newview/skins/default/xui/da/floater_world_map.xml @@ -1,14 +1,6 @@ - - -