Hello Marc!
Marc Herbert schrieb:
Looks great, thanks a lot for testing this.
My Pleasure :-)
At first sight I would rather remove the "long" rather than the
"int64_t" functions, so it's much simpler to be portable across a wide
range of archs.
Good idea - will go in that direction. But I think it could be of value
if someone with more knowledge in C++ (than mine == Zero) would dig down
into this issue.
So they are not ment to be a valid patch. Can you please review if
these changes do the right thing and will cause no problems.
Some minor suggestions:
- the default diff format sucks, try something like: "diff -Nur"
instead.
You're right. But I just wanted to show the difference and NOT provide a
patch.
I state again: This is experimetal to the max and not intended to be a
patch before some of the developers accept it.
Thanks again for trying carob on 64bits.
Bad news. "make test" fails with my changes applied.
hydra2:~/mcluster/carob-0.6_patched# make test
g++ src/Common.o src/JavaSocket.o src/DriverSocket.o
src/CarobException.o src/ConnectionParameters.o src/ControllerPinger.o
src/ControllerPool.o src/Connection.o src/Request.o
src/RequestWithResultSetParameters.o src/ResultSetMetaData.o
src/DriverResultSet.o src/Field.o src/Statement.o
src/ParameterStatement.o src/BigDecimal.o src/SQLDataSerialization.o
src/StringCodecs.o -lpthread -fPIC -shared -lgmp -o libcarob.so.1
/bin/ln -s libcarob.so.1 libcarob.so
/bin/ln: Erzeugen der symbolischen Verknüpfung »libcarob.so« zu
»libcarob.so.1«: Die Datei existiert bereits
make: [libcarob.so.1] Fehler 1 (ignoriert)
make -C test
make[1]: Entering directory `/root/mcluster/carob-0.6_patched/test'
g++ -g3 -Wall -I../include -c -o CarobTestLauncher.o CarobTestLauncher.cpp
g++ -g3 -Wall -I../include -c -o ConnectionSetup.o ConnectionSetup.cpp
g++ -g3 -Wall -I../include -c -o 01-Unit/TestStringCodecs.o
01-Unit/TestStringCodecs.cpp
g++ -g3 -Wall -I../include -c -o
10-Connection/TestBeginCommitRollback.o
10-Connection/TestBeginCommitRollback.cpp
g++ -g3 -Wall -I../include -c -o 10-Connection/TestConnect.o
10-Connection/TestConnect.cpp
g++ -g3 -Wall -I../include -c -o 10-Connection/TestControllerPool.o
10-Connection/TestControllerPool.cpp
g++ -g3 -Wall -I../include -c -o 10-Connection/TestFailOver.o
10-Connection/TestFailOver.cpp
g++ -g3 -Wall -I../include -c -o 20-Write/TestExecWriteRequest.o
20-Write/TestExecWriteRequest.cpp
g++ -g3 -Wall -I../include -c -o 30-ResultSet/TestBigDecimal.o
30-ResultSet/TestBigDecimal.cpp
g++ -g3 -Wall -I../include -c -o 30-ResultSet/TestDriverResultSet.o
30-ResultSet/TestDriverResultSet.cpp
g++ -g3 -Wall -I../include -c -o 30-ResultSet/TestExecReadRequest.o
30-ResultSet/TestExecReadRequest.cpp
g++ -g3 -Wall -I../include -c -o 30-ResultSet/TestSimpleUnicode.o
30-ResultSet/TestSimpleUnicode.cpp
g++ -g3 -Wall -I../include -c -o 35-ResultList/TestExec.o
35-ResultList/TestExec.cpp
g++ -g3 -Wall -I../include -c -o
40-Parameter-PreparedStatement/TestIEEE754.o
40-Parameter-PreparedStatement/TestIEEE754.cpp
g++ -g3 -Wall -I../include -c -o
40-Parameter-PreparedStatement/TestParameterStatement.o
40-Parameter-PreparedStatement/TestParameterStatement.cpp
40-Parameter-PreparedStatement/TestParameterStatement.cpp: In member
function 'void TestParameterStatement::testBigDecimal()':
40-Parameter-PreparedStatement/TestParameterStatement.cpp:294: error:
call of overloaded 'BigDecimal(long long int)' is ambiguous
../include/BigDecimal.hpp:103: note: candidates are:
CarobNS::BigDecimal::BigDecimal(const CarobNS::BigDecimal&)
../include/BigDecimal.hpp:94: note:
CarobNS::BigDecimal::BigDecimal(long int)
../include/BigDecimal.hpp:90: note:
CarobNS::BigDecimal::BigDecimal(int)
../include/BigDecimal.hpp:86: note:
CarobNS::BigDecimal::BigDecimal(const std::string&) <near match>
../include/BigDecimal.hpp:77: note:
CarobNS::BigDecimal::BigDecimal(const std::wstring&) <near match>
40-Parameter-PreparedStatement/TestParameterStatement.cpp:295: error:
call of overloaded 'BigDecimal(long long int)' is ambiguous
../include/BigDecimal.hpp:103: note: candidates are:
CarobNS::BigDecimal::BigDecimal(const CarobNS::BigDecimal&)
../include/BigDecimal.hpp:94: note:
CarobNS::BigDecimal::BigDecimal(long int)
../include/BigDecimal.hpp:90: note:
CarobNS::BigDecimal::BigDecimal(int)
../include/BigDecimal.hpp:86: note:
CarobNS::BigDecimal::BigDecimal(const std::string&) <near match>
../include/BigDecimal.hpp:77: note:
CarobNS::BigDecimal::BigDecimal(const std::wstring&) <near match>
40-Parameter-PreparedStatement/TestParameterStatement.cpp:300: error:
call of overloaded 'BigDecimal(long long int)' is ambiguous
../include/BigDecimal.hpp:103: note: candidates are:
CarobNS::BigDecimal::BigDecimal(const CarobNS::BigDecimal&)
../include/BigDecimal.hpp:94: note:
CarobNS::BigDecimal::BigDecimal(long int)
../include/BigDecimal.hpp:90: note:
CarobNS::BigDecimal::BigDecimal(int)
../include/BigDecimal.hpp:86: note:
CarobNS::BigDecimal::BigDecimal(const std::string&) <near match>
../include/BigDecimal.hpp:77: note:
CarobNS::BigDecimal::BigDecimal(const std::wstring&) <near match>
40-Parameter-PreparedStatement/TestParameterStatement.cpp:301: error:
call of overloaded 'BigDecimal(long long int)' is ambiguous
../include/BigDecimal.hpp:103: note: candidates are:
CarobNS::BigDecimal::BigDecimal(const CarobNS::BigDecimal&)
../include/BigDecimal.hpp:94: note:
CarobNS::BigDecimal::BigDecimal(long int)
../include/BigDecimal.hpp:90: note:
CarobNS::BigDecimal::BigDecimal(int)
../include/BigDecimal.hpp:86: note:
CarobNS::BigDecimal::BigDecimal(const std::string&) <near match>
../include/BigDecimal.hpp:77: note:
CarobNS::BigDecimal::BigDecimal(const std::wstring&) <near match>
make[1]: *** [40-Parameter-PreparedStatement/TestParameterStatement.o]
Fehler 1
make[1]: Leaving directory `/root/mcluster/carob-0.6_patched/test'
make: *** [test] Fehler 2
Will try to comment out "long" instead of "int64_t". Keep you informed -
stay tuned!
PS: is the makefile change required?
Yes they are to prevent the following at linking time:
...
g++ src/Common.o src/JavaSocket.o src/DriverSocket.o
src/CarobException.o src/ConnectionParameters.o src/ControllerPinger.o
src/ControllerPool.o src/Connection.o src/Request.o
src/RequestWithResultSetParameters.o src/ResultSetMetaData.o
src/DriverResultSet.o src/Field.o src/Statement.o
src/ParameterStatement.o src/BigDecimal.o src/SQLDataSerialization.o
src/StringCodecs.o -lpthread -fPIC -shared -lgmp -o libcarob.so.1
/usr/bin/ld: src/Common.o: relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC
src/Common.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libcarob.so.1] Fehler 1
I have no clue at all what "-fPIC" does. Just tried the same people in
other cases (found via google) did to prevent this error.
Best Regards
Volker
--
====================================================
inqbus it-consulting +49 ( 341 ) 5643800
Dr. Volker Jaenisch http://www.inqbus.de
Herloßsohnstr. 12 0 4 1 5 5 Leipzig
N O T - F Ä L L E +49 ( 170 ) 3113748
====================================================
_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob