All of lore.kernel.org
 help / color / mirror / Atom feed
* bitbake with cmake recipe
@ 2013-08-22 10:30 Zafrullah Syed
  2013-08-22 10:31 ` Burton, Ross
  0 siblings, 1 reply; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-22 10:30 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hi all,

I am trying to integrate my own package which should use cmake.
I regularly use do_compile() and do_install().

when try this with cmake it fails with error: unparsed line: 'do_compile()'
.

Should I follow this guide in writing my own recipe with cmake?
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/cmake/cmake_2.8.11.2.bb

or it would be helpful if anyone can give me some hints regarding writing
recipes with cmake.

Thanks & Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 1472 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 10:30 bitbake with cmake recipe Zafrullah Syed
@ 2013-08-22 10:31 ` Burton, Ross
  2013-08-22 10:35   ` Zafrullah Syed
  0 siblings, 1 reply; 13+ messages in thread
From: Burton, Ross @ 2013-08-22 10:31 UTC (permalink / raw)
  To: Zafrullah Syed; +Cc: yocto

On 22 August 2013 11:30, Zafrullah Syed <zafrullahmehdi@gmail.com> wrote:
> I am trying to integrate my own package which should use cmake.
> I regularly use do_compile() and do_install().

Pasting your recipe would be useful, but there's a cmake class you can
simply inherit that should just work.

Ross


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 10:31 ` Burton, Ross
@ 2013-08-22 10:35   ` Zafrullah Syed
  2013-08-22 13:40     ` Zafrullah Syed
  0 siblings, 1 reply; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-22 10:35 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

Hi,

My recipe is: http://pastebin.com/xiFdYHNr

Is the cmake recipe will be in this
location? /home/siguser/yocto/poky/meta-openembedded/meta-oe/recipes-support/opencv


On Thu, Aug 22, 2013 at 12:31 PM, Burton, Ross <ross.burton@intel.com>wrote:

> On 22 August 2013 11:30, Zafrullah Syed <zafrullahmehdi@gmail.com> wrote:
> > I am trying to integrate my own package which should use cmake.
> > I regularly use do_compile() and do_install().
>
> Pasting your recipe would be useful, but there's a cmake class you can
> simply inherit that should just work.
>
> Ross
>



-- 
Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 1436 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 10:35   ` Zafrullah Syed
@ 2013-08-22 13:40     ` Zafrullah Syed
  2013-08-22 14:14       ` Burton, Ross
  0 siblings, 1 reply; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-22 13:40 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

Hi Ross,

Is this the correct way to write my recipe with cmake?

DESCRIPTION = "cameracapture application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"

DEPENDS += "opencv"

SRC_URI = "git://
https://github.com/zafrullahsyed/cameracapture.git;protocol=https;tag=v0.1"

EXTRA_OECMAKE=""

do_configure() {
 cmake ../
}

inherit pkgconfig cmake

Thanks & Regards,
Zafrullah.


On Thu, Aug 22, 2013 at 12:35 PM, Zafrullah Syed
<zafrullahmehdi@gmail.com>wrote:

> Hi,
>
> My recipe is: http://pastebin.com/xiFdYHNr
>
> Is the cmake recipe will be in this
> location? /home/siguser/yocto/poky/meta-openembedded/meta-oe/recipes-support/opencv
>
>
> On Thu, Aug 22, 2013 at 12:31 PM, Burton, Ross <ross.burton@intel.com>wrote:
>
>> On 22 August 2013 11:30, Zafrullah Syed <zafrullahmehdi@gmail.com> wrote:
>> > I am trying to integrate my own package which should use cmake.
>> > I regularly use do_compile() and do_install().
>>
>> Pasting your recipe would be useful, but there's a cmake class you can
>> simply inherit that should just work.
>>
>> Ross
>>
>
>
>
> --
> Regards,
> Zafrullah Syed
>
>


-- 
Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 3042 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 13:40     ` Zafrullah Syed
@ 2013-08-22 14:14       ` Burton, Ross
  2013-08-22 14:20         ` Philip Balister
  0 siblings, 1 reply; 13+ messages in thread
From: Burton, Ross @ 2013-08-22 14:14 UTC (permalink / raw)
  To: Zafrullah Syed; +Cc: yocto

