Thread: [Quickfix-developers] Compile problems with MySQL/Postgesql and Python
Brought to you by:
orenmnero
From: Michael F. <mic...@gm...> - 2009-02-19 16:16:59
|
Hi, I am trying to compile QuickFIX under Centos5 Linux and am struggling to link in MySQL, Postgresql or the Python API. Quickfix on it's own compiles fine. Errors appear to be linking errors but could be something else. If specific versions of Python, MySQL, LXML2 are required how do I find out what I need? Michael Error msg with MySQL: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o .libs/Session.o .libs/SessionTime.o .libs/SessionFactory.o .libs/Parser.o .libs/Log.o .libs/FileLog.o.libs/Settings.o .libs/ConfigLexer.o .libs/MessageStore.o .libs/SocketServer.o .libs/SocketConnector.o .libs/Acceptor.o .libs/Initiator.o .libs/SocketAcceptor.o .libs/SocketInitiator.o .libs/SocketMonitor.o .libs/SocketConnection.o .libs/ThreadedSocketAcceptor.o .libs/ThreadedSocketInitiator.o .libs/ThreadedSocketConnection.o .libs/FileStore.o .libs/MySQLStore.o .libs/MySQLLog.o .libs/PostgreSQLStore.o .libs/PostgreSQLLog.o .libs/Dictionary.o .libs/DataDictionary.o .libs/SessionSettings.o .libs/FieldTypes.o .libs/FieldMap.o .libs/Message.o .libs/Group.o.libs/MessageSorters.o .libs/HttpParser.o .libs/HttpMessage.o .libs/HttpConnection.o .libs/HttpServer.o .libs/Utility.o .libs/LIBXML_DOMDocument.o .libs/CallStack.o -lxml2 -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -L/usr/lib/gcc/ x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o -Wl,-soname -Wl,libquickfix.so.10 -o .libs/libquickfix.so.10.0.0 /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status make[4]: *** [libquickfix.la] Error 1 Error msg with Postgresql: (seems to link fine with Postgresql and then fail to link with lxml2) g++ -g -O2 -Wall -ansi -Wpointer-arith -Wwrite-strings -I/usr/include -I/usr/include/libxml2 -o .libs/tradeclient tradeclient.o Application.o ../../src/C++/.libs/libquickfix.so -L/usr/lib -lpthread -lxml2 -lz -lm -lpq -Wl,--rpath -Wl,/usr/local/lib /usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2 /usr/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2 /usr/bin/ld: skipping incompatible /usr/lib/libpq.so when searching for -lpq /usr/bin/ld: skipping incompatible /usr/lib/libpq.a when searching for -lpq Python API gets this far and then simply hangs: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I.. -I../.. -g -O2 -Wall -ansi -Wpointer-arith -Wwrite-strings -I/usr/include/libxml2 -I/usr/include/python2.4 -MT QuickfixPython.lo -MD -MP -MF .deps/QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o .libs/QuickfixPython.o QuickfixPython.cpp: In function 'void SWIG_Python_SetSwigThis(PyObject*, PyObjec t*)': QuickfixPython.cpp:2173: warning: deprecated conversion from string constant to 'char*'' QuickfixPython.cpp: In function 'int SWIG_AsPtr_std_string(PyObject*, std::string**)': QuickfixPython.cpp:3987: warning: dereferencing type-punned pointer will break strict-aliasing rules QuickfixPython.cpp: In function 'int SWIG_AsVal_bool(PyObject*, bool*)': QuickfixPython.cpp:4026: warning: dereferencing type-punned pointer will break strict-aliasing rules QuickfixPython.cpp:4029: warning: dereferencing type-punned pointer will break strict-aliasing rules Versions: mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0 psql (PostgreSQL) 8.1.11 Python 2.4.3 (#1, May 24 2008, 13:57:05) |
From: <Jon...@ub...> - 2009-02-19 16:25:41
|
You're building a 64-bit application, but trying to link to 32-bit libraries. Try passing -m32 to the compiler, so that your app is 32-bit, or install the 64-bit libs. Jonathan Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |