Make viewer compile on standalone linux x86_64

This involves making libllcommon shared, a change
that was not finished for windows/Mac.
More changes are needed to indra/newview/viewer_manifest.py
for those two operating systems, as well as to
indra/copy_win_scripts.

I did not test this on linux 32bit, nor non-standalone
on that OS, either.

I did not check voice (which will very likely not work
anyway on 64bit). And currently the webkit plugin doesn't
work for me, but I'll fix that in a different commit.
This commit is contained in:
Aleric Inglewood
2011-05-02 19:40:33 +02:00
parent 1b4ae2e3b5
commit 094587aefd
16 changed files with 167 additions and 105 deletions

View File

@@ -14,16 +14,18 @@ else (STANDALONE)
use_prebuilt_binary(apr_suite)
if (WINDOWS)
set(APR_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
)
set(APRICONV_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
)
# Doesn't need to link with iconv.dll
set(APRICONV_LIBRARIES "")
set(APRUTIL_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
)
elseif (DARWIN)
set(APR_LIBRARIES
@@ -41,9 +43,8 @@ else (STANDALONE)
set(APRICONV_LIBRARIES iconv)
endif (WINDOWS)
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
set(APRUTIL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
if (LINUX AND VIEWER)
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
endif (LINUX AND VIEWER)
endif (STANDALONE)

View File

@@ -7,9 +7,15 @@ include(ZLIB)
set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llcommon
${APRUTIL_INCLUDE_DIR}
${APR_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
set(LLCOMMON_LIBRARIES llcommon)
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llcommon uses.
# llcommon uses `clock_gettime' which is provided by librt on linux.
set(LLCOMMON_LIBRARIES llcommon rt)
else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)

View File

@@ -2,10 +2,25 @@
include(Prebuilt)
if (NOT STANDALONE)
use_prebuilt_binary(libuuid)
use_prebuilt_binary(vivox)
if (LINUX)
#use_prebuilt_binary(libuuid)
if(LINUX)
if (${ARCH} STREQUAL "x86_64")
use_prebuilt_binary(32bitcompatibilitylibs)
endif (${ARCH} STREQUAL "x86_64")
use_prebuilt_binary(fontconfig)
endif (LINUX)
endif(LINUX)
else (NOT STANDALONE)
# Download there even when using standalone.
set(STANDALONE OFF)
use_prebuilt_binary(vivox)
if(LINUX AND ${ARCH} STREQUAL "x86_64")
use_prebuilt_binary(32bitcompatibilitylibs)
endif(LINUX AND ${ARCH} STREQUAL "x86_64")
set(STANDALONE ON)
endif(NOT STANDALONE)
if (WINDOWS)
use_prebuilt_binary(dbghelp)
endif (WINDOWS)

View File

@@ -119,6 +119,7 @@ ARGUMENTS=[
Example use: %(name)s --arch=i686
On Linux this would try to use Linux_i686Manifest.""",
default=""),
dict(name='artwork', description='Artwork directory.', default=DEFAULT_SRCTREE),
dict(name='build', description='Build directory.', default=DEFAULT_SRCTREE),
dict(name='buildtype', description="""The build type used. ('Debug', 'Release', 'ReleaseSSE2' or 'RelWithDebInfo')
Default is Release """,
@@ -126,6 +127,9 @@ ARGUMENTS=[
dict(name='branding_id', description="""Identifier for the branding set to
use. Currently, 'secondlife' or 'snowglobe')""",
default='secondlife'),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
default=get_channel),
dict(name='configuration',
description="""The build configuration used. Only used on OS X for
now, but it could be used for other platforms as well.""",
@@ -136,16 +140,13 @@ ARGUMENTS=[
though it's not strictly a grid, 'firstlook' is also an acceptable
value for this parameter.""",
default=""),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
default=get_channel),
dict(name='login_channel',
description="""The channel to use for login handshake/updates only.""",
default=None),
dict(name='installer_name',
description=""" The name of the file that the installer should be
packaged up into. Only used on Linux at the moment.""",
default=None),
dict(name='login_channel',
description="""The channel to use for login handshake/updates only.""",
default=None),
dict(name='login_url',
description="""The url that the login screen displays in the client.""",
default=None),
@@ -156,7 +157,9 @@ ARGUMENTS=[
dict(name='source',
description='Source directory.',
default=DEFAULT_SRCTREE),
dict(name='artwork', description='Artwork directory.', default=DEFAULT_SRCTREE),
dict(name='standalone',
description='Set to ON if this is a standalone build.',
default="OFF"),
dict(name='touch',
description="""File to touch when action is finished. Touch file will
contain the name of the final package in a form suitable

View File

@@ -201,7 +201,7 @@ set_source_files_properties(${llcommon_HEADER_FILES}
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
add_library (llcommon ${llcommon_SOURCE_FILES})
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
add_dependencies(llcommon prepare)
target_link_libraries(
llcommon

View File

@@ -107,17 +107,7 @@
#endif
// Static linking with apr on windows needs to be declared.
#ifdef LL_WINDOWS
#ifndef APR_DECLARE_STATIC
#define APR_DECLARE_STATIC // For APR on Windows
#endif
#ifndef APU_DECLARE_STATIC
#define APU_DECLARE_STATIC // For APR util on Windows
#endif
#endif
// Deal with the differeneces on Windows
// Deal with the differences on Windows
#if defined(LL_WINDOWS)
#define BOOST_REGEX_NO_LIB 1
#define CURL_STATICLIB 1
@@ -169,7 +159,6 @@
#define LL_DLLIMPORT
#endif // LL_WINDOWS
/*
#ifdef llcommon_EXPORTS
// Compiling llcommon (shared)
#define LL_COMMON_API LL_DLLEXPORT
@@ -177,9 +166,5 @@
// Using llcommon (shared)
#define LL_COMMON_API LL_DLLIMPORT
#endif // llcommon_EXPORTS
*/
//I hate DLLs -SG
#define LL_COMMON_API
#endif // not LL_LINDEN_PREPROCESSOR_H

View File

@@ -36,6 +36,7 @@
#include <string>
#include <cstdio>
#include <algorithm>
#include <map>
#if LL_LINUX || LL_SOLARIS
#include <wctype.h>

View File

@@ -79,4 +79,4 @@ if (DARWIN)
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
endif (DARWIN)
endif (DARWIN)

View File

@@ -27,6 +27,7 @@ include_directories(
${LLIMAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
${LLQTWEBKIT_INCLUDE_DIR}
)

View File

@@ -1467,6 +1467,7 @@ if (LINUX)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
--standalone=${STANDALONE}
--grid=${GRID}
--channel=${VIEWER_CHANNEL}
--login_channel=${VIEWER_LOGIN_CHANNEL}
@@ -1591,17 +1592,17 @@ endif (LL_TESTS)
# Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py
if (WINDOWS)
#~ get_target_property(BUILT_LLCOMMON llcommon LOCATION)
#~ add_custom_command(
#~ TARGET ${VIEWER_BINARY_NAME} POST_BUILD
#~ COMMAND ${CMAKE_COMMAND}
#~ ARGS
#~ -E
#~ copy_if_different
#~ ${BUILT_LLCOMMON}
#~ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
#~ COMMENT "Copying llcommon.dll to the runtime folder."
#~ )
get_target_property(BUILT_LLCOMMON llcommon LOCATION)
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
-E
copy_if_different
${BUILT_LLCOMMON}
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
COMMENT "Copying llcommon.dll to the runtime folder."
)
get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION)
add_custom_command(

View File

@@ -7,7 +7,7 @@
## - Avoids using any OpenAL audio driver.
#export LL_BAD_OPENAL_DRIVER=x
## - Avoids using any FMOD audio driver.
export LL_BAD_FMOD_DRIVER=x
#export LL_BAD_FMOD_DRIVER=x
## - Avoids using the FMOD ESD audio driver.
#export LL_BAD_FMOD_ESD=x
@@ -45,6 +45,7 @@ export LL_BAD_FMOD_DRIVER=x
## disable these by enabling this option:
#export LL_DISABLE_GSTREAMER=x
## Everything below this line is just for advanced troubleshooters.
##-------------------------------------------------------------------
@@ -53,15 +54,8 @@ export LL_BAD_FMOD_DRIVER=x
## you're building your own viewer, bear in mind that the executable
## in the bin directory will be stripped: you should replace it with
## an unstripped binary before you run.
##
## I keep crashing without having GDB running, always run it if an
## environment variable is set.
if [ -n "$ASCENDED_DEVELOPER" ]; then
# export LL_WRAPPER='cgdb --args'
export LL_WRAPPER='gdb --args'
# export LL_WRAPPER='valgrind --smc-check=all --error-limit=no --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp'
fi
#export LL_WRAPPER='gdb --args'
#export LL_WRAPPER='valgrind --smc-check=all --error-limit=no --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp'
## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
export SDL_VIDEO_X11_DGAMOUSE=0
@@ -74,13 +68,6 @@ if [ "$GTK_IM_MODULE" = "scim" ]; then
export GTK_IM_MODULE=xim
fi
# Work around for a crash bug when restarting OpenGL after a change in the
# graphic settings (anti-aliasing, VBO, FSAA, full screen mode, UI scale).
# When you enable this work around, you can change the settings without
# crashing, but you will have to restart the viewer after changing them
# because the display still gets corrupted.
export LL_OPENGL_RESTART_CRASH_BUG=x
## - Automatically work around the ATI mouse cursor crash bug:
## (this workaround is disabled as most fglrx users do not see the bug)
#if lsmod | grep fglrx &>/dev/null ; then
@@ -121,7 +108,13 @@ if [ -n "$LL_TCMALLOC" ]; then
fi
export VIEWER_BINARY='singularity-do-not-run-directly'
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"'
BINARY_TYPE=$(expr match "$(file -b bin/$VIEWER_BINARY)" '\(.*executable\)')
if [ "${BINARY_TYPE}" == "ELF 64-bit LSB executable" ]; then
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:"${LD_LIBRARY_PATH}"'
else
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"'
fi
export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY'
export SL_OPT="`cat gridargs.dat` $@"
@@ -134,27 +127,7 @@ if [ -n "$LL_RUN_ERR" ]; then
if [ "$LL_RUN_ERR" = "runerr" ]; then
# generic error running the binary
echo '*** Bad shutdown. ***'
BINARY_TYPE=$(expr match "$(file -b ${RUN_PATH}/bin/SLPlugin)" '\(.*executable\)')
BINARY_SYSTEM=$(expr match "$(file -b /bin/uname)" '\(.*executable\)')
if [ "${BINARY_SYSTEM}" == "ELF 64-bit LSB executable" -a "${BINARY_TYPE}" == "ELF 32-bit LSB executable" ]; then
echo
cat << EOFMARKER
You are running the Second Life Viewer on a x86_64 platform. The
most common problems when launching the Viewer (particularly
'bin/$VIEWER_BINARY: not found' and 'error while
loading shared libraries') may be solved by installing your Linux
distribution's 32-bit compatibility packages.
For example, on Ubuntu and other Debian-based Linuxes you might run:
$ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-kde ia32-libs-sdl
EOFMARKER
fi
fi
fi
echo
echo '*******************************************************'
echo 'This is a BETA release of the Second Life linux client.'
echo 'Thank you for testing!'
echo 'Please see README-linux.txt before reporting problems.'
echo

View File

@@ -97,7 +97,7 @@ public:
virtual void move( LLFolderViewEventListener* parent_listener ) = 0;
virtual BOOL isItemCopyable() const = 0;
virtual BOOL copyToClipboard() const = 0;
virtual void cutToClipboard() = 0;
virtual BOOL cutToClipboard() const = 0;
virtual BOOL isClipboardPasteable() const = 0;
virtual void pasteFromClipboard() = 0;
virtual void pasteLinkFromClipboard() = 0;

View File

@@ -232,7 +232,7 @@ public:
virtual void move(LLFolderViewEventListener* new_parent_bridge) {}
virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL copyToClipboard() const { return FALSE; }
virtual void cutToClipboard() {}
virtual BOOL cutToClipboard() const { return FALSE; }
virtual BOOL isClipboardPasteable() const;
virtual BOOL isClipboardPasteableAsLink() const;
virtual void pasteFromClipboard() {}

View File

@@ -144,7 +144,7 @@ public:
virtual void move(LLFolderViewEventListener* parent_listener);
virtual BOOL isItemCopyable() const;
virtual BOOL copyToClipboard() const;
virtual void cutToClipboard();
virtual BOOL cutToClipboard() const;
virtual BOOL isClipboardPasteable() const;
virtual void pasteFromClipboard();
virtual void pasteLinkFromClipboard();
@@ -596,8 +596,9 @@ BOOL LLTaskInvFVBridge::copyToClipboard() const
return FALSE;
}
void LLTaskInvFVBridge::cutToClipboard()
BOOL LLTaskInvFVBridge::cutToClipboard() const
{
return FALSE;
}
BOOL LLTaskInvFVBridge::isClipboardPasteable() const

View File

@@ -121,6 +121,8 @@ class ViewerManifest(LLManifest):
def buildtype(self):
return self.args['buildtype']
def standalone(self):
return self.args['standalone'] == "ON"
def grid(self):
return self.args['grid']
def channel(self):
@@ -752,19 +754,9 @@ class Linux_i686Manifest(LinuxManifest):
def construct(self):
super(Linux_i686Manifest, self).construct()
# install either the libllkdu we just built, or a prebuilt one, in
# decreasing order of preference. for linux package, this goes to bin/
#~ try:
#~ self.path(self.find_existing_file('../llkdu/libllkdu.so',
#~ '../../libraries/i686-linux/lib_release_client/libllkdu.so'),
#~ dst='bin/libllkdu.so')
#~ # keep this one to preserve syntax, open source mangling removes previous lines
#~ pass
#~ except:
#~ print "Skipping libllkdu.so - not found"
#~ pass
self.path("../llcommon/libllcommon.so", "lib/libllcommon.so")
if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
if (not self.standalone()) and self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
try:
self.path("libkdu_v42R.so", "libkdu.so")
@@ -807,12 +799,72 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libvivoxsdk.so")
self.end_prefix("lib")
class Linux_x86_64Manifest(LinuxManifest):
def construct(self):
super(Linux_x86_64Manifest, self).construct()
# support file for valgrind debug tool
self.path("secondlife-i686.supp")
self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so")
if (not self.standalone()) and self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"):
self.path("libapr-1.so.0")
self.path("libaprutil-1.so.0")
self.path("libdb-4.2.so")
self.path("libcrypto.so.0.9.8")
self.path("libexpat.so.1")
self.path("libhunspell-1.2.so.0.0.0", "libhunspell-1.2.so.0")
self.path("libssl.so.0.9.8")
self.path("libuuid.so", "libuuid.so.1")
self.path("libSDL-1.2.so.0")
self.path("libELFIO.so")
self.path("libjpeg.so.7")
self.path("libpng12.so.0")
self.path("libopenjpeg.so.2")
self.path("libxml2.so.2")
#self.path("libz.so.1") #not needed
# OpenAL
self.path("libopenal.so.1")
self.path("libalut.so.0")
# GTK+ and dependencies
## Lets just use the system libraries for all of these:
##self.path("libatk-1.0.so.0")
##self.path("libcairo.so.2")
##self.path("libfontconfig.so.1")
##self.path("libfreetype.so.6")
self.path("libgdk_pixbuf-2.0.so.0") # was commented to use systems gdk pixbufs instead -
# but seems webkit needs it o_O . Packaging for testing now.
##self.path("libgdk-x11-2.0.so.0")
##self.path("libgtk-x11-2.0.so.0")
# self.path("libpango-1.0.so.0") # use systems pango instead
# self.path("libpangoft2-1.0.so.0") # Both gdk pixbufs and pango would load systems modules
# self.path("libpangox-1.0.so.0") # and crash if not compatible or present.
# self.path("libpangoxft-1.0.so.0") # So we depend system gdk pixbufs and pango anyway.
##self.path("libpixman-1.so.0")
self.end_prefix("lib64")
# Vivox runtimes and libs
if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
self.path("SLVoice")
self.end_prefix("bin")
if self.prefix(src="vivox-runtime/i686-linux", dst="lib32"):
#self.path("libalut.so")
self.path("libortp.so")
self.path("libvivoxsdk.so")
self.end_prefix("lib32")
# 32bit libs needed for voice
if self.prefix("../../libraries/x86_64-linux/lib_release_client/32bit-compat", dst="lib32"):
self.path("libalut.so")
self.path("libidn.so.11")
self.path("libopenal.so.1")
# self.path("libortp.so")
self.path("libuuid.so.1")
self.end_prefix("lib32")
if __name__ == "__main__":
main()

View File

@@ -1340,6 +1340,29 @@ anguage Infrstructure (CLI) international standard</string>
</map>
</map>
</map>
<key>32bitcompatibilitylibs</key>
<map>
<key>copyright</key>
<string>Copyrights: Libidn: Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Simon Josefsson. License GPL v3.0.
Freealut, libuuid, openal-soft: see copyright and license of the
according main packages.
</string>
<key>description</key>
<string>32bit libraries needed for using voice</string>
<key>license</key>
<string>gpl</string>
<key>packages</key>
<map>
<key>linux64</key>
<map>
<key>md5sum</key>
<string>cbaafc55fb8b14283541791e82f13462</string>
<key>url</key>
<uri>http://imprudenceviewer.org/download/libs/linux64-32bitcompatibilitylibs-20100903.tar.bz2</uri>
</map>
</map>
</map>
<key>xmlrpc-epi</key>
<map>
<key>copyright</key>