On 22 August 2013 14:40, Zafrullah Syed <zafrullahmehdi@gmail.com> wrote:
> Hi Ross,
>
> Is this the correct way to write my recipe with cmake?

You should be able to remove your do_configure().

Ross


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 14:14       ` Burton, Ross
@ 2013-08-22 14:20         ` Philip Balister
  2013-08-22 18:13           ` Zafrullah Syed
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Balister @ 2013-08-22 14:20 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Zafrullah Syed, yocto

On 08/22/2013 10:14 AM, Burton, Ross wrote:
> On 22 August 2013 14:40, Zafrullah Syed <zafrullahmehdi@gmail.com> wrote:
>> Hi Ross,
>>
>> Is this the correct way to write my recipe with cmake?
> 
> You should be able to remove your do_configure().

This recipe uses cmake:

http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/gnuradio/gnuradio_git.bb

Hoepfully, it is more complicated than you need, but you should be able
to see the cmake related parts.

Philip

> 
> Ross
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 14:20         ` Philip Balister
@ 2013-08-22 18:13           ` Zafrullah Syed
  2013-08-23  7:01             ` Lukas Bulwahn
  2013-08-23  7:09             ` Stefan Herbrechtsmeier
  0 siblings, 2 replies; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-22 18:13 UTC (permalink / raw)
  To: Philip Balister; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3377 bytes --]

Hi all,

I am newbie and I am learning stuff.

I have a c++ code and CMakeLists.txt on Github which needs to be run with
Cmake. I am trying to get that code embed into my build using my own
recipe. This is my first experience with Cmake. I have no clue what should
I write in my recipe.

My recipe is as follows:

DESCRIPTION = "cameracapture application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"

DEPENDS += "opencv"
inherit cmake pkgconfig

SRC_URI = "git://
github.com/zafrullahsyed/cameracapture.git;protocol=https;tag=v0.1"

do_configure() {
    ${BUILD_CXX} cameracapture.cpp -o cameracapture
    }

EXTRA_OECMAKE=""

I know this recipe is wrong, I looked up many other recipes that use Cmake
http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/gnuradio/gnuradio_git.bb

each of them have their own parameters and functions.

Everytime I build my system I get this error:

ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
for further information)
ERROR: Logfile of failure stored in:
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| CMake Error: The source directory
"/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1"
does not appear to contain CMakeLists.txt.
| Specify --help for usage, or press the help button on the CMake GUI.
| ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
for further information)
ERROR: Task 579
(/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/
cameracapture_0.1.bb, do_configure) failed with exit code '1'

I have no clue what I should write in my recipe file. Yocto doesn't have
any tutorial for this.

Can anyone give some hints where I am doing wrong or what should be
included in my recipe?



On Thu, Aug 22, 2013 at 4:20 PM, Philip Balister <philip@balister.org>wrote:

> On 08/22/2013 10:14 AM, Burton, Ross wrote:
> > On 22 August 2013 14:40, Zafrullah Syed <zafrullahmehdi@gmail.com>
> wrote:
> >> Hi Ross,
> >>
> >> Is this the correct way to write my recipe with cmake?
> >
> > You should be able to remove your do_configure().
>
> This recipe uses cmake:
>
>
> http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/gnuradio/gnuradio_git.bb
>
> Hoepfully, it is more complicated than you need, but you should be able
> to see the cmake related parts.
>
> Philip
>
> >
> > Ross
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
> >
>



-- 
Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 5346 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 18:13           ` Zafrullah Syed
@ 2013-08-23  7:01             ` Lukas Bulwahn
  2013-08-23  7:09             ` Stefan Herbrechtsmeier
  1 sibling, 0 replies; 13+ messages in thread
From: Lukas Bulwahn @ 2013-08-23  7:01 UTC (permalink / raw)
  To: 'Zafrullah Syed', 'Philip Balister'; +Cc: 'yocto'

[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]


