* CMake error? CMAKE_AR-NOTFOUND
@ 2012-01-24 13:30 Samuel Stirtzel
2012-01-24 17:48 ` Richard Purdie
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Stirtzel @ 2012-01-24 13:30 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Hi,
currently I try to build a native software that needs CMake, it is a
required tool to cross compile another software.
An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND).
The cmake.bbclass has no entry about this.
By searching the web, the only information found was that it can be
set to ${GCC_PATH}/dld.
As I am usually not working with CMake where can I find the native
"ar" or "dld" executable in OpenEmbedded?
Using the archiver from my hosts /usr/bin/ar seems to be wrong since
in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )"
prohibits it.
Sorry for this stupid question.
--
Regards
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-24 13:30 CMake error? CMAKE_AR-NOTFOUND Samuel Stirtzel @ 2012-01-24 17:48 ` Richard Purdie 2012-01-25 7:56 ` Samuel Stirtzel 0 siblings, 1 reply; 8+ messages in thread From: Richard Purdie @ 2012-01-24 17:48 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: > Hi, > currently I try to build a native software that needs CMake, it is a > required tool to cross compile another software. > An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). > The cmake.bbclass has no entry about this. > > By searching the web, the only information found was that it can be > set to ${GCC_PATH}/dld. > As I am usually not working with CMake where can I find the native > "ar" or "dld" executable in OpenEmbedded? > > Using the archiver from my hosts /usr/bin/ar seems to be wrong since > in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" > prohibits it. In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you probably need to figure out ar from ${AR} and pass it to the cmake configuration. Note I know very little about cmake so I'm of less help with that piece ;-). Cheers, Richard ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-24 17:48 ` Richard Purdie @ 2012-01-25 7:56 ` Samuel Stirtzel 2012-01-25 8:31 ` Samuel Stirtzel 0 siblings, 1 reply; 8+ messages in thread From: Samuel Stirtzel @ 2012-01-25 7:56 UTC (permalink / raw) To: Patches and discussions about the oe-core layer 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: > On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: >> Hi, >> currently I try to build a native software that needs CMake, it is a >> required tool to cross compile another software. >> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). >> The cmake.bbclass has no entry about this. >> >> By searching the web, the only information found was that it can be >> set to ${GCC_PATH}/dld. >> As I am usually not working with CMake where can I find the native >> "ar" or "dld" executable in OpenEmbedded? >> >> Using the archiver from my hosts /usr/bin/ar seems to be wrong since >> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >> prohibits it. > > In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you > probably need to figure out ar from ${AR} and pass it to the cmake > configuration. > > Note I know very little about cmake so I'm of less help with that > piece ;-). After looking around in all ends of OE-core it shows up that this error is caused by binutils.inc. Finding ar would be no problem itself, but if the binary is not installed or gets deleted after building binutils-native it is impossible to locate it. In binutils.inc do_install: rm ${D}${bindir}/ar ${D}${bindir}/strings Well I still wonder why my target sysroot has ar if it gets deleted here... Anyone knows why ar is being removed in do_install? -- Regards Samuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-25 7:56 ` Samuel Stirtzel @ 2012-01-25 8:31 ` Samuel Stirtzel 2012-01-25 18:22 ` Khem Raj 2012-01-26 11:22 ` Richard Purdie 0 siblings, 2 replies; 8+ messages in thread From: Samuel Stirtzel @ 2012-01-25 8:31 UTC (permalink / raw) To: Patches and discussions about the oe-core layer 2012/1/25 Samuel Stirtzel <s.stirtzel@googlemail.com>: > 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: >> On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: >>> Hi, >>> currently I try to build a native software that needs CMake, it is a >>> required tool to cross compile another software. >>> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). >>> The cmake.bbclass has no entry about this. >>> >>> By searching the web, the only information found was that it can be >>> set to ${GCC_PATH}/dld. >>> As I am usually not working with CMake where can I find the native >>> "ar" or "dld" executable in OpenEmbedded? >>> >>> Using the archiver from my hosts /usr/bin/ar seems to be wrong since >>> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >>> prohibits it. >> >> In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you >> probably need to figure out ar from ${AR} and pass it to the cmake >> configuration. >> >> Note I know very little about cmake so I'm of less help with that >> piece ;-). > > After looking around in all ends of OE-core it shows up that this > error is caused by binutils.inc. > Finding ar would be no problem itself, but if the binary is not > installed or gets deleted after building binutils-native it is > impossible to locate it. > > In binutils.inc do_install: > rm ${D}${bindir}/ar ${D}${bindir}/strings Sorry I pasted the wrong line, this was for cross compiling. From the do_install_virtclass-native: # We only want libiberty, libbfd and libopcodes rm -rf ${D}${bindir} but the effect is still the same.. > > Well I still wonder why my target sysroot has ar if it gets deleted here... > > Anyone knows why ar is being removed in do_install? > > > -- > Regards > Samuel -- Regards Samuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-25 8:31 ` Samuel Stirtzel @ 2012-01-25 18:22 ` Khem Raj 2012-01-26 9:20 ` Samuel Stirtzel 2012-01-26 11:22 ` Richard Purdie 1 sibling, 1 reply; 8+ messages in thread From: Khem Raj @ 2012-01-25 18:22 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, Jan 25, 2012 at 12:31 AM, Samuel Stirtzel <s.stirtzel@googlemail.com> wrote: > 2012/1/25 Samuel Stirtzel <s.stirtzel@googlemail.com>: >> 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: >>> On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: >>>> Hi, >>>> currently I try to build a native software that needs CMake, it is a >>>> required tool to cross compile another software. >>>> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). >>>> The cmake.bbclass has no entry about this. >>>> >>>> By searching the web, the only information found was that it can be >>>> set to ${GCC_PATH}/dld. >>>> As I am usually not working with CMake where can I find the native >>>> "ar" or "dld" executable in OpenEmbedded? >>>> >>>> Using the archiver from my hosts /usr/bin/ar seems to be wrong since >>>> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >>>> prohibits it. >>> >>> In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you >>> probably need to figure out ar from ${AR} and pass it to the cmake >>> configuration. >>> >>> Note I know very little about cmake so I'm of less help with that >>> piece ;-). >> >> After looking around in all ends of OE-core it shows up that this >> error is caused by binutils.inc. >> Finding ar would be no problem itself, but if the binary is not >> installed or gets deleted after building binutils-native it is >> impossible to locate it. >> >> In binutils.inc do_install: >> rm ${D}${bindir}/ar ${D}${bindir}/strings > Sorry I pasted the wrong line, this was for cross compiling. > From the do_install_virtclass-native: > # We only want libiberty, libbfd and libopcodes > rm -rf ${D}${bindir} > > but the effect is still the same.. >> >> Well I still wonder why my target sysroot has ar if it gets deleted here... >> because its installed using post_install script. >> Anyone knows why ar is being removed in do_install? since post_install will install it as a symlink >> >> >> -- >> Regards >> Samuel > > > > -- > Regards > Samuel > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-25 18:22 ` Khem Raj @ 2012-01-26 9:20 ` Samuel Stirtzel 2012-01-26 10:53 ` Samuel Stirtzel 0 siblings, 1 reply; 8+ messages in thread From: Samuel Stirtzel @ 2012-01-26 9:20 UTC (permalink / raw) To: Patches and discussions about the oe-core layer 2012/1/25 Khem Raj <raj.khem@gmail.com>: > On Wed, Jan 25, 2012 at 12:31 AM, Samuel Stirtzel > <s.stirtzel@googlemail.com> wrote: >> 2012/1/25 Samuel Stirtzel <s.stirtzel@googlemail.com>: >>> 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: >>>> On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: >>>>> Hi, >>>>> currently I try to build a native software that needs CMake, it is a >>>>> required tool to cross compile another software. >>>>> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). >>>>> The cmake.bbclass has no entry about this. >>>>> >>>>> By searching the web, the only information found was that it can be >>>>> set to ${GCC_PATH}/dld. >>>>> As I am usually not working with CMake where can I find the native >>>>> "ar" or "dld" executable in OpenEmbedded? >>>>> >>>>> Using the archiver from my hosts /usr/bin/ar seems to be wrong since >>>>> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >>>>> prohibits it. >>>> >>>> In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you >>>> probably need to figure out ar from ${AR} and pass it to the cmake >>>> configuration. >>>> >>>> Note I know very little about cmake so I'm of less help with that >>>> piece ;-). >>> >>> After looking around in all ends of OE-core it shows up that this >>> error is caused by binutils.inc. >>> Finding ar would be no problem itself, but if the binary is not >>> installed or gets deleted after building binutils-native it is >>> impossible to locate it. >>> >>> In binutils.inc do_install: >>> rm ${D}${bindir}/ar ${D}${bindir}/strings >> Sorry I pasted the wrong line, this was for cross compiling. >> From the do_install_virtclass-native: >> # We only want libiberty, libbfd and libopcodes >> rm -rf ${D}${bindir} >> >> but the effect is still the same.. >>> >>> Well I still wonder why my target sysroot has ar if it gets deleted here... >>> > > because its installed using post_install script. > >>> Anyone knows why ar is being removed in do_install? > > since post_install will install it as a symlink > Well that made me wonder too, because yesterday I thought that it would use ${D}${bindir} instead of ${bindir}. Ok I double checked this and it looks strange... Everything further needs some explanation, looking up the used variables will explain why ar is missing. Therefore I added some quick debug stuff: die "D = ${D}, bindir = ${bindir}" -die 'D = /work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/image, bindir = /work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin' die "Target prefix = ${TARGET_PREFIX}" -die 'Target prefix = ' Inserted in the code this will look like the following (quotation marks only stand there for visibility): do_install_virtclass_native: rm -rf ${D}${bindir} rm -rf '/work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/image/work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin' do_pkg_postinst: update-alternatives --install ${bindir}/ar ar ${TARGET_PREFIX}ar 100 update-alternatives --install '/work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin'/ar ar ''ar 100 This looks pretty weird. It looks like ${bindir} should be "/work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/binutils-2.22/build.x86_64-linux.x86_64-linux/binutils/", where ar is located. Any ideas what went wrong? -- Regards Samuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-26 9:20 ` Samuel Stirtzel @ 2012-01-26 10:53 ` Samuel Stirtzel 0 siblings, 0 replies; 8+ messages in thread From: Samuel Stirtzel @ 2012-01-26 10:53 UTC (permalink / raw) To: Patches and discussions about the oe-core layer 2012/1/26 Samuel Stirtzel <s.stirtzel@googlemail.com>: > 2012/1/25 Khem Raj <raj.khem@gmail.com>: >> On Wed, Jan 25, 2012 at 12:31 AM, Samuel Stirtzel >> <s.stirtzel@googlemail.com> wrote: >>> 2012/1/25 Samuel Stirtzel <s.stirtzel@googlemail.com>: >>>> 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: >>>>> On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: >>>>>> Hi, >>>>>> currently I try to build a native software that needs CMake, it is a >>>>>> required tool to cross compile another software. >>>>>> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). >>>>>> The cmake.bbclass has no entry about this. >>>>>> >>>>>> By searching the web, the only information found was that it can be >>>>>> set to ${GCC_PATH}/dld. >>>>>> As I am usually not working with CMake where can I find the native >>>>>> "ar" or "dld" executable in OpenEmbedded? >>>>>> >>>>>> Using the archiver from my hosts /usr/bin/ar seems to be wrong since >>>>>> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >>>>>> prohibits it. >>>>> >>>>> In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you >>>>> probably need to figure out ar from ${AR} and pass it to the cmake >>>>> configuration. >>>>> >>>>> Note I know very little about cmake so I'm of less help with that >>>>> piece ;-). >>>> >>>> After looking around in all ends of OE-core it shows up that this >>>> error is caused by binutils.inc. >>>> Finding ar would be no problem itself, but if the binary is not >>>> installed or gets deleted after building binutils-native it is >>>> impossible to locate it. >>>> >>>> In binutils.inc do_install: >>>> rm ${D}${bindir}/ar ${D}${bindir}/strings >>> Sorry I pasted the wrong line, this was for cross compiling. >>> From the do_install_virtclass-native: >>> # We only want libiberty, libbfd and libopcodes >>> rm -rf ${D}${bindir} >>> >>> but the effect is still the same.. >>>> >>>> Well I still wonder why my target sysroot has ar if it gets deleted here... >>>> >> >> because its installed using post_install script. >> >>>> Anyone knows why ar is being removed in do_install? >> >> since post_install will install it as a symlink >> > Well that made me wonder too, because yesterday I thought that it > would use ${D}${bindir} instead of ${bindir}. > > Ok I double checked this and it looks strange... > Everything further needs some explanation, looking up the used > variables will explain why ar is missing. > > > Therefore I added some quick debug stuff: > die "D = ${D}, bindir = ${bindir}" > -die 'D = /work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/image, > bindir = /work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin' > die "Target prefix = ${TARGET_PREFIX}" > -die 'Target prefix = ' > > Inserted in the code this will look like the following (quotation marks where only inserted for visibility): > do_install_virtclass_native: > rm -rf ${D}${bindir} > rm -rf '/work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/image/work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin' > > do_pkg_postinst: > update-alternatives --install ${bindir}/ar ar ${TARGET_PREFIX}ar 100 > update-alternatives --install > '/work/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin'/ar ar ''ar > 100 > > > > This looks pretty weird. It looks like instead of ${bindir} it should point to > "/work/oe-core/tmp-eglibc/work/x86_64-linux/binutils-native-2.22-r2/binutils-2.22/build.x86_64-linux.x86_64-linux/binutils/", > where ar is located. > Any ideas what went wrong? Minor cleanup to make it easier to read. -- Regards Samuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CMake error? CMAKE_AR-NOTFOUND 2012-01-25 8:31 ` Samuel Stirtzel 2012-01-25 18:22 ` Khem Raj @ 2012-01-26 11:22 ` Richard Purdie 1 sibling, 0 replies; 8+ messages in thread From: Richard Purdie @ 2012-01-26 11:22 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 2012-01-25 at 09:31 +0100, Samuel Stirtzel wrote: > 2012/1/25 Samuel Stirtzel <s.stirtzel@googlemail.com>: > > 2012/1/24 Richard Purdie <richard.purdie@linuxfoundation.org>: > >> On Tue, 2012-01-24 at 14:30 +0100, Samuel Stirtzel wrote: > >>> Hi, > >>> currently I try to build a native software that needs CMake, it is a > >>> required tool to cross compile another software. > >>> An it seems that CMAKE_AR is set to an invalid value (CMAKE_AR-NOTFOUND). > >>> The cmake.bbclass has no entry about this. > >>> > >>> By searching the web, the only information found was that it can be > >>> set to ${GCC_PATH}/dld. > >>> As I am usually not working with CMake where can I find the native > >>> "ar" or "dld" executable in OpenEmbedded? > >>> > >>> Using the archiver from my hosts /usr/bin/ar seems to be wrong since > >>> in cmake.bbclass "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" > >>> prohibits it. > >> > >> In the same way the class figures out OECMAKE_C_COMPILER from ${CC}, you > >> probably need to figure out ar from ${AR} and pass it to the cmake > >> configuration. > >> > >> Note I know very little about cmake so I'm of less help with that > >> piece ;-). > > > > After looking around in all ends of OE-core it shows up that this > > error is caused by binutils.inc. > > Finding ar would be no problem itself, but if the binary is not > > installed or gets deleted after building binutils-native it is > > impossible to locate it. > > > > In binutils.inc do_install: > > rm ${D}${bindir}/ar ${D}${bindir}/strings > Sorry I pasted the wrong line, this was for cross compiling. > From the do_install_virtclass-native: > # We only want libiberty, libbfd and libopcodes > rm -rf ${D}${bindir} > > but the effect is still the same.. If you're after a native "ar", you should use ar from the build system itself. We do build binutils-native for some of its libraries to avoid some dependencies on the build system but ar is not something binutils-native should provide, we assume its there as part of the build systems toolchain. If you really need a native ar, you need to figure out how to get cmake to use "ar" from PATH. I had previously assumed you wanted to use the cross ar. Cheers, Richard ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-01-26 11:30 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-24 13:30 CMake error? CMAKE_AR-NOTFOUND Samuel Stirtzel 2012-01-24 17:48 ` Richard Purdie 2012-01-25 7:56 ` Samuel Stirtzel 2012-01-25 8:31 ` Samuel Stirtzel 2012-01-25 18:22 ` Khem Raj 2012-01-26 9:20 ` Samuel Stirtzel 2012-01-26 10:53 ` Samuel Stirtzel 2012-01-26 11:22 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox