LinuxBuildHowto.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. 1.- Build dependencies:
  2. The tools required to build the viewer are:
  3. - gcc/g++ v8.1 or newer (1), or clang/clang++ v7.0 or newer (2), that is a
  4. full-fledged C17/C++17 compiler.
  5. - binutils (as, ld & Co) and optionally elfutils (for eu-strip)
  6. - cmake (v3.5 or newer); v3.16+ recommended for a much faster compilation.
  7. - make
  8. - python (among v3.10 to v3.3, in this preference order)
  9. - bzip2
  10. - gzip
  11. - tar
  12. - bash
  13. - grep (for the linux-build.sh script)
  14. - coreutils (for the linux-build.sh script)
  15. You will also need:
  16. - The headers and shared libraries for glibc v2.28 or newer.
  17. - The headers and shared libraries for libstdc++ v6.0.25 or newer.
  18. - The headers and libraries for X11, Xrender, Xinerama, OpenGL, Mesa (GL/GLU).
  19. - A working connection to Internet for the automatic retrieval of the
  20. pre-built libraries (note that once those libraries are cached on your
  21. build system, the connection is no more necessary).
  22. (1) The building process was only tested and working (without any warning) with
  23. gcc/g++ v8.3.0, v11.4.0 and v12.4.0. Note that I won't support a viewer built
  24. with other gcc versions.
  25. For gcc versions other than v8.3 (for x86_64) and v11.4 (for aarch64), which
  26. are the versions used to compile the official viewer builds, shared boost
  27. libraries are used instead of static ones, so to avoid boost static libraries
  28. link failures, due to boost messing up dirtily with symbols naming, causing
  29. mismatches... This results in a larger viewer distribution (the full boost
  30. shared libraries are bundled, instead of just having the actually used boost
  31. functions merged into the viewer binary).
  32. (2) The building process was only tested and working (without any warning) with
  33. clang/clang++ v18.1.8. Note that I won't support a viewer built with other
  34. clang versions.
  35. 2.- Distribution-neutral building instructions (for RPM builds, see chapter 4):
  36. Extract the viewer sources tarball, which will create a linden/ sub-directory
  37. in the destination directory.
  38. You may want to open the linden/indra/cmake/00-BuildOptions.cmake file to
  39. review the various build options; they are set to their default used for the
  40. official builds, but you may want to add/remove features such as plugins,
  41. memory management, experimental features, etc...
  42. To launch the build, simply open a terminal, change to the linden/ directory of
  43. the viewer sources and type:
  44. ./linux-build.sh
  45. If you want to build with clang, use:
  46. ./linux-build.sh --clang
  47. Notes:
  48. a.- If your version of gcc/clang spews warnings and aborts the compilation
  49. (seen when using compiler versions that are not among the tested ones: see
  50. paragraph 1), then you can force the compilation, not treating warnings as
  51. errors with: ./linux-build.sh [--clang] --ignore-warnings
  52. b.- If you have patches you want to apply to personal builds, you may place
  53. them inside ~/.secondlife/patches/cool_vl_viewer/ and have them
  54. automatically applied when the build is done with the --patches option.
  55. Note that the patches must have been produced with:
  56. diff -durN linden linden-patched >your_patch_name
  57. They may then be left as plain text patches, or be gzipped, bzipped or
  58. xzipped.
  59. c.- Use "./linux-build.sh --help" to learn about more build options.
  60. d.- The Voice client, still being a 32 bits binary, needs for the minimum 32
  61. bits compatibility libraries (glibc & Co) to be installed on the target
  62. system in order to be usable (but the end user may use the provided
  63. install-wine-SLVoice.sh script to install the Windows version of the
  64. SLVoice client and use that instead, via Wine).
  65. 3.- Distribution-neutral packaging and distribution:
  66. If you wish to distribute your build, you will need to use InstallJammer v1.3
  67. (https://sourceforge.net/projects/installjammer/files/InstallJammer/snapshots/installjammer-1.3-snapshot.tar.gz/download)
  68. with the provided script in linden/scripts/installers/linux[64]/ (in the latter
  69. script, using a text editor, change the occurrences of
  70. "/usr/local/CoolVLViewer-1.32.x/" with the path of whatever directory you
  71. installed the viewer into).
  72. Simply load the CoolVLViewer-x86_64-1.32.x.mpi file into InstallJammer,
  73. select "Build Installers" in the tree on the left, then check "Build for final
  74. release" on the bottom and press the "Build Install" button. The distributable
  75. package will be created in linden/scripts/installers/linux64/output/
  76. 4.- RPM packaging (for Mandriva, Fedora, Suse and all their forks):
  77. The build process described here works for 64 bits RPM-based distributions. It
  78. has been tested and working on two Mandriva forks (Rosa 2016 and PCLinuxOS);
  79. other RPM-based distributions may require a slight adjustement of the .spec
  80. file (depending on possible RPM %macros peculiarities/oddities).
  81. You will find a CoolVLViewer.spec file in the scripts/installers/rpm/ sub-
  82. directory of the viewer sources. Place it into the SPECS/ sub-directory of your
  83. RPM build tree (which may be /usr/src/RPM, /usr/src/rpm, /usr/src/rpmbuild or
  84. ~/rpmbuild, depending on your Linux distribution), then either place the
  85. corresponding sources tarball in SOURCES/ or, to get the tarball automatically
  86. downloaded into SOURCES/, type (from the RPM build tree):
  87. touch SOURCES/CoolVLViewer-src-130BR.tar.bz2
  88. where 'B' is the branch number and 'R' is the release number: those are listed
  89. in the first lines of the spec file, respectively as "micro" and "nano") so to
  90. create an empty file (so that rpmbuild would not complain about a missing
  91. source tarball).
  92. Finally launch the build by typing:
  93. rpmbuild -ba SPECS/CoolVLViewer.spec
  94. You may also specify options to build with specific gcc versions (when they are
  95. installed on your system) not matching your system gcc version, or with clang
  96. (here again, if installed on your system).
  97. For example, to build with gcc vX.N (with X=5 to 10) when available:
  98. rpmbuild -ba --with gcc55 SPECS/CoolVLViewer.spec
  99. Or to build with clang when available:
  100. rpmbuild -ba --with clang SPECS/CoolVLViewer.spec
  101. You may also enable tuned optimizations (*) for the CPU model of the computer
  102. you build the viewer onto with:
  103. rpmbuild -ba --with tune SPECS/CoolVLViewer.spec
  104. The tune option may be mixed with gccXN or clang, e.g.:
  105. rpmbuild -ba --with gcc55 --with tune SPECS/CoolVLViewer.spec
  106. If you have patches you want to apply to personal builds, you may place them
  107. inside ~/.secondlife/patches/cool_vl_viewer/ and have them automatically
  108. applied when the build is done --with tune. Note that the patches must have
  109. been produced with: diff -durN linden linden-patched >your_patch_name.patch
  110. They may then be left as plain text patches, or be gzipped, bzipped or xzipped.
  111. For distribution specific patches, you will have to edit manually the .spec
  112. file and add them in the usual way ("PatchN: your_patch_N.patch" lines below
  113. the "Source0:" line, then "%patchN -p1" lines in the %prep section, just after
  114. the "cd linden" line).
  115. Note that the Voice client, still being a 32 bits binary, needs for the minimum
  116. 32 bits compatibility libraries (glibc & Co) to be installed on the target
  117. system in order to be usable. So you might want to add the corresponding 32bits
  118. package(s) as "Requires" in the spec file for your Linux distro.
  119. (*) IMPORTANT: the built RPM package may be distributed *IF AND ONLY IF* the
  120. "tune" option was *NOT* used.