Everytime I build my system I get this error:

ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/camera
capture-0.1-r0/temp/log.do_configure.1410 for further information)
ERROR: Logfile of failure stored in:
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/camera
capture-0.1-r0/temp/log.do_configure.1410
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| CMake Error: The source directory
"/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/camer
acapture-0.1-r0/cameracapture-0.1" does not appear to contain
CMakeLists.txt.
| Specify --help for usage, or press the help button on the CMake GUI.
| ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/camera
capture-0.1-r0/temp/log.do_configure.1410 for further information)
ERROR: Task 579
(/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/cameracaptu
re_0.1.bb, do_configure) failed with exit code '1'

I have no clue what I should write in my recipe file. Yocto doesn't have any
tutorial for this.

Can anyone give some hints where I am doing wrong or what should be included
in my recipe?



I believe you must set the S variable in your recipe.

Probably, you must set it to

S = "${WORKDIR}/git"

You just have to look where your sources are located under
"/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/camer
acapture-0.1-r0/cameracapture-0.1", and set this subdirectory:

S = "${WORKDIR}/subdirectory".


Lukas Bulwahn, BMW Car IT GmbH

[-- Attachment #2: Type: text/html, Size: 5427 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-22 18:13           ` Zafrullah Syed
  2013-08-23  7:01             ` Lukas Bulwahn
@ 2013-08-23  7:09             ` Stefan Herbrechtsmeier
  2013-08-25 15:03               ` Zafrullah Syed
  1 sibling, 1 reply; 13+ messages in thread
From: Stefan Herbrechtsmeier @ 2013-08-23  7:09 UTC (permalink / raw)
  To: Zafrullah Syed; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3318 bytes --]

Am 22.08.2013 20:13, schrieb Zafrullah Syed:
> Hi all,
>
> I am newbie and I am learning stuff.
>
> I have a c++ code and CMakeLists.txt on Github which needs to be run 
> with Cmake. I am trying to get that code embed into my build using my 
> own recipe. This is my first experience with Cmake. I have no clue 
> what should I write in my recipe.
>
> My recipe is as follows:
>
> DESCRIPTION = "cameracapture application"
> SECTION = "examples"
> LICENSE = "CLOSED"
> PR = "r0"
>
> DEPENDS += "opencv"
> inherit cmake pkgconfig
>
> SRC_URI = 
> "git://github.com/zafrullahsyed/cameracapture.git;protocol=https;tag=v0.1 
> <http://github.com/zafrullahsyed/cameracapture.git;protocol=https;tag=v0.1>"
>
> do_configure() {
>     ${BUILD_CXX} cameracapture.cpp -o cameracapture
>     }
Why you want to compile something during configure? Remove this function.

>
> EXTRA_OECMAKE=""
You don't need this if you don't need to pass additional definitions to 
cmake.

>
> I know this recipe is wrong, I looked up many other recipes that use Cmake
> http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/gnuradio/gnuradio_git.bb
>
> each of them have their own parameters and functions.
>
> Everytime I build my system I get this error:
>
> ERROR: Function failed: do_configure (see 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410 
> for further information)
> ERROR: Logfile of failure stored in: 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
> Log data follows:
> | DEBUG: Executing python function sysroot_cleansstate
> | DEBUG: Python function sysroot_cleansstate finished
> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 
> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 
> 'common']
> | DEBUG: Executing shell function autotools_preconfigure
> | DEBUG: Shell function autotools_preconfigure finished
> | DEBUG: Executing shell function do_configure
> | CMake Error: The source directory 
> "/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1" 
> does not appear to contain CMakeLists.txt.
Are you sure this directory exists and contain the CMakeLists.txt file? 
Maybe you have to adjust the S variable to point to the directory of 
your source code.

> | Specify --help for usage, or press the help button on the CMake GUI.
> | ERROR: Function failed: do_configure (see 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410 
> for further information)
> ERROR: Task 579 
> (/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/cameracapture_0.1.bb 
> <http://cameracapture_0.1.bb>, do_configure) failed with exit code '1'
>
> I have no clue what I should write in my recipe file. Yocto doesn't 
> have any tutorial for this.
>
> Can anyone give some hints where I am doing wrong or what should be 
> included in my recipe?
You can take a look at one of my simple recipes:
http://opensource.cit-ec.de/projects/meta-openrobotix/repository/revisions/master/entry/recipes-connectivity/rsb/rsb_git.bb


[-- Attachment #2: Type: text/html, Size: 6050 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-23  7:09             ` Stefan Herbrechtsmeier
@ 2013-08-25 15:03               ` Zafrullah Syed
  2013-08-25 18:10                 ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-25 15:03 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 7205 bytes --]

Hi Stefan,

I updated my recipe:

DESCRIPTION = "cameracapture application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"

DEPENDS = "opencv"

SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git
;protocol=https;tag=v0.1"

S = "${WORKDIR}/git"
inherit pkgconfig cmake

I have my source file and CMakeLists.txt as tar on github. tar is not
getting downloaded.

--> If I remove tar and keep just source file and CMakeLists.txt, then also
it is not getting downloaded. I am getting

CMake Error: The source directory
"/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1"
does not appear to contain CMakeLists.txt.

--> I copied my CMakeLists.txt file in ${WORKDIR}/git and tried the build,
got this following error:

ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
for further information)
ERROR: Logfile of failure stored in:
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| CMake Error at
/home/siguser/yocto/build/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:95
(MESSAGE):
|   Could not find toolchain file:
|
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/toolchain.cmake
| Call Stack (most recent call first):
|   CMakeLists.txt:2 (project)
|
|
| CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
| Missing variable is:
| CMAKE_C_COMPILER_ENV_VAR
| CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
| Missing variable is:
| CMAKE_C_COMPILER
| CMake Error: Could not find cmake module
file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCCompiler.cmake
| CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
| Missing variable is:
| CMAKE_CXX_COMPILER_ENV_VAR
| CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
| Missing variable is:
| CMAKE_CXX_COMPILER
| CMake Error: Could not find cmake module
file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCXXCompiler.cmake
| CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
| CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
| -- Configuring incomplete, errors occurred!
| ERROR: Function failed: do_configure (see
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
for further information)
ERROR: Task 6
(/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/
cameracapture_0.1.bb, do_configure) failed with exit code '1'

Do I need to set CXX Compiler in my CMakeLists.txt?

My CmakeLists.txt file:

cmake_minimum_required(VERSION 2.8)
project(cameracapture)
find_package( OpenCV REQUIRED )
add_executable( cameracapture cameracapture.cpp )
target_link_libraries( cameracapture ${OpenCV_LIBS} )

Can you please give me some inputs?

Thanks & Regards,

Zafrullah
Universität Paderborn.


On Fri, Aug 23, 2013 at 9:09 AM, Stefan Herbrechtsmeier <
stefan@herbrechtsmeier.net> wrote:

>  Am 22.08.2013 20:13, schrieb Zafrullah Syed:
>
> Hi all,
>
>  I am newbie and I am learning stuff.
>
>  I have a c++ code and CMakeLists.txt on Github which needs to be run
> with Cmake. I am trying to get that code embed into my build using my own
> recipe. This is my first experience with Cmake. I have no clue what should
> I write in my recipe.
>
>  My recipe is as follows:
>
>  DESCRIPTION = "cameracapture application"
> SECTION = "examples"
> LICENSE = "CLOSED"
> PR = "r0"
>
>  DEPENDS += "opencv"
> inherit cmake pkgconfig
>
>  SRC_URI = "git://
> github.com/zafrullahsyed/cameracapture.git;protocol=https;tag=v0.1"
>
>  do_configure() {
>     ${BUILD_CXX} cameracapture.cpp -o cameracapture
>     }
>
> Why you want to compile something during configure? Remove this function.
>
>
>  EXTRA_OECMAKE=""
>
> You don't need this if you don't need to pass additional definitions to
> cmake.
>
>
>
>  I know this recipe is wrong, I looked up many other recipes that use
> Cmake
>
> http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/gnuradio/gnuradio_git.bb
>
>  each of them have their own parameters and functions.
>
>  Everytime I build my system I get this error:
>
>  ERROR: Function failed: do_configure (see
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
> for further information)
> ERROR: Logfile of failure stored in:
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
> Log data follows:
> | DEBUG: Executing python function sysroot_cleansstate
> | DEBUG: Python function sysroot_cleansstate finished
> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
> | DEBUG: Executing shell function autotools_preconfigure
> | DEBUG: Shell function autotools_preconfigure finished
> | DEBUG: Executing shell function do_configure
> | CMake Error: The source directory
> "/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1"
> does not appear to contain CMakeLists.txt.
>
> Are you sure this directory exists and contain the CMakeLists.txt file?
> Maybe you have to adjust the S variable to point to the directory of your
> source code.
>
>
>   | Specify --help for usage, or press the help button on the CMake GUI.
> | ERROR: Function failed: do_configure (see
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.1410
> for further information)
> ERROR: Task 579
> (/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/
> cameracapture_0.1.bb, do_configure) failed with exit code '1'
>
>  I have no clue what I should write in my recipe file. Yocto doesn't have
> any tutorial for this.
>
>  Can anyone give some hints where I am doing wrong or what should be
> included in my recipe?
>
> You can take a look at one of my simple recipes:
>
> http://opensource.cit-ec.de/projects/meta-openrobotix/repository/revisions/master/entry/recipes-connectivity/rsb/rsb_git.bb
>
>


-- 
Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 11396 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-25 15:03               ` Zafrullah Syed
@ 2013-08-25 18:10                 ` Stefan Herbrechtsmeier
  2013-08-26 12:42                   ` Zafrullah Syed
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Herbrechtsmeier @ 2013-08-25 18:10 UTC (permalink / raw)
  To: Zafrullah Syed; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 4879 bytes --]

