From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dd19416.kasserver.com (dd19416.kasserver.com [85.13.139.185]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 12111E00343 for ; Mon, 26 Aug 2013 08:56:03 -0700 (PDT) Received: from [192.168.1.100] (blfd-5d821b21.pool.mediaWays.net [93.130.27.33]) by dd19416.kasserver.com (Postfix) with ESMTPSA id EC1141840E08; Mon, 26 Aug 2013 17:56:00 +0200 (CEST) Message-ID: <521B7A8F.7060503@herbrechtsmeier.net> Date: Mon, 26 Aug 2013 17:55:59 +0200 From: Stefan Herbrechtsmeier User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: Zafrullah Syed References: <52161E20.3010800@balister.org> <52170AA1.4000602@herbrechtsmeier.net> <521A48AA.7060802@herbrechtsmeier.net> In-Reply-To: Cc: yocto Subject: Re: bitbake with cmake recipe X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 15:56:06 -0000 Content-Type: multipart/alternative; boundary="------------050007090901030401060904" --------------050007090901030401060904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 > ;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 > > 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 > --------------050007090901030401060904 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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;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> 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: 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: 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


--------------050007090901030401060904--