Openembedded Devel Discussions
 help / color / mirror / Atom feed
* Recent OBJDUMP changes
@ 2006-12-03 23:00 Leon Woestenberg
  2006-12-04 10:30 ` Koen Kooi
  2006-12-04 13:23 ` Richard Purdie
  0 siblings, 2 replies; 8+ messages in thread
From: Leon Woestenberg @ 2006-12-03 23:00 UTC (permalink / raw)
  To: openembedded-devel

Hello,

I seem to hit upon a recent change involving finding shlib
dependencies using the objdump | grep NEEDED approach by Graeme
Gregory/XorA:

http://www.openembedded.org/viewmtn/revision.psp?id=1fb8812d36f505cfabe9ee2335441ada60e32f83

Shouldn't (BUILD_)OBJDUMP be defined instead with a BUILD_PREFIX?

OBJDUMP uses HOST_PREFIX, which seems undefined during packaging
(using package_ipk).

Regards,
-- 
Leon



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

* Re: Recent OBJDUMP changes
  2006-12-03 23:00 Recent OBJDUMP changes Leon Woestenberg
@ 2006-12-04 10:30 ` Koen Kooi
  2006-12-04 13:24   ` Richard Purdie
  2006-12-04 13:23 ` Richard Purdie
  1 sibling, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2006-12-04 10:30 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Leon Woestenberg schreef:
> Hello,
> 
> I seem to hit upon a recent change involving finding shlib
> dependencies using the objdump | grep NEEDED approach by Graeme
> Gregory/XorA:
> 
> http://www.openembedded.org/viewmtn/revision.psp?id=1fb8812d36f505cfabe9ee2335441ada60e32f83
> 
> Shouldn't (BUILD_)OBJDUMP be defined instead with a BUILD_PREFIX?
> 
> OBJDUMP uses HOST_PREFIX, which seems undefined during packaging
> (using package_ipk).

I have something like this:

- --- conf/bitbake.conf   a55e0d456ecb5fa95185e35580c90bcc9513ed8d
+++ conf/bitbake.conf   e3d238d78a95629037ad0f48ce24e3a7382e540e
@@ -454,3 +454,6 @@ COMBINED_FEATURES = "\
     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)}"

+
+export OBJDUMP := "${HOST_PREFIX}objdump"
+


That should fix the issues, but isn't the right way.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFc/izMkyGM64RGpERAjhhAJ0f60RLRLZFi85k9fKplwcNEFDW5QCgiNAp
uIxZ+fPMroGwGqnpXg63Fww=
=C+Oa
-----END PGP SIGNATURE-----



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

* Re: Recent OBJDUMP changes
  2006-12-03 23:00 Recent OBJDUMP changes Leon Woestenberg
  2006-12-04 10:30 ` Koen Kooi
@ 2006-12-04 13:23 ` Richard Purdie
  2006-12-04 20:34   ` Leon Woestenberg
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2006-12-04 13:23 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2006-12-04 at 00:00 +0100, Leon Woestenberg wrote: 
> Hello,
> 
> I seem to hit upon a recent change involving finding shlib
> dependencies using the objdump | grep NEEDED approach by Graeme
> Gregory/XorA:
> 
> http://www.openembedded.org/viewmtn/revision.psp?id=1fb8812d36f505cfabe9ee2335441ada60e32f83
> 
> Shouldn't (BUILD_)OBJDUMP be defined instead with a BUILD_PREFIX?

BUILD_OBJDUMP would use BUILD_PREFIX
HOST_OBJDUMP (or OBJDUMP) should use HOST_PREFIX

> OBJDUMP uses HOST_PREFIX, which seems undefined during packaging
> (using package_ipk).

HOST_PREFIX should never be undefined. How are you working out its
undefined?

When running an arm build, HOST_PREFIX might be "arm-linux-" so the
objdump used would be arm-linux-objdump. Note that if arm-linux-objdump
isn't in PATH, that would be a problem.

For comparison BUILD_PREFIX would be "i686-linux-" on my system and
using "i686-linux-objdump" which wouldn't make sense on arm binaries
when packaging.

Cheers,

Richard











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

* Re: Recent OBJDUMP changes
  2006-12-04 10:30 ` Koen Kooi
@ 2006-12-04 13:24   ` Richard Purdie
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2006-12-04 13:24 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2006-12-04 at 11:30 +0100, Koen Kooi wrote:
> I have something like this:
> 
> - --- conf/bitbake.conf   a55e0d456ecb5fa95185e35580c90bcc9513ed8d
> +++ conf/bitbake.conf   e3d238d78a95629037ad0f48ce24e3a7382e540e
> @@ -454,3 +454,6 @@ COMBINED_FEATURES = "\
>      ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
>      ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)}"
> 
> +
> +export OBJDUMP := "${HOST_PREFIX}objdump"
> +
> 
> 
> That should fix the issues, but isn't the right way.

What issue does that fix?

Richard




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

