Reply
Thread Tools
Posts: 9 | Thanked: 2 times | Joined on Oct 2009
#1
I ran to an error while compiling project on Armel.
I'm totally noob on hardware programming.

Project is looking for machine.h file from system when compiling on arm.

Code:
#if OGRE_CPU == OGRE_CPU_ARM
        #include <sys/sysctl.h>
        #include <mach/machine.h>
#endif
I just can't find it on my system. So is it named differently
or do I need to install some development packages ?

I guess there is defined CTL_HW and HW_MODEL variables too.

Code:
[  1%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgrePlatformInformation.cpp.o
/home/henri/ogre/OgreMain/src/OgrePlatformInformation.cpp:45:34: error: mach/machine.h: No such file or directory
/home/henri/ogre/OgreMain/src/OgrePlatformInformation.cpp: In function 'Ogre::String Ogre::_detectCpuIdentifier()':
/home/henri/ogre/OgreMain/src/OgrePlatformInformation.cpp:533: error: 'CTL_HW' was not declared in this scope
/home/henri/ogre/OgreMain/src/OgrePlatformInformation.cpp:533: error: 'HW_MODEL' was not declared in this scope
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgrePlatformInformation.cpp.o] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2
Thanks for any help !!
I'm running Maemo 5 sdk in scratchbox

Last edited by vectori; 2009-10-20 at 09:55.
 
Posts: 25 | Thanked: 12 times | Joined on Mar 2008 @ Warsaw, Poland
#2
That seems odd. The "mach/machine.h" doesn't look like it's one of the standard system or kernel headers - couldn't find the machine.h file in kernel sources nor under /usr/include on my gentoo-running arm box (no, not beagle board).
Probably it's one of the Ogre toolkit headers. Sure you've got them installed?

Last edited by arachnist; 2009-10-20 at 10:32. Reason: typo
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#3
(maybe-offtopic) Are you sure Ogre 3D supports OpenGL ES?
 
Posts: 9 | Thanked: 2 times | Joined on Oct 2009
#4
Yes, it supports OpenGL ES. That support is only implemented in unreleased version. OGRE runs fine on iPhone so why not in N900.
Well I managed to create a pretty awful hack for that problem and it works .. so that header problem is solved.

but I found new one.. a very small problem but I don't know how to fix it.

Code:
Linking CXX executable ../../bin/OgreXMLConverter
../../lib/libOgreMain.so.1.7.0: undefined reference to `pthread_mutexattr_setkind_np(pthread_mutexattr_t*, int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/OgreXMLConverter] Error 1
make[1]: *** [Tools/XMLConverter/CMakeFiles/OgreXMLConverter.dir/all] Error 2
make: *** [all] Error 2
I don't know what is the problem..

Last edited by vectori; 2009-10-20 at 14:15.
 

The Following User Says Thank You to vectori For This Useful Post:
Posts: 452 | Thanked: 522 times | Joined on Nov 2007
#5
Not sure if this will help you -- but what I did with the stuff I have been porting over is I kept a fresh pristine copy of the packages extracted and when I ran into weird issues that make clean wouldn't fix I would just move over any source code changes into to my pristine "backup" copy. Then I would delete the working copy and then copy the backup copy back to be a new working copy. Then I would run configure, cmake or whatever needed to be ran to set it up the project again.

I found that by default I would do this when I switched between x86 to armel mode. ./configure (or cmake) would cache things for the other enviroment and so unless I reset the entire project it would have weird issues.

So my solution of a un-configured/un-cmaked/un-maked pristine source "backup" seems to work the best and be the most reliable.

The only "gotcha" is you need to make sure you copy any source code "fixes" to your pristine backup copy before you ditch your old working copy.

Nathan.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#6
but I found new one.. a very small problem but I don't know how to fix it.
How old is that code?

You may find that fn is deprecated. From a quick Google, it looks like you should be using pthread_mutexattr_settype() instead.
 

The Following 2 Users Say Thank You to lardman For This Useful Post:
Posts: 9 | Thanked: 2 times | Joined on Oct 2009
#7
I'm not sure how old it is.. it's newest version of OGRE.

but I will try that other function..
 
Posts: 25 | Thanked: 12 times | Joined on Mar 2008 @ Warsaw, Poland
#8
Originally Posted by vectori View Post
Yes, it supports OpenGL ES. That support is only implemented in unreleased version. OGRE runs fine on iPhone so why not in N900.
Well I managed to create a pretty awful hack for that problem and it works .. so that header problem is solved.

but I found new one.. a very small problem but I don't know how to fix it.

I don't know what is the problem..
Tried adding -lpthread to your linker flags/compiler flags?
 
Posts: 9 | Thanked: 2 times | Joined on Oct 2009
#9
Originally Posted by lardman View Post
How old is that code?

You may find that fn is deprecated. From a quick Google, it looks like you should be using pthread_mutexattr_settype() instead.
Thanks ! now it's compiling fine.

I really got OGRE 1.7 compiled on Maemo 5 Armel target.
And I compiled my Qt&OGRE project succesfully..

Is there any way to confirm that binary works ? I don't have N900 or any other similar device.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:51.