Question

I'm trying to create postgresql plugin for Symbian device but I can't compile it. I'm working on Windows 7 64bit.

I did everything according to this article: http://doc.qt.io/archives/qt-4.7/sql-driver.html#qpsql

C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>qmake "INCLUDEPATH+=C:\Program Files (x86)\PostgreSQL\8.3\include" "LIBS+=C:\Program Files (x86)\PostgreSQL\8.3\lib\libpq.lib" psql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.

So, it looked OK. Then...

C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe is not recognized as an internal or external command, operable program or batch file.
make: *** [debug-gcce] Error 9009

I noticed, that sbs_home was set to python directory but it was not in the path, then the make could not find the script raptor_start.py:

C:\...drivers\psql>echo %sbs_home%
C:\QtSDK\Symbian\tools\sbs\win32\python27
C:\...drivers\psql>set path=%path%;%sbs_home%
C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe: can't open file C:\QtSDK\Symbian\tools\sbs\win32\python27\python\raptor_start.py': [Errno 2] No such file or directory
make: *** [debug-gcce] Error 2
C:\...drivers\psql>set sbs_home=C:\QtSDK\Symbian\tools\sbs

so, when I started compiling I got this error:

C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/include/stdapis/stlportv5/stl/_istream.c:650: warning: suggest parentheses around '&&' within '||' target     : epoc32\release\armv5\udeb\qsqlpsql.dll    [arm.v5.udeb.gcce4_4_1]
FAILED linkandpostlink  for arm.v5.udeb.gcce4_4_1: epoc32\release\armv5\udeb\qsqlpsql.dll
  mmp: qsqlpsql_dll.mmp
c:/qtsdk/symbian/tools/gcce4/bin/../lib/gcc/arm-none-symbianelf/4.4.1/../../../../arm-none-symbianelf/bin/ld.exe: warning: C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/usrt3_1.lib(ucppinit.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/build/psql/c_8d95259b570e1766/qsqlpsql_dll/armv5/udeb/qsql_psql.o: In function `qMakeError':    C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:175: undefined reference to `PQerrorMessage'

....many undefined references...

C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:117: undefined reference to `PQfreemem'
collect2: ld returned 1 exit status

mingw32-make[1]: *** [C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/qsqlpsql.dll] Error 1
sbs: error: The make-engine exited with errors.

sbs : warnings: 3
sbs : errors: 2

built 'arm.v5.udeb.gcce4_4_1'

Run time 5 seconds

sbs: build log in C:\QtSDK\Symbian\SDKs\Symbian3Qt474\epoc32\build\Makefile.2012-06-26-15-03-12.78-2996.log
make: *** [debug-gcce] Error 1

Has anybody idea, what with it?

Was it helpful?

Solution

You are trying to build an Symbian/ARM application using precompiled binary postgresql client library for Windows. This won't ever work. The instructions you refer to only show how to build for OS X, Unix and Mac targets natively. You're cross compiling for Symbian.

You'd first need to obtain a binary version of the postgresql client library compiled for Symbian. It might exist out there, or you may need to compile it yourself. I don't think that the library supports Symbian as a target, and I couldn't readily find any Symbian ports for download. You may be out of luck for a trivial solution. A port might not be entirely out of the question, though -- perhaps the platform-specific code is localized enough.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top