Skip to contentSkip to conversation

bzip2: add so.1 link

PATCH New Trevor Woerner 2 participants 9 messages Feb 9, 2012 – Feb 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bzip2: add so.1 link

From: Trevor Woerner <[email protected]>

In addition to the .so link add a .so.1 link for the target rootfs.

---
 package/bzip2/bzip2.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
package/bzip2/bzip2.mk +2 -1
index d3bb2b0..1bc4449 100644
@@ -59,6 +59,7 @@ define BZIP2_INSTALL_TARGET_CMDS
 	cp $(@D)/libbz2.so.$(BZIP2_SONAME) $(TARGET_DIR)/usr/lib/
 	(cd $(TARGET_DIR)/usr/lib; \
 		ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so.1.0; \
+		ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so.1; \
 		ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so; \
 	)
 	(cd $(TARGET_DIR)/usr/bin; \
@@ -102,4 +103,4 @@ define HOST_BZIP2_INSTALL_CMDS
 endef
 
 $(eval $(call GENTARGETS))
-$(eval $(call GENTARGETS,host))
\ No newline at end of file
+$(eval $(call GENTARGETS,host))
Signature · 1 line
1.7.9.GIT
#1 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

From: Trevor Woerner <[email protected]>

One of the libraries which is built by directfb, libidirectfbfont_ft2.so, requires libbz2:

$ pwd
/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont
$ /lib/ld-2.9.so --list ./libidirectfbfont_ft2.so
        libdirect-1.4.so.6 => /usr/lib/libdirect-1.4.so.6 (0x40155000)
        libdirectfb-1.4.so.6 => /usr/lib/libdirectfb-1.4.so.6 (0x40171000)
        libfusion-1.4.so.6 => /usr/lib/libfusion-1.4.so.6 (0x40133000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4008b000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40214000)
        libm.so.6 => /lib/libm.so.6 (0x40286000)
        libdl.so.2 => /lib/libdl.so.2 (0x40036000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400a6000)
        libc.so.6 => /lib/libc.so.6 (0x402f9000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400fa000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x400c6000)
        /lib/ld-2.9.so (0x40065000)
---
 package/directfb/directfb.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/directfb/directfb.mk +1 -1
index 977d272..8fd8d5e 100644
@@ -23,7 +23,7 @@ DIRECTFB_CONF_OPT = \
 	--disable-video4linux2 \
 	--without-tools
 
-DIRECTFB_DEPENDENCIES = freetype zlib
+DIRECTFB_DEPENDENCIES = freetype zlib bzip2
 
 ifeq ($(BR2_PACKAGE_DIRECTFB_MULTI),y)
 DIRECTFB_CONF_OPT += --enable-multi --enable-fusion
Signature · 1 line
1.7.9.GIT
#2 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trevor" == Trevor Woerner <[email protected]> writes:

Trevor> From: Trevor Woerner <[email protected]>
Trevor> One of the libraries which is built by directfb, libidirectfbfont_ft2.so, Trevor> requires libbz2:

That's not true. Freetype might optionally have bzip2 support, but it isn't a requirement for directfb.

E.G. I did a basic build here:

./host/usr/bin/i586-linux-readelf -a \
staging/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so | grep NEEDED

 0x00000001 (NEEDED)                     Shared library: [libdirect-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libdirectfb-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libfusion-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.0]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

So the only thing that should be fixed is to ensure bzip2 is built before freetype (and zlib as well) if enabled. I'll fix that.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

Quoted 25 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trevor" == Trevor Woerner <[email protected]> writes:

?Trevor> From: Trevor Woerner <[email protected]>
?Trevor> One of the libraries which is built by directfb, libidirectfbfont_ft2.so, ?Trevor> requires libbz2:

That's not true. Freetype might optionally have bzip2 support, but it isn't a requirement for directfb.

E.G. I did a basic build here:

./host/usr/bin/i586-linux-readelf -a \
?staging/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so ?| grep NEEDED
?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libdirect-1.4.so.6] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libdirectfb-1.4.so.6] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libfusion-1.4.so.6] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libz.so.1] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libfreetype.so.6] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libm.so.0] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libdl.so.0] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libpthread.so.0] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libgcc_s.so.1] ?0x00000001 (NEEDED) ? ? ? ? ? ? ? ? ? ? Shared library: [libc.so.0]

Quoted 2 lines

So the only thing that should be fixed is to ensure bzip2 is built before freetype (and zlib as well) if enabled. I'll fix that.

Hi Peter,

Thank you for looking into this for me, but this is rather odd. I pulled your latest fixes and rebuilt (make clean; make) using the attached config. I too don't see libbz2 listed when I perform the same "readelf -a" step as you on the host:

