[Solved] QT Console Hello World Program in Power PC based architecture with Linux <QtCore/qconfig-ppc.h>
Hi All, i am new to Power PC architecture, simple hello world program i tried to compile but got following error:
powerpc-wrs-linux-gnu-ppc_603e-glibc_std-g++ -Wno-deprecated -Wall -O2 -DNDEBUG -mstrict-align -D__POWER_PC_750 -D_GNU_SOURCE -D_REENTRANT -I/
cc1plus: warning: include location "/usr/include/" is unsafe for cross-compilation
In file included from /usr/include/QtCore/qglobal.h:62,
/usr/include/QtCore/qconfig.h:14: fatal error: QtCore/qconfig-ppc.h: No such file or directory
Please let me know if anybody know the solution.
Hi and welcome to devnet,
Are you trying to build for PPC on a x86 system ?
Actually i am building on PPC system only. I already have libQtCore.so.4 which is built on PPC. I just wrote a simple Hello World program (console mode) and i got the error:
fatal error: QtCore/qconfig-ppc.h: No such file or directory
Which version of Qt are you using ? How did you compile it ?
I am starting again from scratch. I have downloaded the source code QT 5.2.1 and i want to compile the source code in Linux Powerpc. We have Intel machine with Cross Compiler.
I tried giving the following command:
./configure -xplatform POWERPC -device-option CROSS_COMPILE=powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc
But i am getting following message after accepting the terms and conditions:
The specified system/compiler is not supported:
Please see the README file for a complete list.
Kindly let me know the correct way of compilation. Thanks
You should rather make a copy of e.g. linux-arm-gnueabi-g++ to linux-ppc-g++ and change the content of qmake.conf to match your cross-compiler then use that mkspec
Hi, Thanks for the reply. I did the same but got this error:
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.
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? yes
Precompiled-headers support enabled.
/opt/WindRiver20/gnu/4.1-wrlinux-2.0/x86-linux2/bin/powerpc-wrs-linux-gnu-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
/opt/WindRiver20/gnu/4.1-wrlinux-2.0/x86-linux2/bin/powerpc-wrs-linux-gnu-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
/opt/WindRiver20/gnu/4.1-wrlinux-2.0/x86-linux2/bin/../lib/gcc/powerpc-wrs-linux-gnu/4.1.2/../../../../powerpc-wrs-linux-gnu/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
/opt/WindRiver20/gnu/4.1-wrlinux-2.0/x86-linux2/bin/../lib/gcc/powerpc-wrs-linux-gnu/4.1.2/../../../../powerpc-wrs-linux-gnu/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
Symbolic function binding disabled.
Kindly give your inputs. Thanks
You still need to tell configure that you are cross-compiling like you would for an arm device
Thanks for your help :)
I am able to compile the QT source code in Linux, intel based machine using cross compilation - powerpc.
You're welcome !
Since the compilation is working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)