Skip to contentSkip to conversation

fix mklibs error for 64bit targets

PATCH New Jesse Zhang 2 participants 3 messages Aug 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix mklibs error for 64bit targets

mklibs should be passed a --libdir option, in order for it to work with 64bit targets.

Jesse Zhang (1):
image-mklibs: pass correct libdir to mklibs

 meta/classes/image-mklibs.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.7.6
#1 lore raw

PATCH 1/1 image-mklibs: pass correct libdir to mklibs

libdir should be specified, or else mklibs won't work for 64bit targets. It wouldn't be able to find the libs.

Traceback (most recent call last):
File "<build>/bitbake_build/tmp/sysroots/i686-linux/usr/bin/x86_64-wrs-linux/mklibs", line 553, in <module>
header = elf_header(find_lib(libraries.copy().pop()))
File "<build>/bitbake_build/tmp/sysroots/i686-linux/usr/bin/x86_64-wrs-linux/mklibs", line 89, in elf_header
raise Exception("Cannot find lib: " + obj)
Exception: Cannot find lib:

---
 meta/classes/image-mklibs.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/classes/image-mklibs.bbclass +1 -0
index 7623815..66b0f52 100644
@@ -38,6 +38,7 @@ mklibs_optimize_image_doit() {
 
 	mklibs -v \
 		--ldlib ${dynamic_loader} \
+		--libdir ${baselib} \
 		--sysroot ${PKG_CONFIG_SYSROOT_DIR} \
 		--root ${IMAGE_ROOTFS} \
 		--target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
Signature · 1 line
1.7.7.6
#2 lore raw

Re: [PATCH] image-mklibs: pass correct libdir to mklibs

Quoted 10 lines · Jesse Zhang

libdir should be specified, or else mklibs won't work for 64bit targets. It wouldn't be able to find the libs.

Traceback (most recent call last):
File "<build>/bitbake_build/tmp/sysroots/i686-linux/usr/bin/x86_64-wrs-linux/mklibs", line 553, in <module>
header = elf_header(find_lib(libraries.copy().pop()))
File "<build>/bitbake_build/tmp/sysroots/i686-linux/usr/bin/x86_64-wrs-linux/mklibs", line 89, in elf_header
raise Exception("Cannot find lib: " + obj)
Exception: Cannot find lib:

Quoted 4 lines
---
 meta/classes/image-mklibs.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Merged to master, thanks.

Richard