* Re: [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
2013-01-08 19:04 [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries Otavio Salvador
@ 2013-01-08 19:02 ` Otavio Salvador
2013-01-08 19:08 ` Javier Viguera
2013-01-09 9:35 ` Javier Viguera
0 siblings, 2 replies; 6+ messages in thread
From: Otavio Salvador @ 2013-01-08 19:02 UTC (permalink / raw)
To: meta-freescale@yoctoproject.org; +Cc: Javier Viguera, Otavio Salvador
On Tue, Jan 8, 2013 at 5:04 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
> This patch address many packaging issues which are required to allow
> development using those libraries. The changes were:
>
> * The pkgconfig file provided is the same provided by
> fsl-mm-codeclib-dev so we cannot duplicate this file, instead we add a
> depends on fsl-mm-codeclib-dev to provide a single pkgconfig file;
>
> * The fsl-mm-flv-codeclib provided the same headers provided in
> fsl-mm-codeclib so we remove them to avoid duplication;
>
> * Disable debug split as the binaries are stripped;
>
> * Set PACKAGE_ARCH to MACHINE_ARCH as this binaries are machine
> specific;
>
> * Fix libraries installation as the binary filenames doesn't follow
> the standard naming;
>
> * Use a single .inc file to avoid code duplication;
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Reported-by: Javier Viguera <javier.viguera@digi.com>
This is a new patch which replaces the other one. It should address
all packaging issues in the fsl-mm-*-codeclib packages. Javier, can
you give it a try?
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
* [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
@ 2013-01-08 19:04 Otavio Salvador
2013-01-08 19:02 ` Otavio Salvador
0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2013-01-08 19:04 UTC (permalink / raw)
To: meta-freescale; +Cc: javier.viguera, Otavio Salvador
This patch address many packaging issues which are required to allow
development using those libraries. The changes were:
* The pkgconfig file provided is the same provided by
fsl-mm-codeclib-dev so we cannot duplicate this file, instead we add a
depends on fsl-mm-codeclib-dev to provide a single pkgconfig file;
* The fsl-mm-flv-codeclib provided the same headers provided in
fsl-mm-codeclib so we remove them to avoid duplication;
* Disable debug split as the binaries are stripped;
* Set PACKAGE_ARCH to MACHINE_ARCH as this binaries are machine
specific;
* Fix libraries installation as the binary filenames doesn't follow
the standard naming;
* Use a single .inc file to avoid code duplication;
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reported-by: Javier Viguera <javier.viguera@digi.com>
---
recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc | 36 ++++++++------------
.../fsl-mm-core/fsl-mm-codeclib_2.0.3.bb | 10 ++++++
.../fsl-mm-core/fsl-mm-flv-codeclib_2.0.3.bb | 31 ++++++-----------
.../fsl-mm-core/fsl-mm-mp3enc-codeclib.inc | 30 ----------------
.../fsl-mm-core/fsl-mm-mp3enc-codeclib_2.0.3.bb | 14 ++++++--
5 files changed, 48 insertions(+), 73 deletions(-)
delete mode 100644 recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib.inc
diff --git a/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc b/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc
index 2ec60be..a3761c4 100644
--- a/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc
+++ b/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc
@@ -1,33 +1,27 @@
-# Copyright (C) 2011, 2012 Freescale Semiconductor
+# Copyright (C) 2011-2013 Freescale Semiconductor
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Freescale mm codec libs"
-SECTION = "multimedia"
+DESCRIPTION = "Freescale Multimedia codec libs"
LICENSE = "Proprietary"
-DEPENDS = "pkgconfig"
-
-LIC_FILES_CHKSUM = "file://docs/EULA.txt;md5=ea4d5c069d7aef0838a110409ea78a01"
+SECTION = "multimedia"
-INC_PR = "r3"
+INC_PR = "r4"
-INSANE_SKIP_${PN} = "ldflags"
-INSANE_SKIP_${PN}-dev = "ldflags"
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
-SRC_URI = "${FSL_MIRROR}/fsl-mm-codeclib-${PV}.bin;fsl-eula=true"
+inherit fsl-eula-unpack pkgconfig
-inherit fsl-eula-unpack
+# FIXME: Quiet down the warnings during package
+INSANE_SKIP_${PN} = "ldflags textrel"
+INSANE_SKIP_${PN}-dev = "ldflags textrel"
do_install () {
- install -d ${D}${libdir}
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${includedir}/mm_ghdr
-
- cp -r ${S}/release/lib/* ${D}${libdir}
- cp -r ${S}/ghdr/* ${D}${includedir}/mm_ghdr
- install -m 0644 ${S}/pkgconfig/fsl-mm-core.pc ${D}${libdir}/pkgconfig
-
- # Fix file permissions
- find ${D} -type f -exec chmod a-x '{}' ';'
+ install -d ${D}${includedir} ${D}${libdir}
+ install -m 0644 ${S}/release/lib/* ${D}${libdir}
+ cp -r ${S}/ghdr* ${D}${includedir}
+ mv ${D}${includedir}/ghdr ${D}${includedir}/mm_ghdr
}
+FILES_${PN} += "${libdir}/lib*_elinux.3.0.1.07.00"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib_2.0.3.bb b/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib_2.0.3.bb
index 448ee7a..8c45e99 100644
--- a/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib_2.0.3.bb
+++ b/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib_2.0.3.bb
@@ -2,7 +2,17 @@ include fsl-mm-codeclib.inc
PR = "${INC_PR}.0"
+LIC_FILES_CHKSUM = "file://docs/EULA.txt;md5=ea4d5c069d7aef0838a110409ea78a01"
+
SRC_URI[md5sum] = "9ee06c147f635d1f904d53fc193150cc"
SRC_URI[sha256sum] = "427436c0ab7795204a23150bac19cf261a88693e9acd9d3eab5c06c60ffe55bd"
+do_install_append() {
+ # FIXME: Same pkgconfig file is provided in every source package
+ # so we install it just here and all other packages need to
+ # depends on fsl-mm-codeclib-dev explicitly.
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${S}/pkgconfig/fsl-mm-core.pc ${D}${libdir}/pkgconfig
+}
+
COMPATIBLE_MACHINE = "(mx5)"
diff --git a/recipes-multimedia/fsl-mm-core/fsl-mm-flv-codeclib_2.0.3.bb b/recipes-multimedia/fsl-mm-core/fsl-mm-flv-codeclib_2.0.3.bb
index 7509589..7731bb9 100644
--- a/recipes-multimedia/fsl-mm-core/fsl-mm-flv-codeclib_2.0.3.bb
+++ b/recipes-multimedia/fsl-mm-core/fsl-mm-flv-codeclib_2.0.3.bb
@@ -1,31 +1,22 @@
-# Copyright (C) 2011, 2012 Freescale Semicondutors <aalonso@freescale.com>
+# Copyright (C) 2011-2013 Freescale Semicondutors <aalonso@freescale.com>
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Freescale Multimedia codec libs"
-LICENSE = "Proprietary"
-SECTION = "multimedia"
-
-PR = "r1"
+include fsl-mm-codeclib.inc
+PR = "${INC_PR}.0"
LIC_FILES_CHKSUM = "file://ghdr/common/fsl_types.h;endline=13;md5=b805ce4a390c94d002ef86bd15ceafd4"
-SRC_URI = "${FSL_MIRROR}/fsl-mm-flv-codeclib-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "b0244d881f73557be9221e6534c239be"
SRC_URI[sha256sum] = "737399c76e8b991ebb76c07599b83da6a185211d88b95d9a9b4245f6d7fccec2"
-inherit fsl-eula-unpack
-
-do_install () {
- install -d ${D}${libdir}
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${includedir}/mm_ghdr
- install -m 0755 ${S}/release/lib/*.so* ${D}${libdir}
- install -m 0644 ${S}/ghdr/common/*.h ${D}${includedir}/mm_ghdr
- install -m 0644 ${S}/pkgconfig/*.pc ${D}${libdir}/pkgconfig
+do_install_prepend() {
+ # FIXME: Those files are deployed in fsl-mm-codeclib
+ rm -r ${S}/ghdr/common
}
-FILES_${PN} += "${libdir}/*.so* ${libdir}/pkgconfig/*.pc"
-INSANE_SKIP_${PN} = "ldflags"
+# FIXME: Same pkgconfig file is provided in every source so we need to
+# depends on 'fsl-mm-codeclib-dev' explicitly as it is
+# installed just on it.
+RDEPENDS_${PN}-dev = "fsl-mm-codeclib-dev"
-FILES_${PN}-dev += "${includedir}/mm_ghdr/*.h"
-INSANE_SKIP_${PN}-dev = "ldflags"
+COMPATIBLE_MACHINE = "(mx5)"
diff --git a/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib.inc b/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib.inc
deleted file mode 100644
index 2468d17..0000000
--- a/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2011, 2012 Freescale Semicondutors <aalonso@freescale.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Freescale Multimedia codec libs"
-LICENSE = "Proprietary"
-SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://ghdr/mp3_enc_interface.h;endline=11;md5=545a1927139b4739d8980c49954b6b95"
-
-INC_PR = "r1"
-
-SRC_URI = "${FSL_MIRROR}/fsl-mm-mp3enc-codeclib-${PV}.bin;fsl-eula=true"
-
-inherit fsl-eula-unpack
-
-do_install () {
- install -d ${D}${libdir}
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${includedir}/mm_ghdr
- install -m 0755 ${S}/release/lib/*.so* ${D}${libdir}
- install -m 0644 ${S}/ghdr/*.h ${D}${includedir}/mm_ghdr
- install -m 0644 ${S}/pkgconfig/*.pc ${D}${libdir}/pkgconfig
-}
-
-FILES_${PN} += "${libdir}/*.so* ${libdir}/pkgconfig/*.pc"
-INSANE_SKIP_${PN} = "ldflags"
-
-FILES_${PN}-dev += "${includedir}/mm_ghdr/*.h"
-INSANE_SKIP_${PN}-dev = "ldflags"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib_2.0.3.bb b/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib_2.0.3.bb
index 8142502..eb781cf 100644
--- a/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib_2.0.3.bb
+++ b/recipes-multimedia/fsl-mm-core/fsl-mm-mp3enc-codeclib_2.0.3.bb
@@ -1,8 +1,18 @@
-include fsl-mm-mp3enc-codeclib.inc
+# Copyright (C) 2011-2013 Freescale Semicondutors <aalonso@freescale.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+include fsl-mm-codeclib.inc
PR = "${INC_PR}.0"
-COMPATIBLE_MACHINE = "(mx5)"
+LIC_FILES_CHKSUM = "file://ghdr/mp3_enc_interface.h;endline=11;md5=545a1927139b4739d8980c49954b6b95"
SRC_URI[md5sum] = "049611d9f76b524b9fa9521527ba3235"
SRC_URI[sha256sum] = "e3712fa45a8f42617773678d45ab7ae0f20150a4d904f1e73afa8baa1941cf99"
+
+# FIXME: Same pkgconfig file is provided in every source so we need to
+# depends on 'fsl-mm-codeclib-dev' explicitly as it is
+# installed just on it.
+RDEPENDS_${PN}-dev += "fsl-mm-codeclib-dev"
+
+COMPATIBLE_MACHINE = "(mx5)"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
2013-01-08 19:02 ` Otavio Salvador
@ 2013-01-08 19:08 ` Javier Viguera
2013-01-08 19:13 ` Otavio Salvador
2013-01-09 9:35 ` Javier Viguera
1 sibling, 1 reply; 6+ messages in thread
From: Javier Viguera @ 2013-01-08 19:08 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org
On 01/08/2013 08:02 PM, Otavio Salvador wrote:
> This is a new patch which replaces the other one. It should address
> all packaging issues in the fsl-mm-*-codeclib packages. Javier, can
> you give it a try?
Hi Otavio,
It's getting late here (Spain) and i have to leave the office now but I
will try it first thing tomorrow morning and let you know the result.
Thanks for your support.
--
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
2013-01-08 19:08 ` Javier Viguera
@ 2013-01-08 19:13 ` Otavio Salvador
0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2013-01-08 19:13 UTC (permalink / raw)
To: Javier Viguera; +Cc: meta-freescale@yoctoproject.org
On Tue, Jan 8, 2013 at 5:08 PM, Javier Viguera <javier.viguera@digi.com> wrote:
> On 01/08/2013 08:02 PM, Otavio Salvador wrote:
>>
>> This is a new patch which replaces the other one. It should address
>> all packaging issues in the fsl-mm-*-codeclib packages. Javier, can
>> you give it a try?
>
>
> Hi Otavio,
>
> It's getting late here (Spain) and i have to leave the office now but I will
> try it first thing tomorrow morning and let you know the result.
Good; thanks in advance,
Regards,
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
2013-01-08 19:02 ` Otavio Salvador
2013-01-08 19:08 ` Javier Viguera
@ 2013-01-09 9:35 ` Javier Viguera
2013-01-09 9:39 ` Otavio Salvador
1 sibling, 1 reply; 6+ messages in thread
From: Javier Viguera @ 2013-01-09 9:35 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org
On 01/08/2013 08:02 PM, Otavio Salvador wrote:
> This is a new patch which replaces the other one. It should address
> all packaging issues in the fsl-mm-*-codeclib packages. Javier, can
> you give it a try?
The patch worked mostly well. No warnings at build time and the packages
are created.
A couple of things though:
1. The 'fsl-mm-codeclib' source package has symbolic links for the
'*.so' files pointing to the real library file. For example:
lib_sbc_enc_arm11_elinux.so -> lib_sbc_enc_arm11_elinux.so.2.0.0
lib_sbc_enc_arm11_elinux.so.2.0.0
lib_sbc_enc_arm9_elinux.so -> lib_sbc_enc_arm9_elinux.so.2.0.0
lib_sbc_enc_arm9_elinux.so.2.0.0
The patch changed 'cp' to 'install' tool in the 'do_install' function
and then those symbolic links get lost. See:
19740 Jan 9 09:57 lib_sbc_enc_arm11_elinux.so
19740 Jan 9 09:57 lib_sbc_enc_arm11_elinux.so.2.0.0
19736 Jan 9 09:57 lib_sbc_enc_arm9_elinux.so
19736 Jan 9 09:57 lib_sbc_enc_arm9_elinux.so.2.0.0
Then the '*.so' files go to the '-dev' package as *files* and not as
symbolic links and if you install both in your target's rootfs you have
duplicated files. This doesn't hurt but it doubles the space.
2. More important
Because the source package has this mix of files with different naming
rules, there are some missing files in the normal package that went to
the '-dev' package:
lib_aac_parser_arm11_elinux.so
lib_bmp_dec_arm11_elinux.so
lib_deinterlace_arm11_elinux.so
lib_flac_parser_arm11_elinux.so
lib_gif_dec_arm11_elinux.so
lib_id3_parser_arm11_elinux.so
lib_jpeg_enc_arm11_elinux.so
lib_mp3_parser_v2_arm11_elinux.so
libmpeg4_encoder_arm11_ELINUX.so
lib_png_dec_arm11_elinux.so
lib_src_ppp_arm11_elinux.so
lib_wav_parser_arm11_elinux.so
The reason again is that in the source package these files are the real
libraries but they don't have a ending version in the filename. The
build system i guess understands that they are the symbolic links that
should go to the '-dev' package when they shouldn't.
So number #1 is just a matter of saving space, while number #2 is more
important because later at runtime gstreamer needs some of the missing
files. I get this error running gst-inspect:
(gst-plugin-scanner:887): GStreamer-WARNING **: Failed to load plugin
'/usr/lib/gstreamer-0.10/libmfw_gst_deinterlace.so':
*lib_deinterlace_arm11_elinux.so*: cannot open shared object file: No
such file or directory
-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries
2013-01-09 9:35 ` Javier Viguera
@ 2013-01-09 9:39 ` Otavio Salvador
0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2013-01-09 9:39 UTC (permalink / raw)
To: Javier Viguera; +Cc: meta-freescale@yoctoproject.org
On Wed, Jan 9, 2013 at 7:35 AM, Javier Viguera <javier.viguera@digi.com> wrote:
>
> On 01/08/2013 08:02 PM, Otavio Salvador wrote:
>>
>> This is a new patch which replaces the other one. It should address
>> all packaging issues in the fsl-mm-*-codeclib packages. Javier, can
>> you give it a try?
>
>
> The patch worked mostly well. No warnings at build time and the packages are
> created.
>
> A couple of things though:
>
> 1. The 'fsl-mm-codeclib' source package has symbolic links for the '*.so'
> files pointing to the real library file. For example:
>
> lib_sbc_enc_arm11_elinux.so -> lib_sbc_enc_arm11_elinux.so.2.0.0
> lib_sbc_enc_arm11_elinux.so.2.0.0
> lib_sbc_enc_arm9_elinux.so -> lib_sbc_enc_arm9_elinux.so.2.0.0
> lib_sbc_enc_arm9_elinux.so.2.0.0
>
> The patch changed 'cp' to 'install' tool in the 'do_install' function and
> then those symbolic links get lost. See:
>
> 19740 Jan 9 09:57 lib_sbc_enc_arm11_elinux.so
> 19740 Jan 9 09:57 lib_sbc_enc_arm11_elinux.so.2.0.0
> 19736 Jan 9 09:57 lib_sbc_enc_arm9_elinux.so
> 19736 Jan 9 09:57 lib_sbc_enc_arm9_elinux.so.2.0.0
>
> Then the '*.so' files go to the '-dev' package as *files* and not as
> symbolic links and if you install both in your target's rootfs you have
> duplicated files. This doesn't hurt but it doubles the space.
Very good catch! I didn't notice it when checking the package
contents. Good that you found it :-)
> 2. More important
>
> Because the source package has this mix of files with different naming
> rules, there are some missing files in the normal package that went to the
> '-dev' package:
>
> lib_aac_parser_arm11_elinux.so
> lib_bmp_dec_arm11_elinux.so
> lib_deinterlace_arm11_elinux.so
> lib_flac_parser_arm11_elinux.so
> lib_gif_dec_arm11_elinux.so
> lib_id3_parser_arm11_elinux.so
> lib_jpeg_enc_arm11_elinux.so
> lib_mp3_parser_v2_arm11_elinux.so
> libmpeg4_encoder_arm11_ELINUX.so
> lib_png_dec_arm11_elinux.so
> lib_src_ppp_arm11_elinux.so
> lib_wav_parser_arm11_elinux.so
>
> The reason again is that in the source package these files are the real
> libraries but they don't have a ending version in the filename. The build
> system i guess understands that they are the symbolic links that should go
> to the '-dev' package when they shouldn't.
>
> So number #1 is just a matter of saving space, while number #2 is more
> important because later at runtime gstreamer needs some of the missing
> files. I get this error running gst-inspect:
>
> (gst-plugin-scanner:887): GStreamer-WARNING **: Failed to load plugin
> '/usr/lib/gstreamer-0.10/libmfw_gst_deinterlace.so':
> *lib_deinterlace_arm11_elinux.so*: cannot open shared object file: No such
> file or directory
I will fix this as well. Expect a v2 very soon :-)
Regards,
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-09 9:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 19:04 [meta-fsl-arm][PATCH] fsl-mm-*-codeclib: Fix packaging of libraries Otavio Salvador
2013-01-08 19:02 ` Otavio Salvador
2013-01-08 19:08 ` Javier Viguera
2013-01-08 19:13 ` Otavio Salvador
2013-01-09 9:35 ` Javier Viguera
2013-01-09 9:39 ` Otavio Salvador
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.