LinuxForum.Fans
Тема

MySQL и QT5

Автор: dezhurant 8 сообщений 3284 просмотров
#325110

Здравствуйте, у меня снова вопрос. Установил Qt-5.02, теперь никак не могу приладить к нему MySQL
Пытаюсь конфигурить после установки:

Вывод
[console]linux-7sho:/opt/Qt5.0.2/5.0.2/Src/qtbase # ./configure -plugin-sql-mysql
Which edition of Qt do you want to use ?

Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.

o


This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.

Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of the license? y

<srcbase> = /opt/Qt5.0.2/5.0.2/Src/qtbase
<outbase> = /opt/Qt5.0.2/5.0.2/Src/qtbase
Creating qmake...
gmake: Цель `first' не требует выполнения команд.
Running configuration tests...
MySQL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
[/console]
Вывод с -v
[console]linux-7sho:/opt/Qt5.0.2/5.0.2/Src/qtbase # ./configure -plugin-sql-mysql -v
Which edition of Qt do you want to use ?

Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.

o

Precompiled-headers support enabled.
g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
Symbolic function binding enabled.

This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.

Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of the license? y

<srcbase> = /opt/Qt5.0.2/5.0.2/Src/qtbase
<outbase> = /opt/Qt5.0.2/5.0.2/Src/qtbase
Creating qmake...
gmake: Цель `first' не требует выполнения команд.
Running configuration tests...
Determining architecture... ()
g++ -c -m64 -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++-64 -I. -o arch.o arch.cpp
g++ -m64 -o arch arch.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
Found architecture in binary
CFG_ARCH="x86_64"
CFG_CPUFEATURES=" mmx sse sse2"
System architecture: 'x86_64'
Host architecture: 'x86_64'
C++11 auto-detection... ()
g++ -c -m64 -pipe -O2 -std=c++0x -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o c++11.o c++11.cpp
g++ -m64 -Wl,-O1 -o c++11 c++11.o
C++11 enabled.
floatmath auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o floatmath.o floatmath.cpp
floatmath.cpp:44:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
floatmath.cpp:44:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
g++ -m64 -Wl,-O1 -o floatmath floatmath.o
floatmath enabled.
sse2 auto-detection... ()
g++ -c -m64 -pipe -msse2 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o sse2.o sse2.cpp
g++ -m64 -o sse2 sse2.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'sse2' && test -f sse2.gdb-index && objcopy --add-section '.gdb_index=sse2.gdb-index' --set-section-flags '.gdb_index=readonly' 'sse2' 'sse2' && rm -f sse2.gdb-index || true
sse2 enabled.
sse3 auto-detection... ()
g++ -c -m64 -pipe -msse3 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o sse3.o sse3.cpp
g++ -m64 -o sse3 sse3.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'sse3' && test -f sse3.gdb-index && objcopy --add-section '.gdb_index=sse3.gdb-index' --set-section-flags '.gdb_index=readonly' 'sse3' 'sse3' && rm -f sse3.gdb-index || true
sse3 enabled.
ssse3 auto-detection... ()
g++ -c -m64 -pipe -mssse3 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o ssse3.o ssse3.cpp
g++ -m64 -o ssse3 ssse3.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'ssse3' && test -f ssse3.gdb-index && objcopy --add-section '.gdb_index=ssse3.gdb-index' --set-section-flags '.gdb_index=readonly' 'ssse3' 'ssse3' && rm -f ssse3.gdb-index || true
ssse3 enabled.
sse4_1 auto-detection... ()
g++ -c -m64 -pipe -msse4.1 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o sse4_1.o sse4_1.cpp
g++ -m64 -o sse4_1 sse4_1.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'sse4_1' && test -f sse4_1.gdb-index && objcopy --add-section '.gdb_index=sse4_1.gdb-index' --set-section-flags '.gdb_index=readonly' 'sse4_1' 'sse4_1' && rm -f sse4_1.gdb-index || true
sse4_1 enabled.
sse4_2 auto-detection... ()
g++ -c -m64 -pipe -msse4.2 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o sse4_2.o sse4_2.cpp
g++ -m64 -o sse4_2 sse4_2.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'sse4_2' && test -f sse4_2.gdb-index && objcopy --add-section '.gdb_index=sse4_2.gdb-index' --set-section-flags '.gdb_index=readonly' 'sse4_2' 'sse4_2' && rm -f sse4_2.gdb-index || true
sse4_2 enabled.
avx auto-detection... ()
g++ -c -m64 -pipe -mavx -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o avx.o avx.cpp
g++ -m64 -o avx avx.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'avx' && test -f avx.gdb-index && objcopy --add-section '.gdb_index=avx.gdb-index' --set-section-flags '.gdb_index=readonly' 'avx' 'avx' && rm -f avx.gdb-index || true
avx enabled.
avx2 auto-detection... ()
g++ -c -m64 -pipe -mavx2 -g -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o avx2.o avx2.cpp
g++ -m64 -o avx2 avx2.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'avx2' && test -f avx2.gdb-index && objcopy --add-section '.gdb_index=avx2.gdb-index' --set-section-flags '.gdb_index=readonly' 'avx2' 'avx2' && rm -f avx2.gdb-index || true
avx2 enabled.
zlib auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o zlib.o zlib.cpp
zlib.cpp: In function ‘int main(int, char**)’:
zlib.cpp:46:15: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable]
zlib.cpp:48:17: warning: variable ‘ver’ set but not used [-Wunused-but-set-variable]
zlib.cpp:51:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
g++ -m64 -Wl,-O1 -o zlib zlib.o -lz
zlib enabled.
libjpeg auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o libjpeg.o libjpeg.cpp
libjpeg.cpp: In function ‘int main(int, char**)’:
libjpeg.cpp:51:32: warning: ‘cinfo’ is used uninitialized in this function [-Wuninitialized]
g++ -m64 -Wl,-O1 -o libjpeg libjpeg.o -ljpeg
libjpeg enabled.
libpng auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o libpng.o libpng.cpp
libpng.cpp: In function ‘int main(int, char**)’:
libpng.cpp:50:17: warning: variable ‘png_ptr’ set but not used [-Wunused-but-set-variable]
g++ -m64 -Wl,-O1 -o libpng libpng.o -lpng
libpng enabled.
DB2 auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o db2.o db2.cpp
db2.cpp:42:20: fatal error: sqlcli.h: Нет такого файла или каталога
compilation terminated.
gmake: *** [db2.o] Ошибка 1
DB2 disabled.
InterBase auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o ibase.o ibase.cpp
ibase.cpp:42:19: fatal error: ibase.h: Нет такого файла или каталога
compilation terminated.
gmake: *** [ibase.o] Ошибка 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o mysql.o ../mysql/mysql.cpp
../mysql/mysql.cpp:42:19: fatal error: mysql.h: Нет такого файла или каталога
compilation terminated.
gmake: *** [mysql.o] Ошибка 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
g++ -c -m64 -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++-64 -I. -o mysql.o mysql.cpp
mysql.cpp:42:19: fatal error: mysql.h: Нет такого файла или каталога
compilation terminated.
gmake: *** [mysql.o] Ошибка 1
MySQL (thread-unsafe) disabled.
MySQL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
[/console]

