All of lore.kernel.org
 help / color / mirror / Atom feed
* My first recipe: qjson_0.7.1.bb
@ 2012-10-16 21:31 Fabrício Ceolin
  2012-10-17  1:01 ` Fabrício Ceolin
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrício Ceolin @ 2012-10-16 21:31 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 682 bytes --]

Hi,

I'm new at the yocto project and I'm building my first recipe.

At now, I'm in trouble because the yocto is building my application for
toolchain and I do not need that. I need build an application only for
target image.

My machine is x86_64 and my target is qemux86.

When bitbake trying to compile the qjson for toolchain, bitbake tries to
link 32 bits binaries with 64 bits toolchain's libraries.

See my bb file and error attached

How can I make this compilation use only target libs?

In custom bb files, how do the bitbake know that compilation if for a
toolchain or a target?

Thanks





-- 
Fabrício Ceolin
ulevel.com
Diretor Executivo

[-- Attachment #1.2: Type: text/html, Size: 1013 bytes --]

[-- Attachment #2: qjson_0.7.1.bb --]
[-- Type: application/octet-stream, Size: 1217 bytes --]

DESCRIPTION = "A Json library for QT"
HOMEPAGE = "http://qjson.sourceforge.net/"
SECTION = "libs"
PACKAGE_ARCH = "${MACHINE_ARCH}"

LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING.lib;md5=3511d726d09144c8590aba4623ca2e9f"

SRCREV = "37be2b7bf4cfe9784665e520ea03683a9f14f1d0"
PV = "0.7.1"

inherit qmake2 cmake pkgconfig

# Do a ssh connection first, to register a fingerprint
SRC_URI = "git://gitorious.org/qjson/qjson.git"

RDEPENDS += "qt4-embedded"
DEPENDS += "cmake pkgconfig qt4-embedded"


export EXTRA_OECMAKE = "-DQT_QMAKE_EXECUTABLE=${OE_QMAKE_QMAKE} \
                        -DQT_LRELEASE_EXECUTABLE=${OE_QMAKE_LRELEASE} \
                        -DQT_MOC_EXECUTABLE=${OE_QMAKE_MOC} \
                        -DQT_UIC_EXECUTABLE=${OE_QMAKE_UIC} \
                        -DQT_RCC_EXECUTABLE=${OE_QMAKE_RCC} \
                        -DQT_LIBRARY_DIR=${OE_QMAKE_LIBDIR_QT}/ \
                        -DQT_HEADERS_DIR=${STAGING_INCDIR_NATIVE}/qt4/ \
                        -DQT_QTCORE_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/qt4/QtCore/ \
                        "


do_configure_prepend() {
        export HOST_SYS=${HOST_SYS}
        export BUILD_SYS=${BUILD_SYS}
}



PR = "r0"

S = "${WORKDIR}/git"


[-- Attachment #3: error.log --]
[-- Type: application/octet-stream, Size: 6224 bytes --]

WARNING: Host distribution "Ubuntu 12.04.1 LTS" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache...done.
Loaded 1110 entries from dependency cache.

OE Build Configuration:
BB_VERSION        = "1.15.2"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.2.1"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-jfa          = "<unknown>:<unknown>"
meta-trm          = "master:f4773ac614a9aec3c4390ba5249f67a30a59257a"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 1955 of 2755 (ID: 9, /home/ceolin/src/poky-denzil-7.0.1/meta-trm/recipes-qt/qjson/qjson_0.7.1.bb, do_compile)
NOTE: package qjson-0.7.1-r0: task do_compile: Started
ERROR: Function failed: do_compile (see /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/temp/log.do_compile.32602 for further information)
ERROR: Logfile of failure stored in: /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/temp/log.do_compile.32602
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
| ERROR: Function failed: do_compile (see /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/temp/log.do_compile.32602 for further information)
| NOTE: make -j 8
| /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/bin/cmake -H/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git -B/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git --check-build-system CMakeFiles/Makefile.cmake 0
| /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_start /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/CMakeFiles /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/CMakeFiles/progress.marks
| make -f CMakeFiles/Makefile2 all
| make[1]: Entering directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| make -f src/CMakeFiles/qjson.dir/build.make src/CMakeFiles/qjson.dir/depend
| make[2]: Entering directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| cd /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git && /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/src /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/src /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/src/CMakeFiles/qjson.dir/DependInfo.cmake --color=
| make[2]: Leaving directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| make -f src/CMakeFiles/qjson.dir/build.make src/CMakeFiles/qjson.dir/build
| make[2]: Entering directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| Linking CXX shared library ../lib/libqjson.so
| cd /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git/src && /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/qjson.dir/link.txt --verbose=1
| /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++  -fPIC  -m32   -march=i586  --sysroot=/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/qemux86  -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -fpermissive -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -shared -Wl,-soname,libqjson.so.0 -o ../lib/libqjson.so.0.7.1 CMakeFiles/qjson.dir/parser.cpp.o CMakeFiles/qjson.dir/qobjecthelper.cpp.o CMakeFiles/qjson.dir/json_scanner.cpp.o CMakeFiles/qjson.dir/json_parser.cc.o CMakeFiles/qjson.dir/parserrunnable.cpp.o CMakeFiles/qjson.dir/serializer.cpp.o CMakeFiles/qjson.dir/serializerrunnable.cpp.o CMakeFiles/qjson.dir/moc_parserrunnable.cxx.o CMakeFiles/qjson.dir/moc_serializerrunnable.cxx.o /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/lib/libQtCore.so -Wl,-rpath,/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/lib:
| /home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/sysroots/x86_64-linux/usr/lib/libQtCore.so: could not read symbols: File in wrong format
| collect2: ld returned 1 exit status
| make[2]: *** [lib/libqjson.so.0.7.1] Error 1
| make[2]: Leaving directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| make[1]: *** [src/CMakeFiles/qjson.dir/all] Error 2
| make[1]: Leaving directory `/home/ceolin/src/poky-denzil-7.0.1/build-hello/tmp/work/qemux86-poky-linux/qjson-0.7.1-r0/git'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
NOTE: package qjson-0.7.1-r0: task do_compile: Failed
ERROR: Task 9 (/home/ceolin/src/poky-denzil-7.0.1/meta-trm/recipes-qt/qjson/qjson_0.7.1.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2748 tasks of which 2747 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/ceolin/src/poky-denzil-7.0.1/meta-trm/recipes-qt/qjson/qjson_0.7.1.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

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

* Re: My first recipe: qjson_0.7.1.bb
  2012-10-16 21:31 My first recipe: qjson_0.7.1.bb Fabrício Ceolin
@ 2012-10-17  1:01 ` Fabrício Ceolin
  0 siblings, 0 replies; 2+ messages in thread
From: Fabrício Ceolin @ 2012-10-17  1:01 UTC (permalink / raw)
  To: yocto

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

Hi,

I solve my problem following this tutorial:
http://cor-net.org/hello-world-in-qt-using-cmake-and-openembedded/3/

Thanks!

On Tue, Oct 16, 2012 at 6:31 PM, Fabrício Ceolin <ceolin@ulevel.com> wrote:

> Hi,
>
> I'm new at the yocto project and I'm building my first recipe.
>
> At now, I'm in trouble because the yocto is building my application for
> toolchain and I do not need that. I need build an application only for
> target image.
>
> My machine is x86_64 and my target is qemux86.
>
> When bitbake trying to compile the qjson for toolchain, bitbake tries to
> link 32 bits binaries with 64 bits toolchain's libraries.
>
> See my bb file and error attached
>
> How can I make this compilation use only target libs?
>
> In custom bb files, how do the bitbake know that compilation if for a
> toolchain or a target?
>
> Thanks
>
>
>
>
>
> --
> Fabrício Ceolin
> ulevel.com
> Diretor Executivo
>



-- 
Fabrício Ceolin
ulevel.com
Diretor Executivo

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

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

end of thread, other threads:[~2012-10-17  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 21:31 My first recipe: qjson_0.7.1.bb Fabrício Ceolin
2012-10-17  1:01 ` Fabrício Ceolin

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.