From: swhopkins <swh...@gm...> - 2008-07-06 18:10:57
|
I have an application that I'd like to run on the gumstix, but I'm having all sorts of trouble compiling it. It works fine on my host computer, and relies on pthread, so normally I'd go: g++ -o sicktest *.cc -pthread to compile it How do I cross compile it for the gumstix? I tried writing a bitbake recipe, but I'm getting all sorts of errors. here is my bitbake recipe: DESCRIPTION = "sick test" PR = "r0" DEPENDS = "" SRC_URI = " \ file://SickBufferMonitor.hh \ file://SickConfig.hh \ file://SickException.hh \ file://SickLIDAR.hh \ file://SickLMS.hh \ file://SickLMS.cc \ file://SickLMSBufferMonitor.hh \ file://SickLMSBufferMonitor.cc \ file://SickLMSMessage.hh \ file://SickLMSMessage.cc \ file://SickLMSUtility.hh \ file://SickMessage.hh \ file://lms_scan.cc \ " S = "${WORKDIR}" do_compile () { ${CC} ${CFLAGS} ${LDFLAGS} -o sicktest *.cc -pthread } do_install () { install -d ${D}${bindir}/ install -m 0755 ${S}/hello ${D}${bindir}/ } FILES_${PN} = "${bindir}/sicktest" Can someone tell me what I need to do to get this to compile? Also, I dont know if pthread is already on the gumstix or not. So if not, how would I compile that as well?? thanks a lot. Stephen |
From: Mark A. <m_a...@co...> - 2008-07-06 18:28:37
|
Hi, it would be best if you could post the errors you are getting. You may find these in the log files under something like run_do_compile, or something like that. Not sure about whether or not pthreads are included by default. I am waiting for my Gumstix to arrive so I can restart playing around with one and see. 'mark swhopkins wrote: > I have an application that I'd like to run on the gumstix, but I'm having all > sorts of trouble compiling it. > > It works fine on my host computer, and relies on pthread, so normally I'd go: > g++ -o sicktest *.cc -pthread > to compile it > > How do I cross compile it for the gumstix? I tried writing a bitbake recipe, > but I'm getting all sorts of errors. > > here is my bitbake recipe: > > DESCRIPTION = "sick test" > > PR = "r0" > > DEPENDS = "" > > SRC_URI = " \ > file://SickBufferMonitor.hh \ > file://SickConfig.hh \ > file://SickException.hh \ > file://SickLIDAR.hh \ > file://SickLMS.hh \ > file://SickLMS.cc \ > file://SickLMSBufferMonitor.hh \ > file://SickLMSBufferMonitor.cc \ > file://SickLMSMessage.hh \ > file://SickLMSMessage.cc \ > file://SickLMSUtility.hh \ > file://SickMessage.hh \ > file://lms_scan.cc \ > " > > S = "${WORKDIR}" > > do_compile () { > ${CC} ${CFLAGS} ${LDFLAGS} -o sicktest *.cc -pthread > } > > do_install () { > install -d ${D}${bindir}/ > install -m 0755 ${S}/hello ${D}${bindir}/ > } > > FILES_${PN} = "${bindir}/sicktest" > > > Can someone tell me what I need to do to get this to compile? Also, I dont know > if pthread is already on the gumstix or not. So if not, how would I compile > that as well?? > > thanks a lot. > > Stephen > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: swhopkins <swh...@gm...> - 2008-07-06 18:42:02
|
Hi Mark, I'm getting a whole bunch of undefined references (as far as my terminal can scroll), such as: | lms_scan.cc:(.text._ZN9__gnu_cxx13new_allocatorIdE10deallocateEPdj[__gnu_cxx: :new_allocator<double>::deallocate(double*, unsigned int)]+0x4): undefined reference to `operator delete(void*)' Based on that, I'm assuming it is some sort of linking error since everything works fine on my host machine. I just don't know how to properly create a recipe for my program. Or alternatively, is there a way I can just directly use g++ to cross compile, instead of messing with this bitbake stuff? Then I could just copy over my executable to the gumstix. Thanks Stephen |
From: Mark A. <m_a...@co...> - 2008-07-06 19:07:23
|
Hi, one time when I was having problems with OE and bitbake (which has little support) was to make my app on my desktop for my desktop, I caputred the std. outptut using nohup. Then I replaced every compile string with the proper path to the cross compiler which is installed in the gumstix-oe directory (well further down where all the x-compilers are stored). THen I ran that modified output as a shell script and it worked. I also had to replace where the original code called the archive tool (AR) or linker, etc. 'mark swhopkins wrote: > Hi Mark, > > I'm getting a whole bunch of undefined references (as far as my terminal can > scroll), such as: > > | lms_scan.cc:(.text._ZN9__gnu_cxx13new_allocatorIdE10deallocateEPdj[__gnu_cxx: > :new_allocator<double>::deallocate(double*, unsigned int)]+0x4): undefined > reference to `operator delete(void*)' > > > Based on that, I'm assuming it is some sort of linking error since everything > works fine on my host machine. I just don't know how to properly create a > recipe for my program. > > Or alternatively, is there a way I can just directly use g++ to cross compile, > instead of messing with this bitbake stuff? Then I could just copy over my > executable to the gumstix. > > Thanks > > Stephen > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: swhopkins <swh...@gm...> - 2008-07-06 19:35:20
|
Thanks Mark. Do you know where the cross compilers are stored? I can't find them. stephen |
From: swhopkins <swh...@gm...> - 2008-07-06 19:54:17
|
ok, nevermind, got everything working In case other people have a problem: I just compiled with gumstix/gumstix-oe/tmp/cross/bin/arm-angstrom-linux-gnueabi-g++ Compiling: arm-angstrom-linux-gnueabi-g++ -o lms_scan *.cc -pthread created a binary, which i could transfer to the gumstix and everything worked I just had to install libstdc++ stephen |