Am 25.08.2013 17:03, schrieb Zafrullah Syed:
> Hi Stefan,
>
> I updated my recipe:
>
> DESCRIPTION = "cameracapture application"
> SECTION = "examples"
> LICENSE = "CLOSED"
> PR = "r0"
>
> DEPENDS = "opencv"
>
> SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git 
> <http://github.com/zafrullahsyed/cameracapture.git>;protocol=https;tag=v0.1"
>
> S = "${WORKDIR}/git"
> inherit pkgconfig cmake
>
> I have my source file and CMakeLists.txt as tar on github. tar is not 
> getting downloaded.
The tar should be in the "${WORKDIR}/git" directory but it will not work 
as you don't tell bitbake to unpack it.

You repository with tag "v0.1" contains only a README.md!

The common use case is to put all sources into the git repository. Why 
you want to save a tar in a git repository?

>
> --> If I remove tar and keep just source file and CMakeLists.txt, then 
> also it is not getting downloaded.
Have you check the content of the 
/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git 
directory?

> I am getting
>
> CMake Error: The source directory 
> "/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1" 
> does not appear to contain CMakeLists.txt.
         ^^^
Are you sure you have change the S variable? The error still reference 
the common directory ("${WORKDIR}/${PN}-${PV}").
>
> --> I copied my CMakeLists.txt file in ${WORKDIR}/git and tried the 
> build, got this following error:
>
> ERROR: Function failed: do_configure (see 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784 
> for further information)
> ERROR: Logfile of failure stored in: 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
> Log data follows:
> | DEBUG: Executing python function sysroot_cleansstate
> | DEBUG: Python function sysroot_cleansstate finished
> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 
> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 
> 'common']
> | DEBUG: Executing shell function autotools_preconfigure
> | DEBUG: Shell function autotools_preconfigure finished
> | DEBUG: Executing shell function do_configure
> | CMake Error at 
> /home/siguser/yocto/build/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:95 
> (MESSAGE):
> |   Could not find toolchain file:
> | 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/toolchain.cmake
It looks as something went wrong. Please clear the old package and try 
again or increment the PR number.
bitbake -c cleansstate cameracapture && bitbake cameracapture

