----- Original Message ----
> From: Sébastien Taylor <[email protected]>
> To: General-purpose list for SOCI users. <[email protected]>
> Sent: Thu, July 7, 2011 4:25:07 PM
> Subject: Re: [SOCI-users] Test Failures on RHEL5 (was Re: Questions)
>
> The libraries variable wants the actual library not the path to the
> libraries, if you point it directly to the oracle lib it should find
> it.
>
Hi,
That's a little bizarre but it moves me along, so thanks (by the way my
postgresql problem was missing the postgresql-devel RPM. Oops.)
Given that the default install location of the oracle RPMs places the include
and libraries in /usr/include/oracle and /usr/lib/oracle
I think soci/src/cmake/modules/FindOracle.cmake should work harder and not
really just on ORACLE_HOME.
Its not obvious what libraries are wanted and where it is looking for them. To
my mind it makes more sense to set a library directory
than a list of libraries if you have to specify manually. Of course you should
not have to set it manually.
Having persuaded cmake I have Oracle, however, something is still not right. It
is not linking to the oracle libraries.
In fact it seems to be using the library path for mysql. I wonder if my manual
setting of ORACLELIBS has confused it.
Regards,
Bruce.
ORACLELIBS=/usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so:/usr/lib/oracle/10.2.0.4/client/lib/libheteroxa10.so:/usr/lib/oracle/10.2.0.4/client/lib/libnnz10.so:/usr/lib/oracle/10.2.0.4/client/lib/libocci.so:/usr/lib/oracle/10.2.0.4/client/lib/libociei.so:/usr/lib/oracle/10.2.0.4/client/lib/libocijdbc10.so:/usr/lib/oracle/10.2.0.4/client/lib/libsqlplusic.so:/usr/lib/oracle/10.2.0.4/client/lib/libsqlplus.so
cmake --debug -DPOSTGRESQL_VERSION:=8.1.23 -DSOCI_POSTGRESQL:=ON
-DSOCI_ORACLE:=ON -DORACLE_INCLUDE_DIR:=/usr/include/oracle/10.2.0.4/client
-DORACLE_LIBRARIES:=$ORACLELIBS .
make[2]: Entering directory `/home/brucea/download/soci/src'
Linking CXX executable ../../../bin/soci_oracle_test
cd /home/brucea/download/soci/src/backends/oracle/test && /usr/local/bin/cmake
-E cmake_link_script CMakeFiles/soci_oracle_test.dir/link.txt --verbose=1
/usr/lib/ccache/c++ -fPIC -pedantic -ansi -Wall -Wpointer-arith -Wcast-align
-Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long -std=c++98 -fPIC
CMakeFiles/soci_oracle_test.dir/test-oracle.cpp.o -o
../../../bin/soci_oracle_test -rdynamic -L/usr/lib/mysql
../../../lib/libsoci_core.so.3.1.0 ../../../lib/libsoci_oracle.so.3.1.0
../../../lib/libsoci_core.so.3.1.0 -lpthread -ldl
-Wl,-rpath,/usr/lib/mysql:/home/brucea/download/soci/src/lib
CMakeFiles/soci_oracle_test.dir/test-oracle.cpp.o: In function `test3()':
test-oracle.cpp:(.text+0x8a3f): undefined reference to `OCILobDisableBuffering'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIAttrSet'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIEnvCreate'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to
`OCIDescriptorAlloc'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCILobWrite'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCISessionEnd'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCILobTrim'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIHandleAlloc'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCISessionBegin'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIStmtFetch'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIStmtPrepare'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIErrorGet'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIParamGet'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIBindByName'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCILobWriteAppend'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCITransCommit'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCITransRollback'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIAttrGet'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIBindByPos'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIDescriptorFree'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIStmtExecute'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIHandleFree'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIServerDetach'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIDefineByPos'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCIServerAttach'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCILobRead'
../../../lib/libsoci_oracle.so.3.1.0: undefined reference to `OCILobGetLength'
collect2: ld returned 1 exit status
make[2]: *** [bin/soci_oracle_test] Error 1
make[2]: Leaving directory `/home/brucea/download/soci/src'
make[1]: *** [backends/oracle/test/CMakeFiles/soci_oracle_test.dir/all] Error 2
make[1]: Leaving directory `/home/brucea/download/soci/src'
make: *** [all] Error 2
If I manually add "-L/usr/lib/oracle/10.2.0.4/client/lib -lclntsh" to the two
failing command lines all is well.
(The Makefiles produced by cmake are not easy to grok).
Having allegedly built soci successfully. The oracle and postgresql tests fail.
Start processing tests
Test project /home/brucea/download/soci/src
1/ 14 Testing soci_empty_test Passed
2/ 14 Testing soci_empty_test_static Passed
3/ 14 Testing soci_mysql_test ***Failed
4/ 14 Testing soci_mysql_test_static ***Failed
5/ 14 Testing soci_odbc_test_access ***Failed
6/ 14 Testing soci_odbc_test_access_static ***Failed
7/ 14 Testing soci_odbc_test_postgresql ***Failed
8/ 14 Testing soci_odbc_test_postgresql_stat***Failed
9/ 14 Testing soci_oracle_test ***Failed
10/ 14 Testing soci_oracle_test_static ***Failed
11/ 14 Testing soci_postgresql_test ***Failed
12/ 14 Testing soci_postgresql_test_static ***Failed
13/ 14 Testing soci_sqlite3_test Passed
14/ 14 Testing soci_sqlite3_test_static Passed
29% tests passed, 10 tests failed out of 14
The following tests FAILED:
3 - soci_mysql_test (Failed)
4 - soci_mysql_test_static (Failed)
5 - soci_odbc_test_access (Failed)
6 - soci_odbc_test_access_static (Failed)
7 - soci_odbc_test_postgresql (Failed)
8 - soci_odbc_test_postgresql_static (Failed)
9 - soci_oracle_test (Failed)
10 - soci_oracle_test_static (Failed)
11 - soci_postgresql_test (Failed)
12 - soci_postgresql_test_static (Failed)
Errors while running CTest
make[3]: *** [CMakeFiles/check] Error 8
make[2]: *** [CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users