BuildForLinuxCmake
Version 76 (Nakarti, 08/14/2011 05:49 am)
| 1 | 32 | vl | h1. Building NeL and Ryzom Client with CMake on GNU/Linux |
|---|---|---|---|
| 2 | 1 | jayme | |
| 3 | 51 | Lukan | {{toc}} |
| 4 | 51 | Lukan | |
| 5 | 32 | vl | h2. Installing Dependencies |
| 6 | 1 | jayme | |
| 7 | 32 | vl | h3. Packages |
| 8 | 1 | jayme | |
| 9 | 32 | vl | Most of the dependencies are available in the distribution system. |
| 10 | 32 | vl | |
| 11 | 33 | vl | h4. Ubuntu |
| 12 | 32 | vl | |
| 13 | 14 | andrew | <pre> |
| 14 | 37 | kervala | sudo apt-get install mercurial libcurl4-openssl-dev libluabind-dev libfreetype6-dev \ |
| 15 | 48 | kervala | libx11-dev libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev libogg-dev libvorbis-dev libxml2-dev \ |
| 16 | 39 | Kristaba | cmake build-essential libpng12-dev libjpeg62-dev rrdtool libmysqlclient15-dev bison libxmu-dev |
| 17 | 1 | jayme | </pre> |
| 18 | 1 | jayme | |
| 19 | 72 | Nakarti | h4. Debian |
| 20 | 72 | Nakarti | |
| 21 | 72 | Nakarti | Debian is the same as with Ubuntu, if you add the Karmic archive: |
| 22 | 72 | Nakarti | |
| 23 | 72 | Nakarti | <pre> |
| 24 | 72 | Nakarti | deb http://us.archive.ubuntu.com/ubuntu/ karmic universe |
| 25 | 72 | Nakarti | deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe |
| 26 | 72 | Nakarti | deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe |
| 27 | 72 | Nakarti | deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe |
| 28 | 72 | Nakarti | </pre> |
| 29 | 72 | Nakarti | |
| 30 | 73 | Nakarti | You will need to add the Ubuntu GPG keys: |
| 31 | 72 | Nakarti | |
| 32 | 72 | Nakarti | <pre> |
| 33 | 72 | Nakarti | gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 40976EAF437D05B5 |
| 34 | 72 | Nakarti | apt-key add /root/.gnupg/pubring.gpg |
| 35 | 72 | Nakarti | apt-get update |
| 36 | 72 | Nakarti | </pre> |
| 37 | 72 | Nakarti | |
| 38 | 33 | vl | h4. Gentoo |
| 39 | 1 | jayme | |
| 40 | 32 | vl | *Note*: for Gentoo you will probably need to activate the openssl flag for curl before emerging : |
| 41 | 32 | vl | <pre> |
| 42 | 58 | gardon | echo "net-misc/curl ssl" >> /etc/portage/package.use |
| 43 | 32 | vl | </pre> |
| 44 | 1 | jayme | |
| 45 | 58 | gardon | dev-cpp/luabind had trouble with boost, so it's not in the official Portage tree. You can use layman, though, and add the gamerlay overlay: |
| 46 | 1 | jayme | <pre> |
| 47 | 58 | gardon | layman -a gamerlay |
| 48 | 58 | gardon | </pre> |
| 49 | 58 | gardon | |
| 50 | 58 | gardon | The package is also masked, so you'll have to unmask it. |
| 51 | 58 | gardon | |
| 52 | 58 | gardon | <pre> |
| 53 | 1 | jayme | emerge -av net-misc/curl dev-cpp/luabind media-libs/freetype x11-libs/libX11 \ |
| 54 | 1 | jayme | media-libs/mesa x11-libs/libXxf86vm media-libs/openal media-libs/freealut \ |
| 55 | 31 | koolfy | media-libs/libogg media-libs/libvorbis dev-libs/libxml2 dev-util/cmake \ |
| 56 | 58 | gardon | media-libs/libpng media-libs/jpeg net-analyzer/rrdtool sys-devel/bison net-libs/libwww dev-util/cpptest |
| 57 | 1 | jayme | </pre> |
| 58 | 58 | gardon | |
| 59 | 58 | gardon | Then you only have to manually install squish (see bellow) |
| 60 | 1 | jayme | |
| 61 | 57 | shd | h4. Arch Linux |
| 62 | 38 | noxxy | |
| 63 | 38 | noxxy | <pre> |
| 64 | 38 | noxxy | pacman -S curl freetype2 libx11 mesa libxxf86vm openal freealut libogg libvorbis \ |
| 65 | 57 | shd | libxml2 cmake libpng libjpeg rrdtool bison libwww boost |
| 66 | 1 | jayme | </pre> |
| 67 | 57 | shd | |
| 68 | 57 | shd | You can install Luabind by following instructions on next paragraph, or making use of AUR luabind package: |
| 69 | 57 | shd | http://aur.archlinux.org/packages.php?K=luabind&do_Search=Go |
| 70 | 38 | noxxy | |
| 71 | 32 | vl | h3. Luabind |
| 72 | 1 | jayme | |
| 73 | 32 | vl | On Ubuntu Lucid, luabind is in the distribution, skip this section. |
| 74 | 70 | molator | If luabind is missing or too old in your distribution, you might want to compile yourself with. |
| 75 | 54 | kervala | |
| 76 | 69 | piglop | Download the package from http://hg.kervala.net/packaging/file/, uncompress it and: |
| 77 | 64 | molator | <pre> |
| 78 | 54 | kervala | cd luabind |
| 79 | 54 | kervala | mkdir build |
| 80 | 54 | kervala | cd build |
| 81 | 54 | kervala | cmake .. |
| 82 | 54 | kervala | make |
| 83 | 54 | kervala | sudo make install |
| 84 | 54 | kervala | </pre> |
| 85 | 31 | koolfy | |
| 86 | 32 | vl | h3. libwww-dev |
| 87 | 31 | koolfy | |
| 88 | 32 | vl | In Ubuntu lucid this package doesn't seem to exist. You can however "use the package from Karmic":http://packages.ubuntu.com/karmic/libwww-dev or "download the source":http://www.w3.org/Library/Distribution.html. |
| 89 | 32 | vl | |
| 90 | 74 | Nakarti | NOTE: If you are using Ubuntu or Debian and want to install libwww-dev you can add the karmic archive to your /etc/apt/sources.list as follows: |
| 91 | 46 | sm3 | <pre> |
| 92 | 46 | sm3 | deb http://us.archive.ubuntu.com/ubuntu/ karmic universe |
| 93 | 46 | sm3 | deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe |
| 94 | 46 | sm3 | deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe |
| 95 | 46 | sm3 | deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe |
| 96 | 46 | sm3 | </pre> |
| 97 | 46 | sm3 | |
| 98 | 46 | sm3 | then sudo apt-get update and sudo apt-get install libwww-dev |
| 99 | 46 | sm3 | |
| 100 | 70 | molator | You can compile yourself with Ubuntu patched sources. |
| 101 | 52 | kervala | |
| 102 | 70 | molator | Download the package from http://hg.kervala.net/packaging/file/, uncompress it and: |
| 103 | 64 | molator | <pre> |
| 104 | 52 | kervala | cd libwww |
| 105 | 52 | kervala | ./autogen.sh |
| 106 | 55 | Lukan | ./configure --with-ssl=no --with-zlib --with-expat --with-gnu-ld --enable-shared |
| 107 | 52 | kervala | make |
| 108 | 52 | kervala | sudo make install |
| 109 | 1 | jayme | </pre> |
| 110 | 55 | Lukan | |
| 111 | 55 | Lukan | * Note: you may have to run : *sudo chmod 755 configure* : if you get an error that ./configure is not a program or permission denied. |
| 112 | 55 | Lukan | |
| 113 | 61 | pl3w5y | Above source does not build on Linux Mint Debian (and maybe other Debian based distros) Binaries from Etch can be installed from the archive: |
| 114 | 61 | pl3w5y | |
| 115 | 61 | pl3w5y | 32bit |
| 116 | 61 | pl3w5y | <pre> |
| 117 | 61 | pl3w5y | aptitude install libexpat1-dev |
| 118 | 61 | pl3w5y | wget http://archive.debian.org/debian/pool/main/w/w3c-libwww/libwww0_5.4.0-11_i386.deb |
| 119 | 61 | pl3w5y | wget http://archive.debian.org/debian/pool/main/w/w3c-libwww/libwww-dev_5.4.0-11_i386.deb |
| 120 | 61 | pl3w5y | dpkg -i libwww0_5.4.0-11_i386.deb libwww-dev_5.4.0-11_i386.deb |
| 121 | 61 | pl3w5y | </pre> |
| 122 | 61 | pl3w5y | 64bit |
| 123 | 61 | pl3w5y | <pre> |
| 124 | 61 | pl3w5y | aptitude install libexpat1-dev |
| 125 | 61 | pl3w5y | wget http://archive.debian.org/debian/pool/main/w/w3c-libwww/libwww0_5.4.0-11_amd64.deb |
| 126 | 61 | pl3w5y | wget http://archive.debian.org/debian/pool/main/w/w3c-libwww/libwww-dev_5.4.0-11_amd64.deb |
| 127 | 61 | pl3w5y | dpkg -i libwww0_5.4.0-11_amd64.deb libwww-dev_5.4.0-11_amd64.deb |
| 128 | 61 | pl3w5y | </pre> |
| 129 | 52 | kervala | |
| 130 | 1 | jayme | h3. libsquish |
| 131 | 52 | kervala | |
| 132 | 70 | molator | You can compile yourself with. |
| 133 | 52 | kervala | |
| 134 | 70 | molator | Download the package from http://hg.kervala.net/packaging/file/, uncompress it and: |
| 135 | 64 | molator | <pre> |
| 136 | 52 | kervala | cd squish |
| 137 | 52 | kervala | mkdir build |
| 138 | 52 | kervala | cd build |
| 139 | 52 | kervala | cmake .. |
| 140 | 52 | kervala | make |
| 141 | 52 | kervala | sudo make install |
| 142 | 1 | jayme | </pre> |
| 143 | 52 | kervala | |
| 144 | 52 | kervala | h3. cpptest |
| 145 | 52 | kervala | |
| 146 | 70 | molator | You can compile yourself with. |
| 147 | 52 | kervala | |
| 148 | 70 | molator | Download the package from http://hg.kervala.net/packaging/file/, uncompress it and: |
| 149 | 64 | molator | <pre> |
| 150 | 52 | kervala | cd cpptest |
| 151 | 60 | piglop | sh ./autogen.sh |
| 152 | 52 | kervala | ./configure |
| 153 | 52 | kervala | make |
| 154 | 52 | kervala | sudo make install |
| 155 | 52 | kervala | </pre> |
| 156 | 52 | kervala | |
| 157 | 56 | Lukan | * Note: Also check *aptitude* to ensure that the libraries are not available. |
| 158 | 56 | Lukan | |
| 159 | 32 | vl | h2. Get the sources |
| 160 | 32 | vl | |
| 161 | 1 | jayme | *Warning*: Make sure you *do not* have the packages libnel or libnel-dev already installed from the main repositories as of writing this they are at version 0.5 which is too old to build the game with. |
| 162 | 32 | vl | |
| 163 | 33 | vl | After getting the dependencies make sure you have [[Getting_Source|downloaded the code]] and then define the directory where you have downloaded it: |
| 164 | 33 | vl | |
| 165 | 1 | jayme | <pre> |
| 166 | 13 | andrew | export RYHOME="/path/to/ryzom/code" |
| 167 | 1 | jayme | </pre> |
| 168 | 1 | jayme | |
| 169 | 40 | kervala | h2. Building and installing the NeL and Ryzom |
| 170 | 1 | jayme | |
| 171 | 29 | vbmithr | h3. Building |
| 172 | 1 | jayme | |
| 173 | 40 | kervala | Before continuing make sure you have installed the packages you just generated earlier (or that you installed them with @make install@) |
| 174 | 40 | kervala | |
| 175 | 1 | jayme | <pre> |
| 176 | 40 | kervala | mkdir $RYHOME/build && cd $RYHOME/build |
| 177 | 43 | matmat | cmake -DWITH_NEL_TESTS=OFF .. |
| 178 | 35 | ashly | make -j3 |
| 179 | 1 | jayme | *Note: Its make -j<# of cores +1> |
| 180 | 1 | jayme | </pre> |
| 181 | 1 | jayme | |
| 182 | 40 | kervala | If you want to use lua 5.0 instead of lua 5.1, add -DWITH_LUA51=OFF to the cmake command line. |
| 183 | 40 | kervala | You can avoid building client/server/tools by specifying: |
| 184 | 40 | kervala | * -DWITH_NEL_SAMPLES=OFF |
| 185 | 42 | matmat | * -DWITH_NEL_TOOLS=OFF |
| 186 | 40 | kervala | * -DWITH_RYZOM_CLIENT=OFF |
| 187 | 40 | kervala | * -DWITH_RYZOM_SERVER=OFF |
| 188 | 40 | kervala | * -DWITH_RYZOM_TOOLS=OFF |
| 189 | 42 | matmat | |
| 190 | 42 | matmat | |
| 191 | 40 | kervala | |
| 192 | 41 | molator | If you want to build NeL without sound libs, for example when you only need the server: |
| 193 | 41 | molator | * -DWITH_NEL=ON -DWITH_SOUND=OFF |
| 194 | 41 | molator | |
| 195 | 40 | kervala | Currently there is no CPack support for the client. This means you will not be able to run "cpack -G DEB" and get a debian or rpm package to install and that you have to do @make install@ instead. |
| 196 | 40 | kervala | |
| 197 | 49 | sm3 | NOTE: If you are building the server on 64-bit Linux you should use -DWITH_STATIC=ON for now. Also add -DWITH_DRIVER_OPENGL=OFF and -DWITH_DRIVER_OPENAL=OFF to avoid build errors. |
| 198 | 72 | Nakarti | |
| 199 | 72 | Nakarti | An example server-only cmake on 64-bit Linux |
| 200 | 1 | jayme | <pre> |
| 201 | 74 | Nakarti | mkdir $RYHOME/build && cd $RYHOME/build |
| 202 | 74 | Nakarti | ryzom/code/build$ cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_NEL=ON \ |
| 203 | 74 | Nakarti | -DWITH_SOUND=OFF -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF .. |
| 204 | 74 | Nakarti | make -j2 |
| 205 | 74 | Nakarti | # j2 will take advantage of 2 cpus not as well as j3, but each thread uses ~300MB memory |
| 206 | 72 | Nakarti | </pre> |
| 207 | 47 | sm3 | |
| 208 | 29 | vbmithr | h3. Installing |
| 209 | 1 | jayme | |
| 210 | 1 | jayme | According to your system you have several options. |
| 211 | 1 | jayme | |
| 212 | 45 | sm3 | NOTE: You can just run Ryzom Core from the source directory after it's finished building. |
| 213 | 45 | sm3 | |
| 214 | 50 | sm3 | see [[ConfigureForLinux]] |
| 215 | 44 | sm3 | |
| 216 | 1 | jayme | h4. Debian/Ubuntu (and others using deb packages) |
| 217 | 1 | jayme | |
| 218 | 29 | vbmithr | Create a deb package using |
| 219 | 1 | jayme | |
| 220 | 29 | vbmithr | <pre>cpack -G DEB -D CPACK_PACKAGE_CONTACT="your@mail.address"</pre> |
| 221 | 1 | jayme | |
| 222 | 29 | vbmithr | (replace the email by your own) and install it on your system. |
| 223 | 21 | jayme | |
| 224 | 33 | vl | h4. Fedora (and rpm based distributions) |
| 225 | 33 | vl | |
| 226 | 33 | vl | Create a RPM package using |
| 227 | 1 | jayme | |
| 228 | 29 | vbmithr | <pre>cpack -G RPM -D CPACK_PACKAGE_CONTACT="your@mail.address"</pre> |
| 229 | 5 | Letto | |
| 230 | 25 | kervala | (replace the email by your own) and install it on your system. |
| 231 | 1 | jayme | |
| 232 | 32 | vl | h4. Others (incl. Gentoo) |
| 233 | 30 | vbmithr | |
| 234 | 34 | ashly | Install the NeL library with |
| 235 | 31 | koolfy | |
| 236 | 18 | andrew | <pre>make install</pre> |
| 237 | 18 | andrew | |
| 238 | 29 | vbmithr | h2. Run the Ryzom Client |
| 239 | 40 | kervala | |
| 240 | 40 | kervala | This section explains how to run the client and connect the open shard. |
| 241 | 32 | vl | |
| 242 | 76 | Nakarti | * Download the Windows client http://ks35074.kimsufi.com:8080/client_win_x86_stlport-0.8.0.1627.7z |
| 243 | 76 | Nakarti | (You need to download the client for its data/ and client.cfg, which are not part of Source) |
| 244 | 32 | vl | |
| 245 | 75 | Nakarti | * Extract it and start the binary from the root of the windows client directory, which is easier if you create a link: |
| 246 | 28 | vbmithr | |
| 247 | 32 | vl | <pre> |
| 248 | 28 | vbmithr | ln -s /path/to/code/ryzom/build/bin/ryzom_client /path/to/windows/client/dir/ryzom_core_linux |
| 249 | 27 | vbmithr | </pre> |
| 250 | 32 | vl | |
| 251 | 1 | jayme | The client will connect to the Open shard by default. Use the instructions of the [[OpenShard]] page to create an account on that shard. |
| 252 | 51 | Lukan | |
| 253 | 51 | Lukan | |
| 254 | 51 | Lukan | h2. Server Chain Crashing |
| 255 | 51 | Lukan | |
| 256 | 62 | Hialmar | If you happen to find the server constantly crashing and restarting, and in the admin panel it states that several of the processes are "*Chain Crashing*", a found fix is to *cmake* with the additional flags of *-DWITH_STATIC=ON* and *-DWITH_STATIC_DRIVERS=ON*. These two flags were suggested by *Kristaba* as they corrected the issue. |
| 257 | 51 | Lukan | |
| 258 | 68 | molator | This may not be an issue if following : http://dev.ryzom.com/projects/ryzom/wiki/BuildForLinux : as it is using make, and it uses *buildmode static*. This needs to be researched however to make sure. |
| 259 | 59 | molator | |
| 260 | 59 | molator | CMake Options: |
| 261 | 67 | molator | http://dev.ryzom.com/projects/ryzom/wiki/CMakeOptions |