> | Call Stack (most recent call first):
> |   CMakeLists.txt:2 (project)
> |
> |
> | CMake Error: Error required internal CMake variable not set, cmake 
> may be not be built correctly.
> | Missing variable is:
> | CMAKE_C_COMPILER_ENV_VAR
> | CMake Error: Error required internal CMake variable not set, cmake 
> may be not be built correctly.
> | Missing variable is:
> | CMAKE_C_COMPILER
> | CMake Error: Could not find cmake module 
> file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCCompiler.cmake
> | CMake Error: Error required internal CMake variable not set, cmake 
> may be not be built correctly.
> | Missing variable is:
> | CMAKE_CXX_COMPILER_ENV_VAR
> | CMake Error: Error required internal CMake variable not set, cmake 
> may be not be built correctly.
> | Missing variable is:
> | CMAKE_CXX_COMPILER
> | CMake Error: Could not find cmake module 
> file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCXXCompiler.cmake
> | CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
> | CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
> | -- Configuring incomplete, errors occurred!
> | ERROR: Function failed: do_configure (see 
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784 
> for further information)
> ERROR: Task 6 
> (/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/cameracapture_0.1.bb 
> <http://cameracapture_0.1.bb>, do_configure) failed with exit code '1'
>
> Do I need to set CXX Compiler in my CMakeLists.txt?
No, this are subsequent errors of the missing toolchain.cmake.

> My CmakeLists.txt file:
>
> cmake_minimum_required(VERSION 2.8)
> project(cameracapture)
> find_package( OpenCV REQUIRED )
> add_executable( cameracapture cameracapture.cpp )
> target_link_libraries( cameracapture ${OpenCV_LIBS} )
This looks okay.


[-- Attachment #2: Type: text/html, Size: 8908 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-25 18:10                 ` Stefan Herbrechtsmeier
@ 2013-08-26 12:42                   ` Zafrullah Syed
  2013-08-26 15:55                     ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 13+ messages in thread
From: Zafrullah Syed @ 2013-08-26 12:42 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 5586 bytes --]

Hi Stefan, Hi all,

My build was successful with CMake. I made some changes to my recipe:

DESCRIPTION = "cameracapture application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"

DEPENDS = "opencv"

SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git
;protocol=https;tag=v0.1"

S = "${WORKDIR}/git"

inherit pkgconfig cmake

do_install() {
    install -d ${D}${bindir}
    install -m 0755 cameracapture ${D}${bindir}
}

I didn't specify do_install, which caused the errors.

Your inputs helped me very much. Thanks a ton.

Regards,
Zafrullah


On Sun, Aug 25, 2013 at 8:10 PM, Stefan Herbrechtsmeier <
stefan@herbrechtsmeier.net> wrote:

>  Am 25.08.2013 17:03, schrieb Zafrullah Syed:
>
> Hi Stefan,
>
>  I updated my recipe:
>
>  DESCRIPTION = "cameracapture application"
> SECTION = "examples"
> LICENSE = "CLOSED"
> PR = "r0"
>
>  DEPENDS = "opencv"
>
>  SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git
> ;protocol=https;tag=v0.1"
>
>  S = "${WORKDIR}/git"
>  inherit pkgconfig cmake
>
>  I have my source file and CMakeLists.txt as tar on github. tar is not
> getting downloaded.
>
> The tar should be in the "${WORKDIR}/git" directory but it will not work
> as you don't tell bitbake to unpack it.
>
> You repository with tag "v0.1" contains only a README.md!
>
> The common use case is to put all sources into the git repository. Why you
> want to save a tar in a git repository?
>
>
>
>  --> If I remove tar and keep just source file and CMakeLists.txt, then
> also it is not getting downloaded.
>
> Have you check the content of the
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git
> directory?
>
>
>   I am getting
>
>  CMake Error: The source directory
> "/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1"
> does not appear to contain CMakeLists.txt.
>
>         ^^^
> Are you sure you have change the S variable? The error still reference the
> common directory ("${WORKDIR}/${PN}-${PV}").
>
>
>  --> I copied my CMakeLists.txt file in ${WORKDIR}/git and tried the
> build, got this following error:
>
>   ERROR: Function failed: do_configure (see
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
> for further information)
> ERROR: Logfile of failure stored in:
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
> Log data follows:
> | DEBUG: Executing python function sysroot_cleansstate
> | DEBUG: Python function sysroot_cleansstate finished
> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
> | DEBUG: Executing shell function autotools_preconfigure
> | DEBUG: Shell function autotools_preconfigure finished
> | DEBUG: Executing shell function do_configure
> | CMake Error at
> /home/siguser/yocto/build/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:95
> (MESSAGE):
> |   Could not find toolchain file:
> |
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/toolchain.cmake
>
> It looks as something went wrong. Please clear the old package and try
> again or increment the PR number.
> bitbake -c cleansstate cameracapture && bitbake cameracapture
>
>
>   | Call Stack (most recent call first):
>  |   CMakeLists.txt:2 (project)
> |
> |
> | CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> | Missing variable is:
> | CMAKE_C_COMPILER_ENV_VAR
> | CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> | Missing variable is:
> | CMAKE_C_COMPILER
> | CMake Error: Could not find cmake module
> file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCCompiler.cmake
> | CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> | Missing variable is:
> | CMAKE_CXX_COMPILER_ENV_VAR
> | CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> | Missing variable is:
> | CMAKE_CXX_COMPILER
> | CMake Error: Could not find cmake module
> file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCXXCompiler.cmake
> | CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
> | CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
> | -- Configuring incomplete, errors occurred!
> | ERROR: Function failed: do_configure (see
> /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
> for further information)
> ERROR: Task 6
> (/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/
> cameracapture_0.1.bb, do_configure) failed with exit code '1'
>
>  Do I need to set CXX Compiler in my CMakeLists.txt?
>
> No, this are subsequent errors of the missing toolchain.cmake.
>
>
>  My CmakeLists.txt file:
>
>  cmake_minimum_required(VERSION 2.8)
> project(cameracapture)
> find_package( OpenCV REQUIRED )
> add_executable( cameracapture cameracapture.cpp )
> target_link_libraries( cameracapture ${OpenCV_LIBS} )
>
> This looks okay.
>
>


-- 
Regards,
Zafrullah Syed

[-- Attachment #2: Type: text/html, Size: 9786 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bitbake with cmake recipe
  2013-08-26 12:42                   ` Zafrullah Syed
@ 2013-08-26 15:55                     ` Stefan Herbrechtsmeier
  0 siblings, 0 replies; 13+ messages in thread
From: Stefan Herbrechtsmeier @ 2013-08-26 15:55 UTC (permalink / raw)
  To: Zafrullah Syed; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 6298 bytes --]

Am 26.08.2013 14:42, schrieb Zafrullah Syed:
> Hi Stefan, Hi all,
>
> My build was successful with CMake. I made some changes to my recipe:
>
> DESCRIPTION = "cameracapture application"
> SECTION = "examples"
> LICENSE = "CLOSED"
> PR = "r0"
>
> DEPENDS = "opencv"
>
> SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git 
> <http://github.com/zafrullahsyed/cameracapture.git>;protocol=https;tag=v0.1"
>
> S = "${WORKDIR}/git"
>
> inherit pkgconfig cmake
>
> do_install() {
>     install -d ${D}${bindir}
>     install -m 0755 cameracapture ${D}${bindir}
> }
>
> I didn't specify do_install, which caused the errors.
You shouldn't need a do_install as cmake install the binary.


> On Sun, Aug 25, 2013 at 8:10 PM, Stefan Herbrechtsmeier 
> <stefan@herbrechtsmeier.net <mailto:stefan@herbrechtsmeier.net>> wrote:
>
>     Am 25.08.2013 17:03, schrieb Zafrullah Syed:
>>     Hi Stefan,
>>
>>     I updated my recipe:
>>
>>     DESCRIPTION = "cameracapture application"
>>     SECTION = "examples"
>>     LICENSE = "CLOSED"
>>     PR = "r0"
>>
>>     DEPENDS = "opencv"
>>
>>     SRC_URI = "git://github.com/zafrullahsyed/cameracapture.git
>>     <http://github.com/zafrullahsyed/cameracapture.git>;protocol=https;tag=v0.1"
>>
>>     S = "${WORKDIR}/git"
>>     inherit pkgconfig cmake
>>
>>     I have my source file and CMakeLists.txt as tar on github. tar is
>>     not getting downloaded.
>     The tar should be in the "${WORKDIR}/git" directory but it will
>     not work as you don't tell bitbake to unpack it.
>
>     You repository with tag "v0.1" contains only a README.md!
>
>     The common use case is to put all sources into the git repository.
>     Why you want to save a tar in a git repository?
>
>
>>
>>     --> If I remove tar and keep just source file and CMakeLists.txt,
>>     then also it is not getting downloaded.
>     Have you check the content of the
>     /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git
>     directory?
>
>
>>     I am getting
>>
>>     CMake Error: The source directory
>>     "/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/cameracapture-0.1"
>>     does not appear to contain CMakeLists.txt.
>             ^^^
>     Are you sure you have change the S variable? The error still
>     reference the common directory ("${WORKDIR}/${PN}-${PV}").
>>
>>     --> I copied my CMakeLists.txt file in ${WORKDIR}/git and tried
>>     the build, got this following error:
>>
>>     ERROR: Function failed: do_configure (see
>>     /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
>>     for further information)
>>     ERROR: Logfile of failure stored in:
>>     /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
>>     Log data follows:
>>     | DEBUG: Executing python function sysroot_cleansstate
>>     | DEBUG: Python function sysroot_cleansstate finished
>>     | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
>>     'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi',
>>     'common']
>>     | DEBUG: Executing shell function autotools_preconfigure
>>     | DEBUG: Shell function autotools_preconfigure finished
>>     | DEBUG: Executing shell function do_configure
>>     | CMake Error at
>>     /home/siguser/yocto/build/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:95
>>     (MESSAGE):
>>     |   Could not find toolchain file:
>>     |
>>     /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/toolchain.cmake
>     It looks as something went wrong. Please clear the old package and
>     try again or increment the PR number.
>     bitbake -c cleansstate cameracapture && bitbake cameracapture
>
>
>>     | Call Stack (most recent call first):
>>     |   CMakeLists.txt:2 (project)
>>     |
>>     |
>>     | CMake Error: Error required internal CMake variable not set,
>>     cmake may be not be built correctly.
>>     | Missing variable is:
>>     | CMAKE_C_COMPILER_ENV_VAR
>>     | CMake Error: Error required internal CMake variable not set,
>>     cmake may be not be built correctly.
>>     | Missing variable is:
>>     | CMAKE_C_COMPILER
>>     | CMake Error: Could not find cmake module
>>     file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCCompiler.cmake
>>     | CMake Error: Error required internal CMake variable not set,
>>     cmake may be not be built correctly.
>>     | Missing variable is:
>>     | CMAKE_CXX_COMPILER_ENV_VAR
>>     | CMake Error: Error required internal CMake variable not set,
>>     cmake may be not be built correctly.
>>     | Missing variable is:
>>     | CMAKE_CXX_COMPILER
>>     | CMake Error: Could not find cmake module
>>     file:/home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/git/CMakeFiles/CMakeCXXCompiler.cmake
>>     | CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
>>     | CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
>>     | -- Configuring incomplete, errors occurred!
>>     | ERROR: Function failed: do_configure (see
>>     /home/siguser/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/cameracapture-0.1-r0/temp/log.do_configure.10784
>>     for further information)
>>     ERROR: Task 6
>>     (/home/siguser/yocto/poky/meta-bebot/recipes-bebot/cameracapture/cameracapture_0.1.bb
>>     <http://cameracapture_0.1.bb>, do_configure) failed with exit
>>     code '1'
>>
>>     Do I need to set CXX Compiler in my CMakeLists.txt?
>     No, this are subsequent errors of the missing toolchain.cmake.
>
>
>>     My CmakeLists.txt file:
>>
>>     cmake_minimum_required(VERSION 2.8)
>>     project(cameracapture)
>>     find_package( OpenCV REQUIRED )
>>     add_executable( cameracapture cameracapture.cpp )
>>     target_link_libraries( cameracapture ${OpenCV_LIBS} )
>     This looks okay.
>
>
>
>
> -- 
> Regards,
> Zafrullah Syed
>


[-- Attachment #2: Type: text/html, Size: 13675 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-08-26 15:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 10:30 bitbake with cmake recipe Zafrullah Syed
2013-08-22 10:31 ` Burton, Ross
2013-08-22 10:35   ` Zafrullah Syed
2013-08-22 13:40     ` Zafrullah Syed
2013-08-22 14:14       ` Burton, Ross
2013-08-22 14:20         ` Philip Balister
2013-08-22 18:13           ` Zafrullah Syed
2013-08-23  7:01             ` Lukas Bulwahn
2013-08-23  7:09             ` Stefan Herbrechtsmeier
2013-08-25 15:03               ` Zafrullah Syed
2013-08-25 18:10                 ` Stefan Herbrechtsmeier
2013-08-26 12:42                   ` Zafrullah Syed
2013-08-26 15:55                     ` Stefan Herbrechtsmeier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.