From: Darren Hart <dvhart@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: Library paths for Makefile based recipes
Date: Tue, 28 Dec 2010 16:54:59 -0800 [thread overview]
Message-ID: <4D1A86E3.1070007@linux.intel.com> (raw)
In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1504D64C30DB7@shsmsx502.ccr.corp.intel.com>
On 12/28/2010 04:43 PM, Tian, Kevin wrote:
>> From: Darren Hart
>> Sent: Wednesday, December 29, 2010 8:30 AM
>>
>> I'm working on packaging kernelshark ("make gui" for the trace-cmd recipe
>> basically). It fails trying to link to -lgtk-x11-2.0. I have added gtk+
>> as a DEPENDS and the library does exist in the sysroots. I have also added
>> "inherit pkgconfig" as the project Makefile uses it extensively.
>>
>> gcc trace-view-main.o trace-view.o trace-view-store.o trace-filter.o trace-compat.o
>> trace-hash.o libtracecmd.a -rdynamic -o trace-view -pthread -lgtk-x11-2.0 -lgdk-x11-2.0
>> -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0
>> -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -L.
>> -ltracecmd -ldl
>> | /usr/bin/ld: cannot find -lgtk-x11-2.0
>
> it looks that native gcc/binutils are used here, instead of the cross one. Or else gcc
> should have a target prefix like i568-poky-linux-gcc, and ld should come from your
> native sysroot...
Yes, I noticed this too. Turns out the Makefile was forcing CC=gcc.
>
>> | collect2: ld returned 1 exit status
>> | make[1]: *** [trace-view] Error 1
>> | make[1]: *** Waiting for unfinished jobs....
>> | make: *** [gui] Error 2
>> | FATAL: oe_runmake failed
>> | ERROR: Task failed: ('function do_compile failed',
>> '/vol/1/dvhart/poky.git/build/tmp/work/core2-poky-linux/kernelshark-1.0.4+git0+0d2522
>> 24626bd6926324f023a65f20c165232891-r0/temp/log.do_compile.12830')
>> NOTE: package
>> kernelshark-1.0.4+git0+0d252224626bd6926324f023a65f20c165232891-r0: task
>> do_compile: Failed
>> ERROR: Task 8
>> (/home/dvhart/data/poky.git/meta/recipes-kernel/trace-cmd/kernelshark_git.bb,
>> do_compile) failed with 1
>> ERROR: '/home/dvhart/data/poky.git/meta/recipes-kernel/trace-cmd/kernelshark_git.bb'
>> failed
>>
>> Without the "gui" target, trace-cmd doesn't link against anything outside of
>> libc and ld, so the original recipe doesn't run into this.
>
> given earlier confusion, I'm worried whether original trace-cmd does work as expected,
> e.g. whether it runs on a non-x86 target?
I'm confident it does not. I'll be sending a fix for that along with my
kernelshark recipe.
>
>>
>> How does bitbake try to make the library path available to a make based
>> project? I've tried various incantations from other non-autotools gtk+
>> based recipes:
>>
>> do_compile_prepend = " \
>> export LDFLAGS='${LDFLAGS} `${STAGING_BINDIR_NATIVE}/pkg-config
>> gtk+-2.0 --libs`'; \
>> export CFLAGS='${CFLAGS} -I./ `${STAGING_BINDIR_NATIVE}/pkg-config
>> gtk+-2.0 --cflags`'; "
>>
>> export VERBOSE=1
>> CFLAGS += "-L ${STAGING_LIBDIR}"
>> LDFLAGS += "-L ${STAGING_LIBDIR}"
>> CFLAGS_prepend = "-L ${STAGING_LIBDIR}"
>> LDFLAGS_prepend = "-L ${STAGING_LIBDIR}"
>>
>> However, these don't appear to impact the commands executed by the project
>> Makefile (despite the fact that it tries to import existing CFLAGS).
>>
>
> No idea here. You may need check the Makefile carefully whether there's any
> tricky lines breaking things here... At least you may change Makefile directly first. :-)
Yes, this is the path I took. Now working back up the stack to try and
get it working with poky.
Thanks,
--
Darren Hart
Yocto Linux Kernel
next prev parent reply other threads:[~2010-12-29 0:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 0:29 Library paths for Makefile based recipes Darren Hart
2010-12-29 0:41 ` Chris Larson
2010-12-29 0:58 ` Darren Hart
2010-12-30 11:21 ` Richard Purdie
2010-12-30 14:11 ` Chris Larson
2010-12-30 16:33 ` Darren Hart
2010-12-30 16:32 ` Darren Hart
2010-12-29 0:43 ` Tian, Kevin
2010-12-29 0:54 ` Darren Hart [this message]
2010-12-30 21:08 ` Bruce Ashfield
2010-12-30 21:10 ` Bruce Ashfield
2010-12-30 22:31 ` Darren Hart
2010-12-31 6:11 ` Bruce Ashfield
2010-12-29 9:18 ` Koen Kooi
2010-12-29 16:19 ` Darren Hart
2010-12-30 10:24 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D1A86E3.1070007@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=kevin.tian@intel.com \
--cc=poky@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.