Что я не так делаю?

#325111
"dezhurant⇓" написал:
../mysql/mysql.cpp:42:19: fatal error: mysql.h: Нет такого файла или каталога

тонко намекает на то, что хедеры мускуля не установлены... пакет mysql-{dev,headers,devel} в зависимости от дистрибутива

ЗЫ: сборка из исходников действительно необходима?

#325112
"Fat-Zer⇓" написал:
ЗЫ: сборка из исходников действительно необходима?

Да, наверное, нет... Просто скачал .run и установил его.

"Fat-Zer⇓" написал:
тонко намекает на то, что хедеры мускуля не установлены...

А что именно доустановить? Дистрибутив в подписи... OpenSuse 12.3 x64...

#325120
"dezhurant⇓" написал:
А что именно доустановить? Дистрибутив в подписи... OpenSuse 12.3 x64...

не... ну найти пакет то сложно уже что ли? кейворды ведь уже дал по которым искать...
[console]alexander@goblin-book:~> zypper se '*mysql*dev*'
Загрузка данных о репозиториях...
Чтение установленных пакетов...

С | Имя | Заключение | Тип
--+---------------------------+------------------------------------------------+------
| libmysqlclient-devel | MariaDB development header files and libraries | пакет
| libmysqlcppconn-devel | Development files for MySQL Connector/C++ | пакет
| libmysqld-devel | MariaDB embedded server development files | пакет
| mysql-connector-c++-devel | Files for Developing with mysql-connector-c++ | пакет[/console]
скорей всего нужен первый....

#325145

Fat-Zer, спасибо, не было только последнего. Установил-стал ругаться на отсутствие некоторых xcb... Доустановил и их, сейчас вроде сконфигурилось без ругани, make-ится... :)

#325158

Всё установилось, но ничего похожего на плагин mysql или чего-нибудь подобного в Qt-creator-е я так и не наблюдаю...

#325164
"dezhurant⇓" написал:
Всё установилось, но ничего похожего на плагин mysql или чего-нибудь подобного в Qt-creator-е я так и не наблюдаю...

Если есть исходники примеров, то откройте sqlbrowser в строке выбора он покажет все доступные базы.

#325173

marikk, в Qt-creator-е? Там нет такого, как и нет ничего связанного с мускулом... Как раз и ищу что-нибудь похожее...

Войдите или зарегистрируйтесь, чтобы ответить.