From 6b4a7d365f69cb23b39ed87d88d36d1b7107d8fd Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:43:42 -0700 Subject: [PATCH 1/6] update build guide with extra info for GnuTLS --- BUILD.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 6464f14d08..7e35c9569b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -5,6 +5,8 @@ Dependencies * [zLib](http://www.zlib.net/) ~> 1.2.8 * [glm](http://glm.g-truc.net/0.9.5/index.html) ~> 0.9.5.2 * [qxmpp](https://code.google.com/p/qxmpp/) ~> 0.7.6 +* [GnuTLS](http://gnutls.org/download.html) ~> 3.2.12 + * IMPORTANT: GnuTLS 3.2.12 is crtiical to avoid a security vulnerability. #####Linux only * [freeglut](http://freeglut.sourceforge.net/) ~> 2.8.0 @@ -50,12 +52,18 @@ Should you choose not to install Qt5 via a package manager that handles dependen libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-dev +#####GnuTLS + +If `libgnutls28-dev` 3.2.12 or higher is available via your package manager, it would be easiest to grab it from there. At the time of this writing that is not the case for any version of Ubuntu, so it will need to be built from source. + +gmplib is a dependency for GnuTLS. On Ubuntu, we were unable to build hogweed (part of libnettle) with gmp 6.x.x. If nettle is not built with hogweed, GnuTLS will fail to build. If you run into this problem, try version 4.2.1 of gmplib. + ####OS X #####Package Managers [Homebrew](http://brew.sh/) is an excellent package manager for OS X. It makes install of all hifi dependencies very simple. brew tap highfidelity/homebrew-formulas - brew install cmake glm zlib + brew install cmake glm zlib gnutls brew install highfidelity/formulas/qt5 brew link qt5 --force brew install highfidelity/formulas/qxmpp @@ -128,6 +136,15 @@ For many of the external libraries where precompiled binaries are readily availa *NOTE: Qt does not support 64-bit builds on Windows 7, so you must use the 32-bit version of libraries for interface.exe to run. The 32-bit version of the static library is the one linked by our CMake find modules* +#####GnuTLS +You can get a precompiled version of GnuTLS for Windows [here](ftp://ftp.gnutls.org/gcrypt/gnutls/w32/). + +To use GnuTLS with Visual Studio, you will need to create `libgnutls-28.lib`, the import library for Visual Studio projects. this is done using the `lib` command in the `bin` folder of your GnuTLS download. + + $GNUTLS_DIR\bin> lib /def:libgnutls-28.def + +This will create `libgnutls-28.lib`. Copy that file to the `lib` folder of you GnuTLS folder, and the Cmake FindGnuTLS module in this repo will find it during the Cmake run. As will other external dependencies for this project, the associated GnuTLS DLL will need to be in your path. + #### DLLs As with the Qt libraries, you will need to make sure the directory containing dynamically-linked libraries is in your path. For example, for a dynamically linked build of freeglut, the directory to add to your path in which the DLL is found is `FREEGLUT_DIR/bin`. Where possible, you can use static builds of the external dependencies to avoid this requirement. From 007a477400705af7a0ad71ec09a1b203c31c5ba0 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:46:42 -0700 Subject: [PATCH 2/6] fix a typo in build guide --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 7e35c9569b..e29c20b6d2 100644 --- a/BUILD.md +++ b/BUILD.md @@ -6,7 +6,7 @@ Dependencies * [glm](http://glm.g-truc.net/0.9.5/index.html) ~> 0.9.5.2 * [qxmpp](https://code.google.com/p/qxmpp/) ~> 0.7.6 * [GnuTLS](http://gnutls.org/download.html) ~> 3.2.12 - * IMPORTANT: GnuTLS 3.2.12 is crtiical to avoid a security vulnerability. + * IMPORTANT: GnuTLS 3.2.12 is critical to avoid a security vulnerability. #####Linux only * [freeglut](http://freeglut.sourceforge.net/) ~> 2.8.0 From 6cb5497242e3714fdbf271713be752693d87260e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:49:11 -0700 Subject: [PATCH 3/6] codify some library names and fix some other spelling --- BUILD.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.md b/BUILD.md index e29c20b6d2..265e21e031 100644 --- a/BUILD.md +++ b/BUILD.md @@ -56,7 +56,7 @@ Should you choose not to install Qt5 via a package manager that handles dependen If `libgnutls28-dev` 3.2.12 or higher is available via your package manager, it would be easiest to grab it from there. At the time of this writing that is not the case for any version of Ubuntu, so it will need to be built from source. -gmplib is a dependency for GnuTLS. On Ubuntu, we were unable to build hogweed (part of libnettle) with gmp 6.x.x. If nettle is not built with hogweed, GnuTLS will fail to build. If you run into this problem, try version 4.2.1 of gmplib. +`gmplib` is a dependency for GnuTLS. On Ubuntu, we were unable to build `hogweed` (part of `libnettle`) with `gmpib` 6.x.x. If nettle is not built with `hogweed`, GnuTLS will fail to build. If you run into this problem, try version 4.2.1 of `gmplib`. ####OS X #####Package Managers @@ -143,7 +143,7 @@ To use GnuTLS with Visual Studio, you will need to create `libgnutls-28.lib`, th $GNUTLS_DIR\bin> lib /def:libgnutls-28.def -This will create `libgnutls-28.lib`. Copy that file to the `lib` folder of you GnuTLS folder, and the Cmake FindGnuTLS module in this repo will find it during the Cmake run. As will other external dependencies for this project, the associated GnuTLS DLL will need to be in your path. +This will create `libgnutls-28.lib` in the `bin` folder. Copy that file to the `lib` sub-folder of your GnuTLS folder, and the Cmake FindGnuTLS module in this repo will find it during the Cmake run. As with other external dependencies for this project, the associated GnuTLS DLL will need to be in your path. #### DLLs As with the Qt libraries, you will need to make sure the directory containing dynamically-linked libraries is in your path. For example, for a dynamically linked build of freeglut, the directory to add to your path in which the DLL is found is `FREEGLUT_DIR/bin`. Where possible, you can use static builds of the external dependencies to avoid this requirement. From 1c7f8c87bcf9e9b1bb625025046489bc713cf384 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:50:03 -0700 Subject: [PATCH 4/6] don't codify directories in OS X section --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 265e21e031..d6ec7c82b1 100644 --- a/BUILD.md +++ b/BUILD.md @@ -79,7 +79,7 @@ If Xcode is your editor of choice, you can ask CMake to generate Xcode project f After running cmake, you will have the make files or Xcode project file necessary to build all of the components. Open the hifi.xcodeproj file, choose ALL_BUILD from the Product > Scheme menu (or target drop down), and click Run. -If the build completes successfully, you will have built targets for all components located in the `build/${target_name}/Debug directories`. +If the build completes successfully, you will have built targets for all components located in the `build/${target_name}/Debug` directories. Windows === From 95abc74d83294039f9b3c3c4d6a3ea52fe8eb095 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:50:57 -0700 Subject: [PATCH 5/6] add GnuTLS to example windows folder structure --- BUILD.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BUILD.md b/BUILD.md index d6ec7c82b1..24618ff7ac 100644 --- a/BUILD.md +++ b/BUILD.md @@ -129,6 +129,10 @@ The recommended route for CMake to find external dependencies is to place all of -> qxmpp -> include -> lib + -> gnutls + -> bin + -> include + -> lib *NOTE: Be careful with glm. For the folder other libraries would normally call 'include', the folder containing the headers, glm opts to use 'glm'. You will have a glm folder nested inside the top-level glm folder.* From 70191111c737cca0adecbab9682e61b577b5d99b Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Apr 2014 10:51:36 -0700 Subject: [PATCH 6/6] remove GnuTLS DLL tip since DLL section is right below --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 24618ff7ac..f789437d60 100644 --- a/BUILD.md +++ b/BUILD.md @@ -147,7 +147,7 @@ To use GnuTLS with Visual Studio, you will need to create `libgnutls-28.lib`, th $GNUTLS_DIR\bin> lib /def:libgnutls-28.def -This will create `libgnutls-28.lib` in the `bin` folder. Copy that file to the `lib` sub-folder of your GnuTLS folder, and the Cmake FindGnuTLS module in this repo will find it during the Cmake run. As with other external dependencies for this project, the associated GnuTLS DLL will need to be in your path. +This will create `libgnutls-28.lib` in the `bin` folder. Copy that file to the `lib` sub-folder of your GnuTLS folder, and the Cmake FindGnuTLS module in this repo will find it during the Cmake run. #### DLLs As with the Qt libraries, you will need to make sure the directory containing dynamically-linked libraries is in your path. For example, for a dynamically linked build of freeglut, the directory to add to your path in which the DLL is found is `FREEGLUT_DIR/bin`. Where possible, you can use static builds of the external dependencies to avoid this requirement.