On 30 March 2013 07:05, Andrea Formica <[email protected]> wrote: > Dear all, I had a problem trying to compile soci on Macosx Lion using cmake, > and activating the oracle backend following the instructions > provided in the documentation. > I would like to understand if it is only that documentation is not clear > enough (for cmake beginners) or if it could be a bug in the cmake scripts. > > The problem was related to the path of oracle libraries. I do not know > exactly what was wrong, but basically cmake did not recognize > my command line options, when I was trying to set the path to includes and > libs. > > I have ORACLE_HOME defined in my environment. > > Then I try to do > > cmake -DWITH_ORACLE=ON > -DORACLE_INCLUDE_DIR=/Users/formica/MyApp/Library/oracle/instantclient_10_2/sdk/include > -DORACLE_LIBRARIES=/Users/formica/MyApp/Library/oracle/instantclient_10_2 > > This results in libraries not being found. > > Looking inside the cmake/modules/FindOracle.cmake file, I saw that there is > a sort of "automatic" discovery for libraries when the ORACLE_HOME is set. > Unfortunately, the automatic discovery fails for libraries (it works though > for includes)....here is the set of instructions that was causing a problem, > which is the part trying to find includes and libs. > > set(ORACLE_OCI_NAMES clntsh libclntsh oci) > set(ORACLE_NNZ_NAMES nnz10 libnnz10 nnz11 libnnz11 ociw32) > set(ORACLE_OCCI_NAMES libocci occi oraocci10 oraocci11) > > set(ORACLE_LIB_DIR > ${ORACLE_HOME} ===========>>>>> This line was missing !! > ${ORACLE_HOME}/lib > ${ORACLE_HOME}/OCI/lib/MSVC) # Oracle XE on Windows
Yes, this was known issue on OSX and reported by MacPorts maintainers https://github.com/SOCI/soci/issues/89 I applied their patch: https://github.com/SOCI/soci/commit/1c2abaf2c6cbea3fcd020c74d04df07522165fcd So, it has been released with SOCI 3.2.0 recently. > I'm not claiming that this is a "bug" in the installation procedure, but for > a "beginner" of cmake (like me ;-) ) it means that at least the installation > instructions > are not so clear, because it looks that the options for the library path > that the user can provide are in reality ignored when ORACLE_HOME is set. > Is there something else I should have done instead of hacking the cmake > script ? > Is there a problem with the location of the instant client that I have been > using ? The problem was with FindOracle.cmake as mentioned above. This module has been developed based on trial and error as it is not obvious how to cover all combinations of systems and InstantClient versions. So, we rely on reports from package maintainers like the one linked above and from users as yourself. Thanks! Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ------------------------------------------------------------------------------ Own the Future-Intel(R) Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 _______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
