LeFlou
28th September 2010, 14:36
Hello,
Im trying to build an (almost) complete version of Qt 4.7.0 for arm.
I want to: play videos/sounds (phonon), ssl support (openssl) and webkit on my card.
I installed scratchbox in order to get a working cross-compiler (arm-none-linux-gnueabi).
I tried and succeed to compile/run an hello world (without Qt stuff) with this cross-compiler.
This is myconfig.sh to compile Qt-4.7.0 for arm.
scratchboxUser='leflou'
./configure -v -embedded arm -xplatform qws/linux-arm-gnueabi-g++ \
-opensource -little-endian \
-prefix /usr/local/Trolltech/Qt-4.7.0-arm \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/glib-2.0 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/libxml2 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10/gst \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10/gst/interfaces \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/ssl/include \
-L /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/lib \
-L /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/ssl/lib \
-rpath -lssl -lcrypto -lz -lxml2 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 \
-nomake demos -nomake example -make tools \
-multimedia -audio-backend -phonon -phonon-backend -glib \
-no-mmx -no-3dnow -no-sse -no-sse2 \
-no-largefile -no-gtkstyle -no-qt3support -no-cups -no-nis
Each library has been downloaded/configured/maked in scratchbox (glib, gstreamer, gst-plugins, openssl, xml2).
When I compile this code:
#include <QDebug>
#include <QPushButton>
#include <QApplication>
int main(int argc, char** argv)
{
qDebug() << "Before everything...";
QApplication* app = new QApplication(argc, argv);
qDebug() << "QApplication created";
QPushButton* hello = new QPushButton("Hello World !");
qDebug() << "QPushButton created";
QObject::connect(hello, SIGNAL(clicked()), app, SLOT(quit()));
qDebug() << "QObject connected !";
hello->move(50, 50);
qDebug() << "QPushButton move";
hello->resize(300, 100);
qDebug() << "QPushButton resize";
hello->show();
qDebug() << "QPushButton shows up !";
qDebug() << "Before app exec";
const int ret = app->exec();
qDebug() << "After app exec";
delete hello;
delete app;
return ret;
}
$ ./QtHelloWorld -qws
Segmentation fault occurs on line 22...
I checked ldd, it seems correct...
root@cm-debian:~# ldd QtHelloWorld
libQtGui.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtGui.so.4 (0x40001000)
libQtNetwork.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtNetwork.so.4 (0x40a78000)
libQtCore.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtCore.so.4 (0x40b97000)
libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x40ea4000)
libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x40ef6000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x41091000)
libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x410b6000)
libgmodule-2.0.so.0 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libgmodule-2.0.so.0 (0x411e8000)
libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x411f3000)
libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x41239000)
libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0 (0x41330000)
libgstreamer-0.10.so.0 => /usr/local/lib/libgstreamer-0.10.so.0 (0x4133d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x41414000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41434000)
libm.so.6 => /lib/libm.so.6 (0x41518000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x415c0000)
libc.so.6 => /lib/libc.so.6 (0x415d4000)
libdl.so.2 => /lib/libdl.so.2 (0x41704000)
librt.so.1 => /lib/librt.so.1 (0x4170f000)
/lib/ld-linux.so.3 (0x2a000000)
I dont have any clue on my issue, this is really embarassing.
Edit:
- main.cpp compiles & runs without any issue on x86.
- I tried another example "standarddialogs":
crosscompiled successful, running failed.
Regards,
Im trying to build an (almost) complete version of Qt 4.7.0 for arm.
I want to: play videos/sounds (phonon), ssl support (openssl) and webkit on my card.
I installed scratchbox in order to get a working cross-compiler (arm-none-linux-gnueabi).
I tried and succeed to compile/run an hello world (without Qt stuff) with this cross-compiler.
This is myconfig.sh to compile Qt-4.7.0 for arm.
scratchboxUser='leflou'
./configure -v -embedded arm -xplatform qws/linux-arm-gnueabi-g++ \
-opensource -little-endian \
-prefix /usr/local/Trolltech/Qt-4.7.0-arm \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/glib-2.0 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/libxml2 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10 \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10/gst \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/include/gstreamer-0.10/gst/interfaces \
-I /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/ssl/include \
-L /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/lib \
-L /scratchbox/users/$scratchboxUser/targets/Arm/usr/local/ssl/lib \
-rpath -lssl -lcrypto -lz -lxml2 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 \
-nomake demos -nomake example -make tools \
-multimedia -audio-backend -phonon -phonon-backend -glib \
-no-mmx -no-3dnow -no-sse -no-sse2 \
-no-largefile -no-gtkstyle -no-qt3support -no-cups -no-nis
Each library has been downloaded/configured/maked in scratchbox (glib, gstreamer, gst-plugins, openssl, xml2).
When I compile this code:
#include <QDebug>
#include <QPushButton>
#include <QApplication>
int main(int argc, char** argv)
{
qDebug() << "Before everything...";
QApplication* app = new QApplication(argc, argv);
qDebug() << "QApplication created";
QPushButton* hello = new QPushButton("Hello World !");
qDebug() << "QPushButton created";
QObject::connect(hello, SIGNAL(clicked()), app, SLOT(quit()));
qDebug() << "QObject connected !";
hello->move(50, 50);
qDebug() << "QPushButton move";
hello->resize(300, 100);
qDebug() << "QPushButton resize";
hello->show();
qDebug() << "QPushButton shows up !";
qDebug() << "Before app exec";
const int ret = app->exec();
qDebug() << "After app exec";
delete hello;
delete app;
return ret;
}
$ ./QtHelloWorld -qws
Segmentation fault occurs on line 22...
I checked ldd, it seems correct...
root@cm-debian:~# ldd QtHelloWorld
libQtGui.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtGui.so.4 (0x40001000)
libQtNetwork.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtNetwork.so.4 (0x40a78000)
libQtCore.so.4 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libQtCore.so.4 (0x40b97000)
libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x40ea4000)
libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x40ef6000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x41091000)
libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x410b6000)
libgmodule-2.0.so.0 => /usr/local/Trolltech/Qt-4.7.0-arm/lib/libgmodule-2.0.so.0 (0x411e8000)
libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x411f3000)
libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x41239000)
libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0 (0x41330000)
libgstreamer-0.10.so.0 => /usr/local/lib/libgstreamer-0.10.so.0 (0x4133d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x41414000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41434000)
libm.so.6 => /lib/libm.so.6 (0x41518000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x415c0000)
libc.so.6 => /lib/libc.so.6 (0x415d4000)
libdl.so.2 => /lib/libdl.so.2 (0x41704000)
librt.so.1 => /lib/librt.so.1 (0x4170f000)
/lib/ld-linux.so.3 (0x2a000000)
I dont have any clue on my issue, this is really embarassing.
Edit:
- main.cpp compiles & runs without any issue on x86.
- I tried another example "standarddialogs":
crosscompiled successful, running failed.
Regards,