Skip to main content

Errors when compiling the arm xscale cvm

16 replies [Last post]
pigboy
Offline
Joined: 2006-03-08

I type the cmdline :

make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/ QT_TARGET_LIB_DIR=/usr/lib QT_TARGET_INCLUDE_DIR=/usr/lib/qt-3.3/include J2ME_CLASSLIB=basis

and it's always has a problems :

c++ ../../build/linux-arm-xscale/./obj/QtBackEnd.o
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:707:22: X11/Xlib.h: No such file or directory
../../src/share/basis/native/awt/qt/QtBackEnd.cpp: In function `QRgb*
defaultColorTable(int*)':
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:730: error: `Colormap'
undeclared (first use this function)
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:730: error: (Each undeclared
identifier is reported only once for each function it appears in.)
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:730: error: parse error
before `=' token
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:732: error: `XColor'
undeclared (first use this function)
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:732: error: `carr' undeclared
(first use this function)
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:732: error: parse error
before `[' token
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:737: error: `cmap' undeclared
(first use this function)
../../src/share/basis/native/awt/qt/QtBackEnd.cpp:737: error: `XQueryColors'
undeclared (first use this function)
make: *** [../../build/linux-arm-xscale/./obj/QtBackEnd.o] 错误 1

and it's the same if set j2me_classlib=personal also has a problem, can somebody tell me why ?
Many THX!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pigboy
Offline
Joined: 2006-03-08

i checked the makefile which is can def_qt_mk or something (i am on windows system now ,can't check the exact name for this ) , and i am sure this the right QT version for compiling required by phoneME, the version is qt-3.3.1

and i also try the version of QT -2.X.X ,the one also compatible,but i met the same problems.

According to the question of Dean,"where the qtthread.h exist or not ",i am not sure ,
but if i type in
make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/ QTEMBEDDED=true J2ME_CLASSLIB=basis

the mistake throwed is diffirent, so i doubt whether this is the problems of the version code ??

Any one , please tell how you make the cvm ,can you give am example to me, THX!

Message was edited by: pigboy

cjplummer
Offline
Joined: 2006-10-16

Can you clarify some things first?

What is your *host* system? If you are actually using your pxa270 *target* as your host, where is your java and javac implementation coming from? Just to be sure, type "uname -a" on your host and send us the output.

Where is QT located under /usr? If it is something like /usr/lib/qt2 or /usr/lib/qt3, then this is what QT_TARGET_DIR needs to be set to, not /usr. Note for QTEMBEDDED=true you need qt2 and for QTEMBEDDED=false you need to use qt3.

Please do a "find /usr -name qthread.h"

thanks,

Chris

pigboy
Offline
Joined: 2006-03-08

hi Chris ,
my host version is ;

Linux localhost.localdomain 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686 i686 i386 GNU/Linux

qt is on the /usr/lib/qt3.3/

and qtthread exist in it,

oK< wait for you reply !

cjplummer
Offline
Joined: 2006-10-16

Now we are back to my original statement. /usr/lib/qt3.3 is for linux/x86 targets, not linux/arm targets. You need to build a linux/arm version of QT. Also, since it is qt3, it is not meant for J2ME_CLASSLIB=basis QTEMBEDDED=true. If you set CVM_TARGET_DIR=/usr/lib/qt3.3, this might get you past the qthread.h problem, but you will run into other problems because it is the wrong version of qt (you need qt2) and it is the wrong target (you need a linux/arm qt build, not linux/x86).

Chris

pigboy
Offline
Joined: 2006-03-08

Thank you so much , and you are right if i don't set the QTEMBEDDED= true ,
and i will pass throuht the qtthread problems ,and meet others .
i did try on the version of qt2 when i was in my school lab , and it happened the same,
and why qt3.3 is for linux/x86, not for linux/arm , and if i want to make for arm target , how can i make it, what my need is to install the qt version 2?

So pity i have to off line now ,because the electricity is going off ,the school contrl it , see you tomorrow !

Hinkmond Wong

Hi PB,

phonemeadvanced@mobileandembedded.org wrote:
> Thank you so much , and you are right if i don't set the QTEMBEDDED= true ,
> and i will pass throuht the qtthread problems ,and meet others .
> i did try on the version of qt2 when i was in my school lab , and it happened the same,
> and why qt3.3 is for linux/x86, not for linux/arm , and if i want to make for arm target , how can i make it, what my need is to install the qt version 2?
>

For instructions on what a target Qt/Embedded lib is (compared to the
other Qt lib you found on your host system), how to use the Qt/Embedded
lib with a Linux/ARM target, where to download the source, and how to
build it so that you can compile correctly, please see:

http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedPlatforms...

Dan Sears has written a very detailed Wiki page (above) that gives you
all the instructions you need to build yourself the correct Qt/Embedded
lib for use with phoneME Advanced.

Hope this helps,
Hinkmond

> So pity i have to off line now ,because the electricity is going off ,the school contrl it , see you tomorrow !
> [Message sent by forum member 'pigboy' (pigboy)]
>
> http://forums.java.net/jive/thread.jspa?messageID=211066
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

pigboy
Offline
Joined: 2006-03-08

Hi Hinkmond Wong,
Thank you so much, this article really help me , but i still have problems,:

the guide line of that article is for phoneMe Advanced rm2 , and it's only availble for linux/x86? and my target device is linux/arm , what can i do ?
The mr1 can support many target devices, but i am suffering the mistakes of all above , is you having the same problems when you make the cvm under mr1?
thanks!
PB

pigboy
Offline
Joined: 2006-03-08

3721 Java strings
c++ ../../build/linux-arm-xscale/./obj/QtFontMetrics.o
c++ ../../build/linux-arm-xscale/./obj/QtGraphics.o
c++ ../../build/linux-arm-xscale/./obj/QtGraphicsConfiguration.o
c++ ../../build/linux-arm-xscale/./obj/QtGraphicsDevice.o
c++ ../../build/linux-arm-xscale/./obj/QtGraphicsEnv.o
c++ ../../build/linux-arm-xscale/./obj/QtImage.o
c++ ../../build/linux-arm-xscale/./obj/QtRobotHelper.o
c++ ../../build/linux-arm-xscale/./obj/QtToolkit.o
c++ ../../build/linux-arm-xscale/./obj/Window.o
c++ ../../build/linux-arm-xscale/./obj/QtBackEnd.o
c++ ../../build/linux-arm-xscale/./obj/QtApplication.o
c++ ../../build/linux-arm-xscale/./obj/QtSync.o
c++ ../../build/linux-arm-xscale/./obj/QtORB.o
c++ ../../build/linux-arm-xscale/./obj/QpObject.o
c++ ../../build/linux-arm-xscale/./obj/QpRobot.o
c++ ../../build/linux-arm-xscale/./obj/QtScreenFactory.o
cc ../../build/linux-arm-xscale/./obj/gifdecoder.o
Linking ../../build/linux-arm-xscale/./lib/libqtawt.so
/usr/local/arm-linux/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make: *** [../../build/linux-arm-xscale/./lib/libqtawt.so] 错误 1

after intalling qt-2.3.10 .t
and type in make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/local/qt-2.3.10/ X11_LIB_DIR=/usr/X11R6/lib J2ME_CLASSLIB=basis

this is the other problems i met >>>>

pigboy
Offline
Joined: 2006-03-08

cc ../../build/linux-arm-xscale/./obj/audioDevice.o
cc ../../build/linux-arm-xscale/./obj/embeddedframe.o
c++ ../../build/linux-arm-xscale/./obj/QtSync.o
In file included from ../../src/share/personal/native/awt/qt/QtSync.cc:22:
../../src/share/personal/native/awt/qt/QtSync.h:32:21: qthread.h: No such file or directory
In file included from ../../src/share/personal/native/awt/qt/QtSync.cc:22:
../../src/share/personal/native/awt/qt/QtSync.h:61: error: syntax error before
`*' token
../../src/share/personal/native/awt/qt/QtSync.h:63: error: 'QWaitCondition' is
used as a type, but is not defined as a type.
../../src/share/personal/native/awt/qt/QtSync.h:73: error: syntax error before
`*' token
../../src/share/personal/native/awt/qt/QtSync.h:74: error: parse error before `
}' token
../../src/share/personal/native/awt/qt/QtSync.h:82: error: syntax error before
`*' token
../../src/share/personal/native/awt/qt/QtSync.cc: In constructor `
QtCondVar::QtCondVar()':
../../src/share/personal/native/awt/qt/QtSync.cc:55: error: `m_mutex'
undeclared (first use this function)
../../src/share/personal/native/awt/qt/QtSync.cc:55: error: (Each undeclared
identifier is reported only once for each function it appears in.)
../../src/share/personal/native/awt/qt/QtSync.cc:55: error: parse error before
`(' token
../../src/share/personal/native/awt/qt/QtSync.cc: In member function `bool
QtCondVar::wait(long int)':
../../src/share/personal/native/awt/qt/QtSync.cc:75: error: `m_wait_condition'
undeclared (first use this function)
../../src/share/personal/native/awt/qt/QtSync.cc: In constructor `
QtReentrantMutex::QtReentrantMutex()':
../../src/share/personal/native/awt/qt/QtSync.cc:108: error: `NULL' undeclared
(first use this function)
../../src/share/personal/native/awt/qt/QtSync.cc:109: error: 'class
QtReentrantMutex' has no member named 'm_mutex'
../../src/share/personal/native/awt/qt/QtSync.cc:109: error: parse error before
`(' token
../../src/share/personal/native/awt/qt/QtSync.cc: In member function `void
QtReentrantMutex::lock()':
../../src/share/personal/native/awt/qt/QtSync.cc:118: error: `QThread'
undeclared (first use this function)
../../src/share/personal/native/awt/qt/QtSync.cc:118: error: parse error before
`::' token
../../src/share/personal/native/awt/qt/QtSync.cc:123: error: 'class
QtReentrantMutex' has no member named 'm_mutex'
../../src/share/personal/native/awt/qt/QtSync.cc: In member function `void
QtReentrantMutex::unlock()':
../../src/share/personal/native/awt/qt/QtSync.cc:131: error: parse error before
`::' token
../../src/share/personal/native/awt/qt/QtSync.cc:136: error: 'class
QtReentrantMutex' has no member named 'm_mutex'
make: *** [../../build/linux-arm-xscale/./obj/QtSync.o] 错误 1

when i try to compile the personal
make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/ AWT_IMPLEMENTATION=peer_based J2ME_CLASSLIB=personal

it also have the mistakes /

it's this ralate to CDC code mistakes or something else ?

pigboy
Offline
Joined: 2006-03-08

errors keep going ,how upset ,and more questions confuse me ,thanks for anyboby 's helping...

when i type in :

make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/lib/qt-2.3.1 X11_LIB_DIR=/usr/X11R6/lib AWT_LIB_LIBS= J2ME_CLASSLIB=basis

i can successed in build and pass throunht the error i met above , but when i try in to running on the target device ,whihc is Intel Xscale PXA270, it's ok to run the HelloWorld or something like that ,but if i try to run the java class with AWT requirement , i throws the error:

unstatisfyLin..... libqtawt.so

and please tell me , am i need AMS to launch the basis or personal profile?
and what is the command format of the
cvm -jar democlasses.jar -d DemoFrame -w 300 -h 300

and how to run the java classes in the jar .....

and what is this use..LD_LIBRRRARY= ????

ifeq ($(QT_VERSION), 3)
X11_LIBS ?= -L$(X11_LIB_DIR) -lXext -lX11 -lSM -lICE -lXft -lXrender -lXrandr -lXinerama
else
X11_LIBS ?= -L$(X11_LIB_DIR) -lXext -lX11 -lSM -lICE -lXft -lXrender
endif # QT_VERSION

how to change the -lXext to libXext.so ????

Many thanks!!!

cjplummer
Offline
Joined: 2006-10-16

You need to cross compile QT for linux-arm, and then set QT_TARGET_DIR to your linux-arm QT. You can leave off QT_TARGET_LIB_DIR and QT_TARGET_INCLUDE_DIR. They default to $(QT_TARGET_DIR)/lib and $(QT_TARGET_DIR)/include.

You probably also need to add QTEMBEDDED=true QTOPIA=false, unless your target's QT does indeed run on X11.

Chris

pigboy
Offline
Joined: 2006-03-08

make CVM_TARGET_TOOLS_PREFIX=arm-linux- QT_TARGET_DIR=/usr/ QTEMBEDDED=true QTOPIA=false J2ME_CLASSLIB=basis

still mistakes even i type in the cmd like the above .

So confuse , Need help!

cjplummer
Offline
Joined: 2006-10-16

I doubt if /usr contains a qt build meant for your linux/arm target. It is meant for the host. You still need to build QT for the target and point QT_TARGET_DIR to the build.

Chris

pigboy
Offline
Joined: 2006-03-08

Thx, but i am sure that the /uer/ has the qt library. Otherwise the it will throw the QT_TARGET_LIB_DIR or something .

i am build on the machine pxa270 ,and using the arm-linux tools to compile the make file.

Is anyone having the some problems like this?

cjplummer
Offline
Joined: 2006-10-16

I'm also sure that /usr has QT in it. However, it is most likely the wrong one and is meant for compiling QT applications that will run on the host, not ones that will run on your linux/arm target. This is why I've been saying that you need to cross compile a version of QT that runs on your target, or possibly your toolchain already supplies one.

Chris

xyzzy
Offline
Joined: 2006-08-30

He said he built on the pxa270, which I assume is the target, so I guess the obvious question is: does qthread.h exist under /usr/lib/qt-3.3/include? Maybe it only exists in the multi-threaded version of QT?

Dean