diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/thrift/doc/install | |
parent | Initial commit. (diff) | |
download | ceph-upstream/16.2.11+ds.tar.xz ceph-upstream/16.2.11+ds.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/thrift/doc/install')
-rw-r--r-- | src/jaegertracing/thrift/doc/install/README.md | 43 | ||||
-rw-r--r-- | src/jaegertracing/thrift/doc/install/centos.md | 75 | ||||
-rw-r--r-- | src/jaegertracing/thrift/doc/install/debian.md | 62 | ||||
-rw-r--r-- | src/jaegertracing/thrift/doc/install/os_x.md | 27 | ||||
-rw-r--r-- | src/jaegertracing/thrift/doc/install/windows.md | 186 |
5 files changed, 393 insertions, 0 deletions
diff --git a/src/jaegertracing/thrift/doc/install/README.md b/src/jaegertracing/thrift/doc/install/README.md new file mode 100644 index 000000000..071a5d64d --- /dev/null +++ b/src/jaegertracing/thrift/doc/install/README.md @@ -0,0 +1,43 @@ + +## Basic requirements +* A relatively POSIX-compliant *NIX system + * Cygwin or MinGW can be used on Windows (but there are better options, see below) +* g++ 4.2 +* boost 1.56.0 +* Runtime libraries for lex and yacc might be needed for the compiler. + +## Requirements for building from source +* GNU build tools: + * autoconf 2.65 + * automake 1.13 + * libtool 1.5.24 +* pkg-config autoconf macros (pkg.m4) +* lex and yacc (developed primarily with flex and bison) +* libssl-dev + +## Requirements for building the compiler from source on Windows +* Visual Studio C++ +* Flex and Bison (e.g. the WinFlexBison package) + +## Language requirements +These are only required if you choose to build the libraries for the given language + +* C++ + * Boost 1.56.0 + * libevent (optional, to build the nonblocking server) + * zlib (optional) +* Java + * Java 1.8 + * Gradle +* C#: Mono 1.2.4 (and pkg-config to detect it) or Visual Studio 2005+ +* Python 2.6 (including header files for extension modules) +* PHP 5.0 (optionally including header files for extension modules) +* Ruby 1.8 + * bundler gem +* Erlang R12 (R11 works but not recommended) +* Perl 5 + * Bit::Vector + * Class::Accessor +* Haxe 3.1.3 +* Go 1.4 +* Delphi 2010 diff --git a/src/jaegertracing/thrift/doc/install/centos.md b/src/jaegertracing/thrift/doc/install/centos.md new file mode 100644 index 000000000..18282a3a1 --- /dev/null +++ b/src/jaegertracing/thrift/doc/install/centos.md @@ -0,0 +1,75 @@ +# Building Apache Thrift on CentOS 6.5 + +Starting with a minimal installation, the following steps are required to build Apache Thrift on Centos 6.5. This example builds from source, using the current development master branch. These instructions should also work with Apache Thrift releases beginning with 0.9.2. + +## Update the System + + sudo yum -y update + +## Install the Platform Development Tools + + sudo yum -y groupinstall "Development Tools" + +## Upgrade autoconf/automake/bison + + sudo yum install -y wget + +### Upgrade autoconf + + wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz + tar xvf autoconf-2.69.tar.gz + cd autoconf-2.69 + ./configure --prefix=/usr + make + sudo make install + cd .. + +### Upgrade automake + + wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz + tar xvf automake-1.14.tar.gz + cd automake-1.14 + ./configure --prefix=/usr + make + sudo make install + cd .. + +### Upgrade bison + + wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz + tar xvf bison-2.5.1.tar.gz + cd bison-2.5.1 + ./configure --prefix=/usr + make + sudo make install + cd .. + +## Add Optional C++ Language Library Dependencies + +All languages require the Apache Thrift IDL Compiler and at this point everything needed to make the IDL Compiler is installed (if you only need the compiler you can skip to the Build step). + +If you will be developing Apache Thrift clients/servers in C++ you will also need additional packages to support the C++ shared library build. + +### Install C++ Lib Dependencies + + sudo yum -y install libevent-devel zlib-devel openssl-devel + +### Upgrade Boost >= 1.56 + + wget http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz + tar xvf boost_1_56_0.tar.gz + cd boost_1_56_0 + ./bootstrap.sh + sudo ./b2 install + +## Build and Install the Apache Thrift IDL Compiler + + git clone https://github.com/apache/thrift.git + cd thrift + ./bootstrap.sh + ./configure --with-lua=no + make + sudo make install + +This will build the compiler (thrift/compiler/cpp/thrift --version) and any language libraries supported. The make install step installs the compiler on the path: /usr/local/bin/thrift +You can use the ./configure --enable-libs=no switch to build the Apache Thrift IDL Compiler only without lib builds. To run tests use "make check". diff --git a/src/jaegertracing/thrift/doc/install/debian.md b/src/jaegertracing/thrift/doc/install/debian.md new file mode 100644 index 000000000..2ccc37da7 --- /dev/null +++ b/src/jaegertracing/thrift/doc/install/debian.md @@ -0,0 +1,62 @@ +## Debian/Ubuntu install +The following command will install tools and libraries required to build and install the Apache Thrift compiler and C++ libraries on a Debian/Ubuntu Linux based system. + + sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config + +Debian 7/Ubuntu 12 users need to manually install a more recent version of automake and (for C++ library and test support) boost: + + wget http://ftp.debian.org/debian/pool/main/a/automake-1.15/automake_1.15-3_all.deb + sudo dpkg -i automake_1.15-3_all.deb + + wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz tar xvf boost_1_60_0.tar.gz + cd boost_1_60_0 + ./bootstrap.sh + sudo ./b2 install + +## Optional packages + +If you would like to build Apache Thrift libraries for other programming languages you may need to install additional packages. The following languages require the specified additional packages: + + * Java + * packages: gradle + * You will also need Java JDK v1.8 or higher. Type **javac** to see a list of available packages, pick the one you prefer and **apt-get install** it (e.g. default-jdk). + * Ruby + * ruby-full ruby-dev ruby-rspec rake rubygems bundler + * Python + * python-all python-all-dev python-all-dbg + * Perl + * libbit-vector-perl libclass-accessor-class-perl + * Php, install + * php5-dev php5-cli phpunit + * C_glib + * libglib2.0-dev + * Erlang + * erlang-base erlang-eunit erlang-dev rebar + * Csharp + * mono-gmcs mono-devel libmono-system-web2.0-cil nunit nunit-console + * Haskell + * ghc cabal-install libghc-binary-dev libghc-network-dev libghc-http-dev + * Thrift Compiler for Windows + * mingw-w64 mingw-w64-x86-64-dev nsis + * Rust + * rustc cargo + * Haxe + * haxe + * Lua + * lua5.3 liblua5.3-dev + * NodeJs + * nodejs npm + * dotnetcore + * https://www.microsoft.com/net/learn/get-started/linuxubuntu + * d-lang + * curl -fsS https://dlang.org/install.sh | bash -s dmd + * dart & pub + * https://www.dartlang.org/install/linux + * https://www.dartlang.org/tools/pub/installing + + +## Additional reading + +For more information on the requirements see: [Apache Thrift Requirements](/docs/install) + +For more information on building and installing Thrift see: [Building from source](/docs/BuildingFromSource) diff --git a/src/jaegertracing/thrift/doc/install/os_x.md b/src/jaegertracing/thrift/doc/install/os_x.md new file mode 100644 index 000000000..2d99ef4a3 --- /dev/null +++ b/src/jaegertracing/thrift/doc/install/os_x.md @@ -0,0 +1,27 @@ +## OS X Setup +The following command install all the required tools and libraries to build and install the Apache Thrift compiler on a OS X based system. + +### Install Boost +Download the boost library from [boost.org](http://www.boost.org) untar compile with + + ./bootstrap.sh + sudo ./b2 threading=multi address-model=64 variant=release stage install + +### Install libevent +Download [libevent](http://monkey.org/~provos/libevent), untar and compile with + + ./configure --prefix=/usr/local + make + sudo make install + +### Building Apache Thrift +Download the latest version of [Apache Thrift](/download), untar and compile with + + ./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local + +## Additional reading + +For more information on the requirements see: [Apache Thrift Requirements](/docs/install) + +For more information on building and installing Thrift see: [Building from source](/docs/BuildingFromSource) + diff --git a/src/jaegertracing/thrift/doc/install/windows.md b/src/jaegertracing/thrift/doc/install/windows.md new file mode 100644 index 000000000..8618934f8 --- /dev/null +++ b/src/jaegertracing/thrift/doc/install/windows.md @@ -0,0 +1,186 @@ +## Windows Setup + +The Thrift environment consists of two main parts: The Thrift compiler EXE and the language-dependent libraries. Most of these libraries will require some kind of build and/or installation. But regarding the Thrift compiler utility there are a number of different alternatives. + +The first one of these alternatives is to download the **pre-built Thrift Compiler EXE** and only build the libraries needed from source, following one of the "Setup from source" methods outlined below. + +The other two options are to build the Thrift compiler from source. The most recommended way to achieve this is by means of the **Visual Studio C++ build project**. Alternatively, the Thrift compiler can also be built via **Cygwin** or **MinGW** build environments, however this method is not only less comfortable, but more time-consuming and requires much more manual effort. + + +## Prebuilt Thrift compiler + +The windows Thrift compiler is available as a prebuilt exe available [here](/download). Note that there is no installation tool, rather this EXE file *is* already the Thrift compiler utility. Download the file and put it into some suitable location of your choice. + +Now pick one of the "Build and install target libraries" below to continue. + + +## Setup from source via Visual Studio C++ (recommended) + +### Requirements + +Thrift's compiler is written in C++ and designed to be portable, but there are some system requirements. Thrift's runtime libraries are written in various languages, which are also required for the particular language interface. + + * Visual Studio C++, any recent version should do + * Flex and Bison, e.g. the WinFlexBison package + * [Apache Thrift Requirements](/docs/install) + +### Build and install the compiler + +After all requirements are in place, use the `compiler/cpp/compiler.vcxproj` build project to build the Thrift compiler. Copy the resulting EXE file to a location of your choice. + +### Build and install target libraries + +A few of the target language libraries also do provide Visual Studio project files, such as C++ and C#. These are located in the `lib/<language>/` folders. + +Most of the language packages must be built and installed manually using build tools better suited to those languages. Typical examples are Java, Ruby, Delphi, or PHP. Look for the `README.md` file in the `lib/<language>/` folder for more details on how to build and install each language's library package. + + +## Setup from source via Cygwin + +### Requirements + +Thrift's compiler is written in C++ and designed to be portable, but there are some system requirements. Thrift's runtime libraries are written in various languages, which are also required for the particular language interface. + + * Cygwin or MinGW + * [Apache Thrift Requirements](/docs/install) + +### Installing from source + +If you are building from the first time out of the source repository, you will need to generate the configure scripts. (This is not necessary if you downloaded a tarball.) From the top directory, do: + + ./bootstrap.sh + +Once the configure scripts are generated, thrift can be configured. From the top directory, do: + + export CXXFLAGS="-D PTHREAD_MUTEX_RECURSIVE_NP=PTHREAD_MUTEX_RECURSIVE" + ./configure + +Setting the CXXFLAGS environmental variable works around compile errors with PTHREAD_MUTEX_RECURSIVE_NP being undeclared, by replacing it with the newer, portable PTHREAD_MUTEX_RECURSIVE. (Tested on cygwin 20100320, Thrift r760184, latest pthread.) + +**Optional:** You **may not** be able to make from the root Thrift directory due to errors (see below to resolve). To make the compiler only, change to the compiler directory before running make: + + cd compiler/cpp + +Now make the thrift compiler (& runtime libraries if make is run from the thrift root directory): + + make + make install + +### Build and install target libraries + +Some language packages must be installed manually using build tools better suited to those languages. Typical examples are Java, Ruby, or PHP. Look for the README file in the `lib/<language>/` folder for more details on the installation of each language library package. + +### Possible issues with Cygwin install + +See also Possible issues with MinGW install. + +#### Syntax error in ./configure + +The following error occurs for some users when running ./configure: + + ./configure: line 21183: syntax error near unexpected token `MONO,' + ./configure: line 21183: ` PKG_CHECK_MODULES(MONO, mono >= 1.2.6, have_mono=yes, have_mono=no)' + +To resolve this, you'll need to find your pkg.m4 (installed by the pkg-config package) file and copy it to the thrift/aclocal directory. From the top-level thrift directory, you can copy the file by running + + cp /usr/share/aclocal/pkg.m4 aclocal + +Finally, re-run ./bootstrap.sh and ./configure. (Note that pkg.m4 is created by the pkg-config tool. If your /usr/share/aclocal directory doesn't contain the pkg.m4 file, you may not have pkg-config installed.) + +#### Installing perl runtime libraries + +Sometimes, there will be an error during the install of the perl libraries with chmod. + +A workaround is to avoid installing the perl libraries if they are not needed. + +If you don't need perl, run configure with --without-perl. + +If you need perl, and are happy to manually install it, replace the contents of thrift/lib/perl/Makefile with the following, after building thrift: + + TODO + +#### Linking to installed C++ runtime libraries + +Sometimes, the installed libthrift.a will not link using g++, with linker errors about missing vtables and exceptions for Thrift classes. + +A workaround is to link the compiled object files directly from your Thrift build, corresponding to the missing classes. + +This can be implemented in a Makefile using the following lines: + + THRIFT_O=<path to>/thrift/lib/cpp + LTHRIFT=$(THRIFT_O)/Thrift.o $(THRIFT_O)/TSocket.o $(THRIFT_O)/TBinaryProtocol.o $(THRIFT_O)/TBufferTransports.o + +Then linking using $(LTHRIFT) instead of -lthrift. + + TODO - diagnose issue further + +#### C++ runtime segfault with cygwin 1.7.5-1, g++-4.3.4, fork() and throw + +If your thrift C++ programs segfault on throw after fork()ing, compile them with g++-3. + +The issue and patch are described on the Cygwin mailing list at http://cygwin.com/ml/cygwin/2010-05/msg00203.html + +This issue should be fixed in Cygwin versions after 1.7.5-1, or g++ 4.5.0. + +## Setup from source via MinGW + +### Requirements + +To compile the Thrift generator & runtime libraries (untested) without the cygwin.dll dependency you need to install MinGW (www.mingw.org). + + * MinGW + * [Apache Thrift Requirements](/docs/install) + +In addition you need to add the following entry to your windows PATH variable. + + C:\MINGW\BIN + +Next, open compiler/cpp/Makefile.am and add the following line to thrift_CXXFLAGS + + -DMINGW -mno-cygwin -lfl + +Run bootstrap.sh: + + ./bootstrap.sh + +Make sure you have java in your $PATH variable, if not do(adjust path if necessary): + + export PATH=$PATH:"/cygdrive/c/program files/java/jre1.8.0_191/bin" + +Run configure - using CXXFLAGS to work around an issue with an old pthreads define (untested on MinGW - works on Cygwin): + + export CXXFLAGS="-D PTHREAD_MUTEX_RECURSIVE_NP=PTHREAD_MUTEX_RECURSIVE" + ./configure + +''Optional:'' To make the compiler only, change to the compiler directory before running make: + + cd compiler/cpp + +Run make: + + mingw32-make.exe + +### Possible issues with MinGW install + +See also Possible issues with Cygwin install, including the discussion about PTHREAD_MUTEX_RECURSIVE_NP. + +#### yywrap is not found + +Make sure you add -lfl in your cxxflags in Makefile, also try adding -Lc:/cygwin/libs + +#### boost is not found + +Try and change the include dir to use the windows path from c like this: Edit compiler/cpp/Makefile, look for the declaration of BOOST_CPPFLAGS, change that line for + + BOOST_CPPFLAGS = -Ic:/cygwin/usr/include/boost-1_53_0 + +#### realpath is not found + +add -DMINGW -mno-cygwin to the CXXDEFS variable in Makefile + +## Additional reading + +For more information on the requirements see: [Apache Thrift Requirements](/docs/install) + +For more information on building and installing Thrift see: [Building from source](/docs/BuildingFromSource) + |