mklibs: remove recipes and class
PATCH 1/1 mklibs: remove recipes and class
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
--- meta/classes/image-mklibs.bbclass | 56 ---------- meta/conf/distro/include/maintainers.inc | 1 - meta/conf/local.conf.sample | 5 +- meta/conf/local.conf.sample.extended | 9 -- .../mklibs/files/ac_init_fix.patch | 19 ---- ...re-on-symbol-provided-by-application.patch | 103 ------------------ .../mklibs/files/fix_STT_GNU_IFUNC.patch | 26 ----- .../mklibs/files/fix_cross_compile.patch | 81 -------------- ...U-unique-symbols-as-provided-symbols.patch | 34 ------ .../mklibs/files/sysrooted-ldso.patch | 18 --- .../mklibs/mklibs-native_0.1.44.bb | 22 ---- 11 files changed, 1 insertion(+), 373 deletions(-) delete mode 100644 meta/classes/image-mklibs.bbclass delete mode 100644 meta/recipes-devtools/mklibs/files/ac_init_fix.patch delete mode 100644 meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch delete mode 100644 meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch delete mode 100644 meta/recipes-devtools/mklibs/files/fix_cross_compile.patch delete mode 100644 meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch delete mode 100644 meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch delete mode 100644 meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
meta/classes/image-mklibs.bbclass deleted +0 -56
@@ -1,56 +0,0 @@ -do_rootfs[depends] += "mklibs-native:do_populate_sysroot" - -IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; " - -inherit linuxloader - -mklibs_optimize_image_doit() { - rm -rf ${WORKDIR}/mklibs - mkdir -p ${WORKDIR}/mklibs/dest - cd ${IMAGE_ROOTFS} - du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt - - # Build a list of dynamically linked executable ELF files. - # Omit libc/libpthread as a special case because it has an interpreter - # but is primarily what we intend to strip down. - for i in `find . -type f -executable ! -name 'libc-*' ! -name 'libpthread-*'`; do - file $i | grep -q ELF || continue - ${HOST_PREFIX}readelf -l $i | grep -q INTERP || continue - echo $i - done > ${WORKDIR}/mklibs/executables.list - - dynamic_loader=${@get_linuxloader(d)} - - mklibs -v \ - --ldlib ${dynamic_loader} \ - --libdir ${baselib} \ - --sysroot ${PKG_CONFIG_SYSROOT_DIR} \ - --gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \ - --root ${IMAGE_ROOTFS} \ - --target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \ - -d ${WORKDIR}/mklibs/dest \ - `cat ${WORKDIR}/mklibs/executables.list` - - cd ${WORKDIR}/mklibs/dest - for i in * - do - cp $i `find ${IMAGE_ROOTFS} -name $i` - done - - cd ${IMAGE_ROOTFS} - du -bs > ${WORKDIR}/mklibs/du.after.mklibs.txt - - echo rootfs size before mklibs optimization: `cat ${WORKDIR}/mklibs/du.before.mklibs.txt` - echo rootfs size after mklibs optimization: `cat ${WORKDIR}/mklibs/du.after.mklibs.txt` -} - -mklibs_optimize_image() { - for img in ${MKLIBS_OPTIMIZED_IMAGES} - do - if [ "${img}" = "${PN}" ] || [ "${img}" = "all" ] - then - mklibs_optimize_image_doit - break - fi - done -}
meta/conf/distro/include/maintainers.inc +0 -1
@@ -502,7 +502,6 @@ RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster <[email protected]>" RECIPE_MAINTAINER_pn-minicom = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-mkfontscale = "Armin Kuster <[email protected]>" -RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang <[email protected]>" RECIPE_MAINTAINER_pn-mmc-utils = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin <[email protected]>" RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao <[email protected]>"
meta/conf/local.conf.sample +1 -4
@@ -126,11 +126,8 @@ EXTRA_IMAGE_FEATURES ?= "debug-tweaks" # enable extra features. Some available options which can be included in this variable # are: # - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image # - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" +USER_CLASSES ?= "buildstats image-prelink" #
meta/conf/local.conf.sample.extended +0 -9
@@ -120,15 +120,6 @@ # # TCMODE ?= "external-sourcery" -# mklibs library size optimization is more useful to smaller images, -# and less useful for bigger images. Also mklibs library optimization -# can break the ABI compatibility, so should not be applied to the -# images which are to be extended or upgraded later. -#This enabled mklibs library size optimization just for the specified image. -#MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal" -#This enable mklibs library size optimization will be for all the images. -#MKLIBS_OPTIMIZED_IMAGES ?= "all" - # This value is currently used by pseudo to determine if the recipe should # build both the 32-bit and 64-bit wrapper libraries on a 64-bit build system. #
meta/recipes-devtools/mklibs/files/ac_init_fix.patch deleted +0 -19
@@ -1,19 +0,0 @@ -Get the version of mklibs by simpler means. The MKLIBS_VERSION string in the -configure.ac file is replaced with real version string by the -do_configure_prepend() function from the recipe .bb file. - -Upstream-Status: Inappropriate [configuration] - -Nitin A Kamble <[email protected]> -Date: 2011/01/24 - -Index: mklibs/configure.ac -=================================================================== ---- mklibs.orig/configure.ac 2010-02-21 17:34:56.000000000 -0800 -+++ mklibs/configure.ac 2011-01-24 18:52:19.943242079 -0800 -@@ -1,4 +1,4 @@ --AC_INIT([mklibs],m4_esyscmd(dpkg-parsechangelog | perl -ne 'print $1 if m/^Version: (.*)$/;')) -+AC_INIT([mklibs], MKLIBS_VERSION) - AM_INIT_AUTOMAKE([foreign no-define]) - AC_CONFIG_HEADERS([config.h]) - AM_MAINTAINER_MODE
meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch deleted +0 -103
103 lines not on this page · raw message
meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch deleted +0 -26
@@ -1,26 +0,0 @@ -The libc6-dev in Ubuntu 9.04 is so old that the elf.h doesn't -define STT_GNU_IFUNC, so we have to define it ourselves. - -Upstream-Status: Inappropriate [other] - old release specific, maybe removable - --- Dexuan Cui ([email protected]) Feb 16, 2011. - -diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp -index 2444c39..56d93f8 100644 ---- a/src/mklibs-readelf/main.cpp -+++ b/src/mklibs-readelf/main.cpp -@@ -6,6 +6,14 @@ - #include <vector> - - #include <elf.h> -+/* -+ * The /usr/include/elf.h in some distributions(like Ubuntu 9.04) doesn't -+ * define the macro. We need to define it here. -+ */ -+#ifndef STT_GNU_IFUNC -+#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */ -+#endif -+ - #include <getopt.h> - - #include "elf.hpp"
meta/recipes-devtools/mklibs/files/fix_cross_compile.patch deleted +0 -81
81 lines not on this page · raw message
meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From eddf04c7f8312e9c29cdb24e431b7e4fb2cc70ed Mon Sep 17 00:00:00 2001 -From: Yuanjie Huang <[email protected]> -Date: Wed, 15 Apr 2015 14:00:06 +0800 -Subject: [PATCH] Show GNU unique symbols as provided symbols - -Upstream-Status: Submitted - -GNU Unique symbol is a GNU extension employed by new version of GCC -by default. Even Standard C++ library in GCC 4.9 provides some symbols, -such as _ZNSs4_Rep20_S_empty_rep_storageE in this binding type instead -of ELF standard weak binding. -This patch adds support of this new binding type to mklibs-readelf. - -Signed-off-by: Yuanjie Huang <[email protected]> ---- - src/mklibs-readelf/main.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp -index 56d93f8..0134530 100644 ---- a/src/mklibs-readelf/main.cpp -+++ b/src/mklibs-readelf/main.cpp -@@ -88,7 +88,7 @@ static void process_symbols_provided (const Elf::section_type<Elf::section_type_ - uint8_t type = symbol->get_type (); - const std::string &name = symbol->get_name_string (); - -- if (bind != STB_GLOBAL && bind != STB_WEAK) -+ if (bind != STB_GLOBAL && bind != STB_WEAK && bind != STB_GNU_UNIQUE) - continue; - if (shndx == SHN_UNDEF || shndx == SHN_ABS) - continue; --- -1.8.5.2.233.g932f7e4 -
meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch deleted +0 -18
@@ -1,18 +0,0 @@ -In cross builds we will have to respect sysroot - -Signed-off-by: Khem Raj <[email protected]> -Upstream-Status: Pending - -Index: mklibs-0.1.39/src/mklibs -=================================================================== ---- mklibs-0.1.39.orig/src/mklibs 2014-03-01 18:25:36.000000000 +0000 -+++ mklibs-0.1.39/src/mklibs 2014-10-19 00:51:46.813534596 +0000 -@@ -495,7 +495,7 @@ - present_symbols = {} - checked_libs = small_libs - checked_libs.extend(available_libs) -- checked_libs.append(ldlib) -+ checked_libs.append(sysroot + ldlib) - for lib in checked_libs: - for symbol in provided_symbols(lib): - debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb deleted +0 -22
@@ -1,22 +0,0 @@ -SUMMARY = "Shared library optimisation tool" -DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables." -HOMEPAGE = "https://launchpad.net/mklibs" -SECTION = "devel" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64" - -SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/m/mklibs/mklibs_${PV}.tar.xz \ - file://ac_init_fix.patch\ - file://fix_STT_GNU_IFUNC.patch\ - file://sysrooted-ldso.patch \ - file://avoid-failure-on-symbol-provided-by-application.patch \ - file://show-GNU-unique-symbols-as-provided-symbols.patch \ - file://fix_cross_compile.patch \ -" - -SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc" -SRC_URI[sha256sum] = "3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2" - -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/m/mklibs/" - -inherit autotools gettext native
Quoted 7 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
Quoted 6 lines
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)
What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
The problem is that mklibs-native doesn't build with gcc 11, and "image-mklibs" was in USER_CLASSES by default in hardknott.
I sent a patch to fix mklibs build here:
https://lists.openembedded.org/g/openembedded-core/message/151982
but after some discussions we just decided to drop mklibs support entirely with the proposed patch.
/Jacob
Quoted 23 lines · Jacob Kroon
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
The problem is that mklibs-native doesn't build with gcc 11, and "image-mklibs" was in
USER_CLASSESby default in hardknott.
Quoted 6 lines
I sent a patch to fix mklibs build here:
https://lists.openembedded.org/g/openembedded-core/message/151982
but after some discussions we just decided to drop mklibs support entirely with the proposed patch.
ok, that is something we should fix. My worry is that the backport as is will need everyone to update their local.conf since the class will no longer be there and it will throw errors if people try and include it. This isn't what people expect from a point release.
Could we just remove it from local.conf in hardknott? That should solve the issue but reduce risk to anyone who has hardknott already working fine with an older gcc.
Cheers,
Richard
Quoted 31 lines · Richard Purdie
Quoted 23 lines · Jacob Kroon
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
The problem is that mklibs-native doesn't build with gcc 11, and "image-mklibs" was in
USER_CLASSESby default in hardknott.Quoted 6 lines
I sent a patch to fix mklibs build here:
https://lists.openembedded.org/g/openembedded-core/message/151982
but after some discussions we just decided to drop mklibs support entirely with the proposed patch.
Quoted 9 lines
ok, that is something we should fix. My worry is that the backport as is will need everyone to update their local.conf since the class will no longer be there and it will throw errors if people try and include it. This isn't what people expect from a point release.
Could we just remove it from local.conf in hardknott? That should solve the issue but reduce risk to anyone who has hardknott already working fine with an older gcc.
Yeah I'm ok with that, I'm even ok with leaving it as it is :-)
Or perhaps we should forward-port
ef8b7946b4793db653ef7dd716e1d3f919a84725
in dunfell branch to hardknott, which also should take care of it.
/Jacob
Quoted 21 lines · Jacob Kroon
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
Quoted 6 lines
The problem is that mklibs-native doesn't build with gcc 11, and "image-mklibs" was in
USER_CLASSESby default in hardknott.I sent a patch to fix mklibs build here:
https://lists.openembedded.org/g/openembedded-core/message/151982
This fix is correct and it is trivial. We can apply it
Quoted 3 lines
but after some discussions we just decided to drop mklibs support entirely with the proposed patch.
Was there any other reason ?
Quoted 11 lines
/Jacob
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158263): https://lists.openembedded.org/g/openembedded-core/message/158263
Mute This Topic: https://lists.openembedded.org/mt/87042685/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 29 lines · Khem Raj
Quoted 21 lines · Jacob Kroon
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Jacob Kroon
From: Alexander Kanavin <[email protected]>
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3.
https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>Signed-off-by Jacob Kroon <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 908df863b419d1cad7317153101fc827e7e3a354)What issue is it causing in hardknott? Normally we don't backport invasive changes like that...
Quoted 6 lines
The problem is that mklibs-native doesn't build with gcc 11, and "image-mklibs" was in
USER_CLASSESby default in hardknott.I sent a patch to fix mklibs build here:
https://lists.openembedded.org/g/openembedded-core/message/151982
Quoted 8 lines
This fix is correct and it is trivial. We can apply it
Quoted 3 lines
but after some discussions we just decided to drop mklibs support entirely with the proposed patch.
Was there any other reason ?
To have it successfully build (with mklibs actually enabled by putting your image in MKLIBS_OPTIMIZED_IMAGES) would require additional fixes, including updating mklibs to python3 I believe.
/Jacob