Can't successfully cross-compile MySQL: cannot find /lib/libpthread.so.0
-
Hello!
I'm having serious problems while cross-compiling MySQL for Qt 4.7.4.
The following error is thrown:
@/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: cannot find /lib/libpthread.so.0@My system:
Host: Debian Lenny 5.0.9
Compiler: arm-linux-gnueabi-gcc-4.3, arm-linux-gnueabi-g++-4.3
Target: Debian LennyWhat I did:
I cross-compile the tslib to support the touchscreen.
Changed the qmake.conf file.
@include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
QMAKE_INCDIR += /home/spiderman/Development/qt/tslib-1.0/tslib-ARM/include
QMAKE_LIBDIR += /home/spiderman/Development/qt/tslib-1.0/tslib-ARM/lib
QMAKE_LFLAGS += -lts
QMAKE_CC = arm-linux-gnueabi-gcc-4.3
QMAKE_CXX = arm-linux-gnueabi-g++-4.3
QMAKE_LINK = arm-linux-gnueabi-g++-4.3
QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++-4.3
QMAKE_AR = arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
QMAKE_STRIP = arm-linux-gnueabi-strip
load(qt_config)@Executed configure:
@./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -release -prefix /usr/local/Trolltech/Qt-target-version -qt-gfx-linuxfb -qt-kbd-tty -little-endian -host-little-endian@Cross-compiled and installed:
@make
sudo make install@Up to this point everything was okay, I can even cross-compile my own application and execute it on my target.
But, as I need MySQL support, I tried to compile the plugin.First, I installed the required packes on the target:
@apt-get install libmysqlclient15-dev@Then I cross-compiled the plugin, whereby <TargetRFS> is the path to the target filesystem, where mysql (libmysqlclient15-dev) was installed:
@cd Qt-target-version/src/plugins/sqldrivers/mysql
/usr/local/Trolltech/Qt-target-version/bin/qmake -o Makefile "INCLUDEPATH+=<TargetRFS>/usr/include/mysql" "LIBS+=-L<TargetRFS>/usr/lib -lmysqlclient_r" mysql.pro
make@The library and the header file are definitely available on the target.
During make the following error is thrown:
@arm-linux-gnueabi-g++ -Wl,-rpath-link,/home/spiderman/Development/qt/Qt-target-version/lib -lts -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-target-version/lib -Wl,-rpath,/usr/local/Trolltech/Qt-target-version/lib -shared -o libqsqlmysql.so .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/qsql_mysql.o .obj/release-shared-emb-arm/moc_qsql_mysql.o -L/home/spiderman/Development/qt/Qt-target-version/lib -L/home/spiderman/Development/qt/tslib-1.0/tslib-ARM/lib -L/home/spiderman/Development/rootfs/debian_lenny/usr/lib/ -lmysqlclient_r -lQtSql -L/home/spiderman/Development/qt/Qt-target-version/lib -L/home/spiderman/Development/qt/tslib-1.0/tslib-ARM/lib -lQtCore -lpthread
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: cannot find /lib/libpthread.so.0
collect2: ld returned 1 exit status
make: *** [../../../../plugins/sqldrivers/libqsqlmysql.so] Error 1@Why can't the system find libpthread? Must there be installed additional packes on the target or host? Can the compiler version be the problem? Why does the compiling of Qt itself and tslib work but not MySQL?
Thanks a lot for your help!!!
Regards,
Roony -
Hi,I also met the problem when I was working on a project.Have u solved it? Please tell me how did it, THX.
-
Has anyone solved this problem? Im having crosscompile issues with MySQL on beaglebone black