* Re: Recent OBJDUMP changes
  2006-12-04 13:23 ` Richard Purdie
@ 2006-12-04 20:34   ` Leon Woestenberg
  2006-12-12 15:28     ` Marcin Juszkiewicz
  0 siblings, 1 reply; 8+ messages in thread
From: Leon Woestenberg @ 2006-12-04 20:34 UTC (permalink / raw)
  To: openembedded-devel

Hello,

On 12/4/06, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Mon, 2006-12-04 at 00:00 +0100, Leon Woestenberg wrote:
>
My assumption was wrong, the correct (cross-toolchain) objdump is used.

However, the shlibs system seems to fail elsewhere, this is what I see
if I disable the objdump command error redirection "2>/dev/null" in
package.bbclass:

NOTE: SITE files
/home/leon/sandbox/ixp4xx/openembedded/../../openembedded/org.openembedded.dev/site/endian-big
/home/leon/sandbox/ixp4xx/openembedded/../../openembedded/org.openembedded.dev/site/armeb-linux
NOTE: Couldn't find shared library provider for libncurses.so.5
NOTE: Couldn't find shared library provider for libgcc_s.so.1
NOTE: Couldn't find shared library provider for libc.so.6

I am looking into that now.

Leon.



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

* Re: Recent OBJDUMP changes
  2006-12-04 20:34   ` Leon Woestenberg
@ 2006-12-12 15:28     ` Marcin Juszkiewicz
  2006-12-15  9:09       ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Juszkiewicz @ 2006-12-12 15:28 UTC (permalink / raw)
  To: openembedded-devel

Dnia poniedziałek, 4 grudnia 2006 21:34, Leon Woestenberg napisał:

> My assumption was wrong, the correct (cross-toolchain) objdump is used.
>
> However, the shlibs system seems to fail elsewhere, this is what I see
> if I disable the objdump command error redirection "2>/dev/null" in
> package.bbclass:

> NOTE: Couldn't find shared library provider for libc.so.6

Does someone found better fix then mine?

[hrw@misc1 classes]$ mtn dif package.bbclass
#
# old_revision [76f1fdf6dff425bfdddcd67c4430bf4bc23ab36c]
#
# patch "classes/package.bbclass"
#  from [b4538ccc18abcaa057513563f37b2d25fdce5784]
#    to [969285b9af2e3bc59048d34cf396dd529e496c1e]
#
============================================================
--- classes/package.bbclass     b4538ccc18abcaa057513563f37b2d25fdce5784
+++ classes/package.bbclass     969285b9af2e3bc59048d34cf396dd529e496c1e
@@ -576,6 +576,7 @@ python package_do_shlibs() {
                                path = os.path.join(root, file)
                                if os.access(path, os.X_OK) or lib_re.match(file):
                                        cmd = bb.data.getVar('OBJDUMP', d, 1) + " -p " + path + " 2>/dev/null"
+                                       cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, 1), cmd)
                                        fd = os.popen(cmd)
                                        lines = fd.readlines()
                                        fd.close()
[hrw@misc1 classes]$

-- 
JID: hrw-jabber.org
OpenEmbedded developer/consultant

      I don't know. I don't care. And it doesn't make any difference.





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

* Re: Recent OBJDUMP changes
  2006-12-12 15:28     ` Marcin Juszkiewicz
@ 2006-12-15  9:09       ` Richard Purdie
  2006-12-19 19:43         ` test - please ignore Stelios Koroneos
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2006-12-15  9:09 UTC (permalink / raw)
  To: openembedded-devel

On Tue, 2006-12-12 at 16:28 +0100, Marcin Juszkiewicz wrote:
> Does someone found better fix then mine?
> 
> [hrw@misc1 classes]$ mtn dif package.bbclass
> --- classes/package.bbclass     b4538ccc18abcaa057513563f37b2d25fdce5784
> +++ classes/package.bbclass     969285b9af2e3bc59048d34cf396dd529e496c1e
> @@ -576,6 +576,7 @@ python package_do_shlibs() {
>                                 path = os.path.join(root, file)
>                                 if os.access(path, os.X_OK) or lib_re.match(file):
>                                         cmd = bb.data.getVar('OBJDUMP', d, 1) + " -p " + path + " 2>/dev/null"
> +                                       cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, 1), cmd)
>                                         fd = os.popen(cmd)
>                                         lines = fd.readlines()
>                                         fd.close()

FWIW, this is the correct fix. Ideally, bitbake should have some helper
functions to set up PATH and run a program but at the moment it doesn't
so we need to do this.

Cheers,

Richard




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

* test - please ignore
  2006-12-15  9:09       ` Richard Purdie
@ 2006-12-19 19:43         ` Stelios Koroneos
  0 siblings, 0 replies; 8+ messages in thread
From: Stelios Koroneos @ 2006-12-19 19:43 UTC (permalink / raw)
  To: openembedded-devel

test




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

end of thread, other threads:[~2006-12-19 19:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03 23:00 Recent OBJDUMP changes Leon Woestenberg
2006-12-04 10:30 ` Koen Kooi
2006-12-04 13:24   ` Richard Purdie
2006-12-04 13:23 ` Richard Purdie
2006-12-04 20:34   ` Leon Woestenberg
2006-12-12 15:28     ` Marcin Juszkiewicz
2006-12-15  9:09       ` Richard Purdie
2006-12-19 19:43         ` test - please ignore Stelios Koroneos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox