From 72687d725ac5a53ff71379f72b0eea0b3451b62b Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Fri, 28 Feb 2014 16:48:02 +0100 Subject: [PATCH] Portability issues, README.md improved with Ubuntu requirements to make easier the project building --- README.md | 53 +++++++++++++++++++++++++++++ SConstruct | 11 ++++-- include/anna/core/core.hpp | 8 ++--- source/core/tracing/TraceWriter.cpp | 2 +- source/dbms.oracle/BaseBind.cpp | 2 +- 5 files changed, 67 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index bb53bcf..840e9ac 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,56 @@ Execute 'scons install' Uninstall ========= Execute 'scons uninstall' + + + +Some basic ubuntu requirements +============================== +* Scons python-based building suite: + sudo apt-get install scons + +* OpenSSL: + sudo apt-get install libssl-dev + +* Gnome XML: + sudo apt-get install libxml2-dev + +* OpenLDAP: + sudo apt-get install libldap2-dev + +* MySql: + sudo apt-get install libmysqlclient-dev + +* Oracle: + https://help.ubuntu.com/community/Oracle%20Instant%20Client + Set 'ORACLE_HOME' environment variable in your profile, i.e.: + export ORACLE_HOME=/usr/lib/oracle/12.1/client64/ + + Be sure to create in that directory, a link to oracle includes, + for example: + + @:/usr/lib/oracle/12.1/client64$ ls -lrt + total 8 + drwxr-xr-x 2 root root 4096 Feb 28 15:59 bin + drwxr-xr-x 2 root root 4096 Feb 28 15:59 lib + lrwxrwxrwx 1 root root 33 Feb 28 16:07 include -> /usr/include/oracle/12.1/client64 + + The alternative is to edit SConstruct file directly to set + oracle includes directory. + +* Oracle-OpenLDAP conflict: + as usual, Oracle is doing things very bad. Move the ldap.h from oracle includes, i.e.: + + cd /usr/include/oracle/12.1/client64 + sudo mv ldap.h ldap.h.orig + +* Boost: + Although the more i use, the more i dislike, this suite is included (ambition to learn + new things...): + + sudo apt-get install libboost-dev + sudo apt-get install libboost-test-dev + + + + diff --git a/SConstruct b/SConstruct index d811f34..14f7f15 100644 --- a/SConstruct +++ b/SConstruct @@ -17,10 +17,15 @@ target_opt_bin = os.path.join (opt_bin, "anna") # Versioning release = ARGUMENTS.get ('release', 0) +# Environment +env = Environment () +oracle_includes = os.environ['ORACLE_HOME'] + "/include" + # Headers source_include = os.path.join (current_directory, "include") usr_include = [ - "/usr/include/oracle/11.2/client", + #"/usr/include/oracle/12.1/client64", + oracle_includes, "/usr/include/libxml2", #"/usr/include/boost", #"/usr/include/mysql", @@ -31,12 +36,12 @@ usr_include = [ libraries = [] # Environment -env = Environment () +#env = Environment () # CPPPATH will be relative to src/ env.Append (CPPPATH = [source_include, usr_local_include, usr_include ]) env.Append (CCFLAGS = '-std=c++0x') # C++11 support: -env.Append (CXXFLAGS = '-std=c++11') +#env.Append (CXXFLAGS = '-std=c++11') env.Append (LIBS = ['']) # scons -Q release=1 diff --git a/include/anna/core/core.hpp b/include/anna/core/core.hpp index 6e76863..06b3929 100644 --- a/include/anna/core/core.hpp +++ b/include/anna/core/core.hpp @@ -38,10 +38,10 @@ #define anna_core_core_hpp /** -Proporciona las clases y patrones de desarrollo básico, que podrían ser utilizados por cualquier -aplicación y/o plataforma. +Proporciona las clases y patrones de desarrollo b�sico, que podr�an ser utilizados por cualquier +aplicaci�n y/o plataforma. -El ejecutable deberá enlazarse con la librería: libanna.core.a +El ejecutable deber� enlazarse con la librer�a: libanna.core.a El Packet Header es anna.h @@ -54,7 +54,7 @@ namespace anna {} #include #include #include -#include +#include #include #include #include diff --git a/source/core/tracing/TraceWriter.cpp b/source/core/tracing/TraceWriter.cpp index a79c498..2271544 100644 --- a/source/core/tracing/TraceWriter.cpp +++ b/source/core/tracing/TraceWriter.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include using namespace std; diff --git a/source/dbms.oracle/BaseBind.cpp b/source/dbms.oracle/BaseBind.cpp index d660c7c..d81781a 100644 --- a/source/dbms.oracle/BaseBind.cpp +++ b/source/dbms.oracle/BaseBind.cpp @@ -78,7 +78,7 @@ dbms::oracle::BaseBind::~BaseBind() { // (1) Aunque sea un objeto de tipo Date lo define/trata como un tipo TimeStamp, porque de otro modo no se grabaria la // informacion referente a la hora. // (2) El Float hasta ahora se trataba como un tipo especial de cadena, pero no es un tratamiento indicado -// para todos los gestores de base de datos, así que vamos a resumir en estas clases todos los detalles de +// para todos los gestores de base de datos, as� que vamos a resumir en estas clases todos los detalles de // tratamiento. // dbms::oracle::BaseBind::oci_param dbms::oracle::BaseBind::getOCIParam(dbms::oracle::Database& database, dbms::oracle::Connection* connection, dbms::Data& data) -- 2.20.1