Postgresql-9.2.4-1-windows QPSQL driver isssue
-
wrote on 22 Apr 2013, 18:16 last edited by
I built QPSQL driver for postgresql-9.1.3-1-windows without any problem but when I tried to build QPSQL for postgresql-9.2.4-1-windows it failed and gave me this error message:
Could you please help me out here?
@C:\Qt\Qt5.0.2\5.0.2\Src\qtbase\src\plugins\sqldrivers\psql>mingw32-make
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/
sqldrivers/psql'
C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\moc.exe -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_
NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQ
T_CORE_LIB -I. -I"C:\PostgreSQL\9.2\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\i
nclude" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2
mingw47_32\include\QtSql\5.0.2" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql
5.0.2\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtCore" -I".moc\release_s
hared" -I"........\mkspecs\win32-g++" -D__GNUC__ -DWIN32 main.cpp -o .moc\rel
ease_shared\main.moc
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE
PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"C:\PostgreSQL
\9.2\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include" -I"C:\Qt\Qt5.0.2\5.0.2
mingw47_32\include\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2"
-I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2\QtSql" -I"C:\Qt\Qt5.0.2\5
.0.2\mingw47_32\include\QtCore" -I".moc\release_shared" -I"........\mkspecs\w
in32-g++" -o .obj\release_shared\main.o main.cpp
In file included from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/i686-w64-mingw32/bits/gthr-default.h:41:0,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/i686-w64-mingw32/bits/gthr.h:150,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/ext/atomicity.h:34,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/bits/basic_string.h:41,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/string:54,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/random:41,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/bits/stl_algo.h:67,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/algorithm:63,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qglobal.h:80
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qnamespace.h
:45,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qobjectdefs.
h:45,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qobject.h:47
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qplugin.h:45
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql/qsqldriverplu
gin.h:45,
from main.cpp:42:
C:\PostgreSQL\9.2\include/pthread.h:307:8: error: redefinition of 'struct timesp
ec'
In file included from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/../../../../i686-w64-mingw32/include/time.h:277:0,
from C:\PostgreSQL\9.2\include/pthread.h:218,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/i686-w64-mingw32/bits/gthr-default.h:41,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/i686-w64-mingw32/bits/gthr.h:150,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/ext/atomicity.h:34,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/bits/basic_string.h:41,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/string:54,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/random:41,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/bits/stl_algo.h:67,
from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/
4.7.2/include/c++/algorithm:63,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qglobal.h:80
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qnamespace.h
:45,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qobjectdefs.
h:45,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qobject.h:47
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include/QtCore/qplugin.h:45
,
from C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql/qsqldriverplu
gin.h:45,
from main.cpp:42:
c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686
-w64-mingw32/include/sys/timeb.h:90:8: error: previous definition of 'struct tim
espec'
Makefile.Release:391: recipe for target '.obj/release_shared/main.o' failed
mingw32-make[1]: *** [.obj/release_shared/main.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/s
qldrivers/psql'
makefile:38: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2C:\Qt\Qt5.0.2\5.0.2\Src\qtbase\src\plugins\sqldrivers\psql>@
PS
qmake params: @qmake "INCLUDEPATH+=C:/PostgreSQL/9.2/include" "LIBS+=C:/PostgreSQL/9.2/lib/libpq.lib" psql.pro@ -
wrote on 24 Apr 2013, 09:42 last edited by
Does anyone face this issue?
I'm not sure what if this is a bug or not so I posted it here instead of reporting it as a bug
-
wrote on 21 Jun 2013, 11:56 last edited by
Yes I have exactly the same problem
-
wrote on 21 Jun 2013, 12:12 last edited by
bq. Yes I have exactly the same problem
I didn't fix this issue till now even I gave up and reverted back to Postgresql. Building Qt SQL Plugins really painful specially in Windows.
Any way, I filed a feature request for making open source SQL plugins available in Qt SDKs at "this link":https://bugreports.qt-project.org/browse/QTBUG-29802.