Seite 1 von 1

cross compile mit QT4.1.0

Verfasst: 22. Februar 2006 11:54
von Sumpi
Hi zusammen!

Ich hab ein Problem mit dem Cross-Kompilieren. Oder ich bin einfach zu blöd :-(
Wie sag ich meinem QT 4.1.0 unter Linux, dass es für MIPS kompilieren und linken soll? Ich hab versucht, die OpenSource-Variante ein zweites mal zu installieren und mit dem richtigen Compiler zu kompilieren.
Ich hab das mit folgendem Befehl versucht:
./configure -prefix /usr/local/Trolltech/Qt-4.1.0-mips -platform qws/linux-mips-g++
Leider stirbt das Teil dann. Was ich versuche, ist dem Configure mitzugeben, dass er auf der Linux-Plattform für die MIPS-Plattform kompilieren soll.

Kann mir da irgendjemand weiter helfen?

Danke im Voraus!
Sumpi

Verfasst: 22. Februar 2006 14:32
von BartSimpson
Du must eine komplette tool-chain bauen. angefangen mit den binutils über den crosscompiler bis hin zu den C libs

Verfasst: 22. Februar 2006 14:36
von Sumpi
BartSimpson hat geschrieben:Du must eine komplette tool-chain bauen. angefangen mit den binutils über den crosscompiler bis hin zu den C libs
Ich hab ein BoardSupportPackage für das Board. Allerdings lässt sich mein QT nicht dafür kompilieren. Derzeit bekomme ich folgende Fehler

In file included from /opt/emlix/netdcu6/include/sys/types.h:31,
from /opt/emlix/netdcu6/include/stdlib.h:433,
from ../../../include/QtCore/../../src/corelib/tools/qvector.h:36,
from ../../../include/QtCore/qvector.h:1,
from ../../../include/QtCore/QVector:1,
from symbols.h:29,
from scanner.h:27,
from moc.h:27,
from moc.cpp:24:
/opt/emlix/netdcu6/include/bits/types.h:127:3: error: #error
/opt/emlix/netdcu6/include/bits/types.h:136: error: ‘__UQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:140: error: ‘__UQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:142: error: ‘__UWORD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:144: error: ‘__SQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:149: error: ‘__UQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:172: error: ‘__SQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:176: error: ‘__UQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:180: error: ‘__UQUAD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:182: error: ‘__SWORD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:186: error: ‘__off64_t’ does not name a type
/opt/emlix/netdcu6/include/bits/types.h:191: error: ‘__SWORD_TYPE’ does not name a type
/opt/emlix/netdcu6/include/sys/types.h:46: error: ‘__loff_t’ does not name a type
/opt/emlix/netdcu6/include/sys/types.h:57: error: ‘__ino64_t’ does not name a type

und viele mehr, nachdem ich wie folgt konfiguriert hab:
./configure -prefix /usr/local/Trolltech/Qt-4.1.0-mips -platform qws/linux-x86-g++ -xplatform qws/linux-mips-g++ -I/opt/emlix/netdcu6/include -L/opt/emlix/netdcu6/lib
Irgendwie scheint er mit den Libs nicht klarzukommen.

Hast vielleicht eine Idee, woran das liegen könnte?

Danke!
Sumpi

Verfasst: 22. Februar 2006 14:42
von BartSimpson
in der Datei /opt/emlix/netdcu6/include/bits/types.h dort scheint es zu klemmen.

Verfasst: 27. Februar 2006 08:30
von Sumpi
BartSimpson hat geschrieben:in der Datei /opt/emlix/netdcu6/include/bits/types.h dort scheint es zu klemmen.
Ich hab das Problem hier gefunden. Ich hab dem Configure ein Define für die Wortlänge mitgegeben und jetzt funkt dieser Teil. Allerdings lehnt der ld die inkludierten Libraries ab, mit denen ich cross-compilen will. Ich bekomme immer folgende Meldungen:

Code: Alles auswählen

/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libdl.so when searching for -ldl
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libdl.a when searching for -ldl
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libstdc++.so when searching for -lstdc++
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libstdc++.a when searching for -lstdc++
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libm.so when searching for -lm
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libm.a when searching for -lm
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libgcc_s.so when searching for -lgcc_s
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: skipping incompatible /opt/emlix/netdcu6/lib/libc.so.6 when searching for /opt/emlix/netdcu6/lib/libc.so.6
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find /opt/emlix/netdcu6/lib/libc.so.6
collect2: ld returned 1 exit status
make[2]: *** [../../../bin/moc] Fehler 1
make[2]: Leaving directory `/home/sumpi/Software/qtopia-core-opensource-src-4.1.0/src/tools/moc'
make[1]: *** [sub-tools-moc-make_default-ordered] Fehler 2
make[1]: Leaving directory `/home/sumpi/Software/qtopia-core-opensource-src-4.1.0/src'
make: *** [sub-src-make_default-ordered] Fehler 2
Kennt das jemand und wenn ja, irgend eine Idee, was ich da tun kann?
Danke im Voraus!
Sumpi[/code]

Verfasst: 27. Februar 2006 09:34
von BartSimpson
Ich glaube es wird der falsche Linker benutzt. So wie ich das sehe wird der Linker des Compilers für X86 und nicht der aus deiner tool-chain benutzt.

Verfasst: 27. Februar 2006 09:40
von Sumpi
BartSimpson hat geschrieben:Ich glaube es wird der falsche Linker benutzt. So wie ich das sehe wird der Linker des Compilers für X86 und nicht der aus deiner tool-chain benutzt.
Da dürftest Du recht haben. Nur wie sag ich das dem Teil?
Schön langsam wird es wirklich lästig *sigh*

Bye,
Sumpi

Verfasst: 27. Februar 2006 10:51
von BartSimpson
Du must dem configure script sagen das er den Linker aus /opt/emlix...(da muste mal suchen, da sollte es ein extra linker und compiler geben).
Um zu testen ob das bisher überhaupt geklappt haste kannste mal eine Objektdatei nehmen, und schaue ob das Target überhaupt MIPS ist.
mittles file XXX.o
wenn die Ausgabe so aussieht, dann klappt deine ganze tool-chain nicht!!!
file moc_dlghaupt.o
moc_dlghaupt.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
denn dort müste denn statt Intel XXXXX MIPS stehen.

Verfasst: 27. Februar 2006 11:08
von Sumpi
BartSimpson hat geschrieben:Du must dem configure script sagen das er den Linker aus /opt/emlix...(da muste mal suchen, da sollte es ein extra linker und compiler geben).
ich verwende -embedded mips -platform qws/linux-x86-g++

Mein Problem ist aber folgendes:

Code: Alles auswählen

/qatomic32.s
arch/mips/qatomic32.s: Assembler messages:
arch/mips/qatomic32.s:9: Error: opcode not supported on this processor: mips1 (mips1) `ll $8,0($4)'
arch/mips/qatomic32.s:12: Error: opcode not supported on this processor: mips1 (mips1) `sc $2,0($4)'
arch/mips/qatomic32.s:24: Error: opcode not supported on this processor: mips1 (mips1) `ll $8,0($4)'
arch/mips/qatomic32.s:27: Error: opcode not supported on this processor: mips1 (mips1) `sc $2,0($4)'
arch/mips/qatomic32.s:32: Error: opcode not supported on this processor: mips1 (mips1) `sync'
arch/mips/qatomic32.s:40: Error: opcode not supported on this processor: mips1 (mips1) `sync'
arch/mips/qatomic32.s:41: Error: opcode not supported on this processor: mips1 (mips1) `ll $8,0($4)'
arch/mips/qatomic32.s:44: Error: opcode not supported on this processor: mips1 (mips1) `sc $2,0($4)'
arch/mips/qatomic32.s:56: Error: opcode not supported on this processor: mips1 (mips1) `ll $8,0($4)'
arch/mips/qatomic32.s:59: Error: opcode not supported on this processor: mips1 (mips1) `sc $2,0($4)'
make[3]: *** [.obj/debug-shared-emb-mips/qatomic32.o] Fehler 1
Ich hab keine Ahnung, was ich jetzt noch ändern muss, damit das endlich funktioniert. Linker und Compiler verwendet er den richtigen. Aber aus irgendeinem Grund haut es einfach nicht hin. Langsam bin ich am Verzweifeln!

Danke für Deine Tips!
Bye,
Sumpi

Verfasst: 27. Februar 2006 11:22
von BartSimpson
Ich kenne mich mit dem MIPS im Detail nicht aus, Aber ein Blick die Qt Quellen sagt, das Qt nur auf MIPS der Archhitektur 3 oder 4 läuft.
Und bei dir scheint es 1 zu sein. Falls dein System ein MIPS 3 oder 4 ist, must du evnetuell beim configure script statt mips mips3 bzw mips4 sagen.
Denn der Assembler versucht Code für die 3'er Architektur mit einem Assembler für die 1'er zu übersetzten.