./host/usr/bin/arm-angstrom-linux-gnueabi-readelf -a staging/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so | grep NEEDED

 0x00000001 (NEEDED)                     Shared library: [libdirect-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libdirectfb-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libfusion-1.4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

But when I run the "df_dok" example on the target it complains (as I've shown before) that libidirectfbfont_ft2.so requires libbz2:

# df_dok

~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.15 |~~~~~~~~~~~~~~~~~~~~~~~~~~

        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2012-02-10 13:03) (*) Direct/Memcpy: Using armasm_memcpy()
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/FBDev: Found 'omapfb' (ID 0) with frame buffer at 0x8f400000, 1536k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver (*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse (1) 1.0 (directfb.org)
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse (2) 1.0 (directfb.org)
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org) (*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Mode: Setting 1024x768 RGB16
(*) FBDev/Mode: Switched to 1024x768 (virtual 1024x768) at 16 bit (RGB16), pitch 2048
(*) Direct/Interface: Loaded 'PNG' implementation of 'IDirectFBImageProvider'. (!) Direct/Interface: Unable to dlopen `/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so'!

    --> libbz2.so.1: cannot open shared object file: No such file or directory
df_dok.c <1523>:
        (#) DirectFBError [dfb->CreateFont( dfb, fontfile, &desc,

&bench_font )]: No (suitable) implementation found!
(!!!) *** WARNING [Application exited without deinitialization of
DirectFB!] *** [core.c:1109 in dfb_core_deinit_check()]
(!!!) *** WARNING [still objects in 'Layer Region Pool'] ***
[object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'Layer Context Pool'] ***
[object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'GraphicsState Pool'] ***
[object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'Surface Pool'] ***
[object.c:241 in fusion_object_pool_destroy()]

# /lib/ld-2.9.so --list /usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidir
ectfbfont_ft2.so
/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so:
error while loading shared libraries: libbz2.so.1: cannot open shared
object file: No such file or directory

Did I misunderstand your fix? Do I need to do something explicitly in my build? (I thought the build would pull in any required libraries automatically).

Best regards,
Trevor

PS For testing purposes my target is currently an emulated gumstix
overo device under qemu, if you'd like I could provide instructions to
reproduce my exact target.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.xz
Type: application/octet-stream
Size: 4140 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120210/31e268c7/attachment.obj>

#4 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trevor" == Trevor Woerner <[email protected]> writes:

Hi,

Trevor> But when I run the "df_dok" example on the target it complains (as Trevor> I've shown before) that libidirectfbfont_ft2.so requires libbz2:

Is this with a clean build? You must have bz2 headers/libs somewhere for freetype to be built with bz2 support.

I just built the qemu_arm_versatile_defconfig config with directfb enabled and tested it in qemu without any problems.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

Hi Peter,

Quoted 5 lines · Peter Korsgaard

Is this with a clean build? You must have bz2 headers/libs somewhere for freetype to be built with bz2 support.

I just built the qemu_arm_versatile_defconfig config with directfb enabled and tested it in qemu without any problems.

Thanks for helping me out with this, I see the issue now: my external toolchain contains the bz2 headers/libs in its sysroot.

Best regards,
Trevor

#6 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trevor" == Trevor Woerner <[email protected]> writes:

Hi,

Quoted 2 lines
Quoted 2 lines

I just built the qemu_arm_versatile_defconfig config with directfb enabled and tested it in qemu without any problems.

Trevor> Thanks for helping me out with this, I see the issue now: my external Trevor> toolchain contains the bz2 headers/libs in its sysroot.

Ahh ok. We only really support bare external toolchains.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH v3 1/1 directfb: font handling requires libbz2

In reply to Peter Korsgaard
Quoted 7 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Trevor" == Trevor Woerner <[email protected]> writes:

?Trevor> From: Trevor Woerner <[email protected]>
?Trevor> One of the libraries which is built by directfb, libidirectfbfont_ft2.so, ?Trevor> requires libbz2:

That's not true. Freetype might optionally have bzip2 support, but it isn't a requirement for directfb.

I see. Since the bzip2 headers and libraries exist in my toolchain's sysroot my build of freetype includes bz2 support. The bz2 dependency in the directfb library I cited wasn't due to directfb itself but rather due to libfreetype (which is one of the listed libraries for the cited directfb library):

./host/usr/bin/arm-angstrom-linux-gnueabi-readelf -a target/usr/lib/libfreetype.so.6.8.0 | grep NEEDED

 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libbz2.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

In this situation would it be worth investigating some sort of tool to check the shared libraries in the target filesystem for any missing dependencies from the toolchain (and include them)? I vaguely recall there already being such a tool, but can't seem to find/remember what it is called.

Best regards,
Trevor