http://www.buymodafinil-online.com/
 

Building Apache Ignite C++ – Ubuntu

Below are the instructions to build Apache Ignite C++ core library and stand-alone node binary in Ubuntu. To build examples you need to build and install core Apache IGNITE_HOME is the home directory where the source zip file is extracted. Ignite library then refer to $IGNITE_HOME/platforms/cpp/example/README.txt for further instructions.
For details on ODBC driver installation and usage please refer to
$IGNITE_HOME/platforms/cpp/odbc/README.txt.

Building on Linux With Autotools

Common Requirements:
  • GCC, g++, autotools, automake, and libtool must be installed
  • Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
  • JAVA_HOME environment variable must be set pointing to Java installation directory.
  • IGNITE_HOME environment variable must be set to Ignite installation directory.
  • To build ODBC driver you need to install ODBC Driver Manager on you system. Apache Ignite has been tested with UnixODBC. Make sure that you install development version of the driver manager which contains header files that are necessary for building a driver.
Building the Apache Ignite C++ components:
  • Navigate to the directory $IGNITE_HOME/platforms/cpp
  • Execute the following commands one by one to build the project:
    1. ibtoolize && aclocal && autoheader && automake –add-missing && autoreconf
    2. ./configure
    3. make
Among standard included by autotools options configure script also include following Ignite-specific options :
  • –enable-odbc – build included ODBC driver. Disabled by default.
  • –enable-core – build Ignite core library. Enabled by default.
  • –enable-node – build stand-alone node executable. Enabled by default.
If you only need to build ODBC driver and do not want to build anything else you may justuse configure script with the following arguments:
  • ./configure –enable-odbc –disable-core –disable-node
With the config like that you should not have any ignite dependencies as jvm.dll installed to build ODBC driver.
NOTE: You may want to use “make install” command to install Ignite libraries and headers for your operation system. Note however that this action may require superuser privileges.

Installation

Here is the quick summary on installation of Apache Ignite:
  • Download Apache Ignite as ZIP archive from https://ignite.apache.org/
  • Unzip ZIP archive into the installation folder in your system
  • Set IGNITE_HOME environment variable to point to the installation folder and make sure there is no trailing / in the path (this step is optional)

Building for CPP ::

Dependencies
sudo apt-get install openjdk*
sudo apt-get install odbc*
sudo apt-get install unixodbc-dev
sudo apt-get install libssl-dev
cd $IGNITE_HOME/platforms/cpp
libtoolize && aclocal && autoheader && automake --add-missing && autoreconf
export LDFLAGS=-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
export CPPFLAGS=-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
export CXXFLAGS=-I/usr/lib/jvm/java-8-openjdk-amd64/include
(or)
./configure --includedir=DIR --libdir=DIR
Example : 
./configure --enable-odbc --includedir=/usr/lib/jvm/java-8-openjdk-amd64/include/linux --includedir=/usr/lib/jvm/java-8-openjdk-amd64/include --libdir=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
make
Output :
  CXXLD	libignite.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core'
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core'
Making all in ignite
make[2]: Entering directory '$(IGNITE_HOME)/platforms/cpp/ignite'
  CXX  	src/ignite.o
  CXXLD	ignite
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/ignite'
make[2]: Entering directory '$(IGNITE_HOME)/platforms/cpp'
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp'
make[1]: Leaving directory '$(IGNITE_HOME)/platforms/cpp'
sudo make install will install ignite libraries
/bin/mkdir -p '/usr/lib/jvm/java-8-openjdk-amd64/include/ignite/impl/binary'
 /usr/bin/install -c -m 644  ignite/impl/binary/binary_type_updater_impl.h '/usr/lib/jvm/java-8-openjdk-amd64/include/ignite/impl/binary'
 /bin/mkdir -p '/usr/lib/jvm/java-8-openjdk-amd64/include/ignite/cache'
 /usr/bin/install -c -m 644  ignite/cache/cache.h ignite/cache/cache_entry.h ignite/cache/cache_entry_processor.h ignite/cache/cache_peek_mode.h ignite/cache/mutable_cache_entry.h '/usr/lib/jvm/java-8-openjdk-amd64/include/ignite/cache'
make[3]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core/include'
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core/include'
make[2]: Entering directory '$(IGNITE_HOME)/platforms/cpp/core'
make[3]: Entering directory '$(IGNITE_HOME)/platforms/cpp/core'
 /bin/mkdir -p '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libignite.la '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server'
