You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2022/07/19 06:31:36 UTC

[ignite] branch master updated: IGNITE-17388 Clarifications for examples/README.txt (#10164)

This is an automated email from the ASF dual-hosted git repository.

isapego pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 310cd119773 IGNITE-17388 Clarifications for examples/README.txt (#10164)
310cd119773 is described below

commit 310cd119773f72413447eb966e7cc935125781f6
Author: Igor Sapego <is...@apache.org>
AuthorDate: Tue Jul 19 09:31:27 2022 +0300

    IGNITE-17388 Clarifications for examples/README.txt (#10164)
---
 modules/platforms/cpp/DEVNOTES.txt        | 27 +++++++++++++++++++++------
 modules/platforms/cpp/examples/README.txt | 28 +++++++++++++++++++++++-----
 2 files changed, 44 insertions(+), 11 deletions(-)

diff --git a/modules/platforms/cpp/DEVNOTES.txt b/modules/platforms/cpp/DEVNOTES.txt
index 2cdf4b3a300..13c10ec8b3c 100644
--- a/modules/platforms/cpp/DEVNOTES.txt
+++ b/modules/platforms/cpp/DEVNOTES.txt
@@ -38,9 +38,8 @@ ODBC module is disabled by default, you can enable it by setting CMake option -D
 OPENSSL_ROOT_DIR environment variable must be set to openssl installation directory on Windows, on other platforms
 it is required if you want to use non-system openssl.
 
-Building and installing the Apache Ignite C++ components:
- * Navigate to the directory $IGNITE_HOME/platforms/cpp
- * Execute the following commands one by one to build the project:
+To build the Apache Ignite C++ components the following steps and command line commands should be executed one by one:
+ * cd $IGNITE_HOME/platforms/cpp
  * mkdir cmake-build-[release|debug]
  * cd ./cmake-build-[release|debug]
  * run CMake configuration:
@@ -53,7 +52,22 @@ Building and installing the Apache Ignite C++ components:
 
     CMake by default generate on Windows Visual Studio projects. You can find generated projects in CMake
     build directory (./cmake-build-[release|debug]) and open Ignite.C++.sln in Visual Studio.
- * cmake --build . --target install --config [Release|Debug]
+
+    CMAKE_INSTALL_PREFIX option should only be used if you want to install Ignite in non-default directory. This option
+    will only be used later during installation step, so you may safely ignore it if you are not planning on installing
+    Ignite or if you are OK with the default installation directory.
+
+ * Build Ignite C++ using following command:
+   cmake --build . --config [Release|Debug]
+
+   Note, that installing Ignite in default installation directory will most probably require a super-user privileges,
+   so if you don't have them or don't want to install Ignite C++ using them you should make sure you have set your
+   CMAKE_INSTALL_PREFIX option appropriately in the previous step.
+
+ * Install Ignite C++ using following command:
+   cmake --build . --target install --config [Release|Debug]
+
+   This step is optional, but it is required to build and run examples as they can only find installed Ignite C++.
 
 Testing:
  Tests are disabled by default, you can enable them by setting CMake option -DWITH_TESTS=ON.
@@ -103,6 +117,7 @@ Building with QT Creator (tm):
 ------------------------------
  * File -> Open file or project -> and choose from ($IGNITE_HOME/modules/platforms) CMakeLists.txt
  * If you have no $JAVA_HOME env variable, you need to append it.
- * Additionally for odbc-test or thin-client-test you need to append IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH and set it 
-   $IGNITE_HOME/modules/platforms/cpp/thin-client-test/config for thin-client-test and $IGNITE_HOME/modules/platforms/cpp/odbc-test/config for odbc-test
+ * Additionally for odbc-test or thin-client-test you need to set following environment variables:
+   IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH=$IGNITE_HOME/modules/platforms/cpp/thin-client-test/config for thin-client-test
+   IGNITE_NATIVE_TEST_ODBC_CONFIG_PATH=$IGNITE_HOME/modules/platforms/cpp/odbc-test/config for odbc-test
  * Command line arguments for tests running need to have this additional lines : --catch_system_errors=no --log_level=all
diff --git a/modules/platforms/cpp/examples/README.txt b/modules/platforms/cpp/examples/README.txt
index 4ac8d863821..3b85844e3ff 100644
--- a/modules/platforms/cpp/examples/README.txt
+++ b/modules/platforms/cpp/examples/README.txt
@@ -25,16 +25,23 @@ Prerequisites:
    * Visual Studio 2010 or later
    * Windows SDK 7.1 or later
  * CMake >= 3.6 must be installed
- * Apache Ignite C++ should be installed. Refer to $IGNITE_HOME/platforms/cpp/DEVNOTES.txt for instructions.
+ * IMPORTANT: Apache Ignite C++ should be installed. Refer to $IGNITE_HOME/platforms/cpp/DEVNOTES.txt for instructions.
 
-To build examples execute the following commands one by one from examples root directory:
+To build examples execute the following commands one by one:
+ * cd $IGNITE_HOME/platforms/cpp/examples
  * mkdir cmake-build-[debug|release]
  * cd ./cmake-build-[debug|release]
  * run CMake configuration:
   * on Linux or Mac OS X:
      cmake .. -DCMAKE_BUILD_TYPE=[Release|Debug] [-DIGNITE_CPP_DIR=<ignite_install_dir>]
   * on Windows:
-     cmake .. -DCMAKE_GENERATOR_PLATFORM=[Win32|x64] [-DIGNITE_CPP_DIR=<ignite_install_dir>]
+     cmake .. -DCMAKE_GENERATOR_PLATFORM=[Win32|x64] -DIGNITE_CPP_DIR=<ignite_install_dir>
+
+    IMPORTANT: Ignite C++ should be built and installed for this command to work correctly. If you have installed
+    Ignite C++ in non-default directory or getting "IGNITE_INCLUDE_DIR-NOTFOUND" errors while executing this command,
+    you should make sure you've set IGNITE_CPP_DIR option correctly, pointing to the installation directory of
+    Ignite C++ (it should be the same path that was used in CMAKE_INSTALL_PREFIX during Ignite C++ installation)
+
  * cmake --build . --config [Release|Debug]
 
 CMake by default generate on Windows Visual Studio projects. You can find generated projects in CMake
@@ -43,9 +50,20 @@ build directory (./cmake-build-[release|debug]) and open examples.sln in Visual
 If Apache Ignite C++ is installed in default directories (i.e. /usr/local or /usr), setting IGNITE_CPP_DIR property
 is not necessary. As a result executables will be in corresponding subdirectories in cmake-build-release directory.
 
-For odbc-example additionaly ODBC Driver Manager must be present and installed on your platform and
-Apache Ignite ODBC driver must be built and installed according to instructions for your platform.
+Running examples.
+----------------------------------
 
+Before running examples ensure that:
+ * Ignite library binaries (<ignite_install_dir>/bin or <ignite_install_dir>/lib) are added to $PATH
+   (Windows and Linux) or $LD_LIBRARY_PATH (Linux only). This is especially important for Windows, as in Linux systems
+   installation path is ordinary pointed by $PATH by default;
+ * $JAVA_HOME is set to point to a valid JDK installation;
+ * $PATH or $LD_LIBRARY_PATH environment variables are set and pointing to a directory with libjvm library. In Linux
+   this  library is usually located in $JAVA_HOME/jre/lib/amd64/server directory, while in Windows it is most probably
+   in $JAVA_HOME/jre/bin/amd64/server;
+ * For odbc-example additionally ODBC Driver Manager must be present and installed on your platform. This is concerns
+   Linux systems as Windows always have system ODBC Driver Manager present by default;
+ * For odbc-example Ignite ODBC driver must be built and installed according to instructions for your platform.
 
 Importing CMake projects to Visual Studio (tm) (since 2015):
 ------------------------------------------------------------