libtool: warning: relinking 'libignite.la'
libtool: install: (cd $(IGNITE_HOME)/platforms/cpp/core; /bin/bash "$(IGNITE_HOME)/platforms/cpp/libtool"  --silent --tag CXX --mode=relink g++ -Wall -std=c++03 -I/usr/lib/jvm/java-8-openjdk-amd64/include -no-undefined -ldl -version-info 0:0:0 -release 2.6.0.30134 -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -o libignite.la -rpath /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server src/ignite.lo src/ignition.lo src/impl/ignite_environment.lo src/impl/binary/binary_type_updater_impl.lo src/impl/handle_registry.lo src/impl/cache/query/continuous/continuous_query_handle_impl.lo src/impl/cache/query/query_impl.lo src/impl/cache/cache_impl.lo src/impl/cache/query/query_batch.lo src/impl/interop/interop_external_memory.lo src/impl/interop/interop_target.lo src/impl/transactions/transaction_impl.lo 
src/impl/transactions/transactions_impl.lo src/impl/cluster/cluster_group_impl.lo src/impl/compute/cancelable_impl.lo src/impl/compute/compute_impl.lo src/impl/ignite_impl.lo src/impl/ignite_binding_impl.lo src/transactions/transaction.lo src/transactions/transactions.lo ../jni/libignite-jni.la ../binary/libignite-binary.la )
libtool: install: /usr/bin/install -c .libs/libignite-2.6.0.30134.so.0.0.0T /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libignite-2.6.0.30134.so.0.0.0
libtool: install: (cd /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server && { ln -s -f libignite-2.6.0.30134.so.0.0.0 libignite-2.6.0.30134.so.0 || { rm -f libignite-2.6.0.30134.so.0 && ln -s libignite-2.6.0.30134.so.0.0.0 libignite-2.6.0.30134.so.0; }; })
libtool: install: (cd /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server && { ln -s -f libignite-2.6.0.30134.so.0.0.0 libignite.so || { rm -f libignite.so && ln -s libignite-2.6.0.30134.so.0.0.0 libignite.so; }; })
libtool: install: /usr/bin/install -c .libs/libignite.lai /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libignite.la
libtool: install: /usr/bin/install -c .libs/libignite.a /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libignite.a
libtool: install: chmod 644 /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libignite.a
libtool: install: ranlib /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libignite.a
libtool: finish: PATH="/home/euclid/google-cloud-sdk/bin:/home/euclid/bin:/home/euclid/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/euclid/emsdk/emscripten/1.38.14:/home/euclid/wasm/wabt/bin:/usr/lib/jvm/java-8-openjdk-amd64/include:/sbin" ldconfig -n /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
 	during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
 	during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/pkgconfig'
 /usr/bin/install -c -m 644 ./ignite.pc '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/pkgconfig'
make[3]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core'
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core'
make[1]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/core'
Making install in ignite
make[1]: Entering directory '$(IGNITE_HOME)/platforms/cpp/ignite'
make[2]: Entering directory '$(IGNITE_HOME)/platforms/cpp/ignite'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/ignite'
make[1]: Leaving directory '$(IGNITE_HOME)/platforms/cpp/ignite'
make[1]: Entering directory '$(IGNITE_HOME)/platforms/cpp'
make[2]: Entering directory '$(IGNITE_HOME)/platforms/cpp'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '$(IGNITE_HOME)/platforms/cpp'
make[1]: Leaving directory '$(IGNITE_HOME)/platforms/cpp'

Apache Ignite C++ Examples

Common requirements

  • Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
  • JAVA_HOME environment variable must be set pointing to Java installation directory.
  • IGNITE_HOME environment variable must be set to Ignite installation directory.
  • Ignite must be built and packaged using Maven. You can use the following Maven command: mvn clean package -DskipTests
  • Apache Ignite C++ must be built according to instructions for your platform. Refer to $IGNITE_HOME/platforms/cpp/DEVNOTES.txt for instructions.
  • For odbc-example additionally 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. Refer to

    • $IGNITE_HOME/platforms/cpp/DEVNOTES.txt for build instructions
    • $IGNITE_HOME/platforms/cpp/odbc/README.txt. for installation instructions.

Running examples on Linux

Prerequisites:

  • GCC, g++, autotools, automake, and libtool must be installed.
To build examples execute the following commands one by one from examples root directory:
  • libtoolize && aclocal && autoheader && automake –add-missing && autoreconf
  • ./configure
  • make
As a result executables will appear in every example’s directory.
Before running examples ensure that:
  • LD_LIBRARY_PATH environment variable is set and pointing to a directory with “libjvm.so” library. Typically this library is located in $JAVA_HOME/jre/lib/amd64/server 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.
  • For odbc-example make sure that path to Ignite libraries is added to LD_LIBRARY_PATH (usually it is /usr/local/lib).
  • Make sure below is added to the /etc/odbcinst.ini
    [Apache Ignite]
    Description=Apache Ignite
    Driver=/usr/local/lib/libignite-odbc.so
    Setup=/usr/local/lib/libignite-odbc.so
    DriverODBCVer=03.00
    FileUsage=0
    UsageCount=3
    

Building Examples :

ibtoolize && aclocal && autoheader && automake --add-missing && autoreconf
export IGNITE_HOME=/home/euclid/ignite
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
export LDFLAGS=-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
export CPPFLAGS=-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
export CXXFLAGS=-I/usr/lib/jvm/java-8-openjdk-amd64/include
./configure --includedir=/usr/lib/jvm/java-8-openjdk-amd64/include/linux --includedir=/usr/lib/jvm/java-8-openjdk-amd64/include --libdir=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
make all

 

Related Posts

Leave a Comment

Comment moderation is enabled. Your comment may take some time to appear.