patch for non /usr/lib libdir - V2
cover patch for non /usr/lib libdir - V2
This is the V2 patches. the changes compared to V1 are:
- revise python patch to make the sys.lib deriving from libdir, instead of hardcode to lib64
- add two more fixes: sat-solver and libzypp, with these two more fixes, i can build qemux86-64 core-image-sato and core-image-sato-sdk with libdir=/usr/lib64
Next step, I will do through test to make sure it does not impact normal libdir=/usr/lib case
The following changes since commit 2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
Tom Zanussi (1):
systemtap: remove non-core COMPATIBLE_MACHINES
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kyu3/libdir-fix-v2
http://git.pokylinux.org/cgit.cgi//log/?h=kyu3/libdir-fix-v2
Yu Ke (10):
native.bbclass: generate libdir from libdir_native
openssl: fix for non /usr/lib libdir case libc-package.bbclass: fix for non /usr/lib libdir case
python: fix for libdir=/usr/lib64 case
python-native: fix for non /usr/lib libdir case
perl: fix for non /usr/lib libdir case
libcap: fix for non /usr/lib libdir case
rpm: fix for non /usr/lib libdir case
sat-solver: fix for non /usr/lib libdir case
libzypp: fix for non /usr/lib libdir case
meta/classes/cmake.bbclass | 4 + meta/classes/libc-package.bbclass | 4 +- meta/classes/native.bbclass | 2 + meta/recipes-connectivity/openssl/openssl.inc | 2 +- .../recipes-connectivity/openssl/openssl_0.9.8r.bb | 2 +- meta/recipes-devtools/perl/perl_5.12.3.bb | 3 +- ...2-distutils-prefix-is-inside-staging-area.patch | 15 +- .../recipes-devtools/python/python-native_2.6.6.bb | 2 +- meta/recipes-devtools/python/python/multilib.patch | 250 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 +- .../libzypp/libzypp/hardcode-lib-fix.patch | 22 ++ meta/recipes-extended/libzypp/libzypp_git.bb | 5 +- meta/recipes-extended/sat-solver/sat-solver_git.bb | 6 +- meta/recipes-support/libcap/libcap.inc | 5 +- meta/recipes-support/libcap/libcap_2.20.bb | 2 +- 16 files changed, 311 insertions(+), 19 deletions(-) create mode 100644 meta/recipes-devtools/python/python/multilib.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch
PATCH 1/10 native.bbclass: generate libdir from libdir_native
currently, the libdir in native.bbclass is inherited from target libdir defined in bitbake.conf. This is not correct in concept, instead, it should be inherited from libdir_native. Current code works because both the target libdir and libdir_native are the same value "/usr/lib". But if libdir changes (e.g. to /usr/lib64), then build will break.
This patch make libdir generated from libdir_native to fix this issue.
--- meta/classes/native.bbclass | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/native.bbclass +2 -0
@@ -67,6 +67,8 @@ base_prefix = "${STAGING_DIR_NATIVE}" prefix = "${STAGING_DIR_NATIVE}${prefix_native}" exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}" +libdir = "${STAGING_DIR_NATIVE}${libdir_native}" + NATIVE_PACKAGE_PATH_SUFFIX = "" bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
Signature · 1 line
1.7.0.4
PATCH 2/10 openssl: fix for non /usr/lib libdir case
In reply to Yu Keif libdir is not /usr/lib, e.g /usr/lib64, openssl build will fail because it still use /usr/lib as library dir.
this patch appends the configure option "--libdir" to specify the correct library directory
--- meta/recipes-connectivity/openssl/openssl.inc | 2 +- .../recipes-connectivity/openssl/openssl_0.9.8r.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +1 -1
@@ -93,7 +93,7 @@ do_configure () { if [ "x$useprefix" = "x" ]; then useprefix=/ fi - perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl $target + perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target } do_compile () {
meta/recipes-connectivity/openssl/openssl_0.9.8r.bb +1 -1
@@ -1,6 +1,6 @@ require openssl.inc -PR = "r1" +PR = "r2" SRC_URI += "file://debian/ca.patch \ file://debian/config-hurd.patch;apply=no \ file://debian/debian-targets.patch \
Signature · 1 line
1.7.0.4
PATCH 3/10 libc-package.bbclass: fix for non /usr/lib libdir case
In reply to Yu Keif libdir is not /usr/lib, e.g. libdir=/usr/lib64, eglibc will
have build failure:
"
cross-localedef --uint32-align=4 --little-endian --force --old-style --no-archive --prefix=/home/kyu3/sdb/lib64/tmp/work/x86_64-poky-linux/eglibc-2.13-r2+svnr14157/locale-tree --inputfile=/home/kyu3/sdb/lib64/tmp/work/x86_64-poky-linux/eglibc-2.13-r2+svnr14157/locale-tree//usr/share/i18n/locales/es_NI --charmap=UTF-8 /home/kyu3/sdb/lib64/tmp/work/x86_64-poky-linux/eglibc-2.13-r2+svnr14157/locale-tree/usr/lib/locale/es_NI
NOTE: stdout:
NOTE:
NOTE: stderr:
NOTE: cannot write output files to `(null)': No such file or directory
ERROR: Function 'localedef returned an error' failed
"
the reason is that libc-package.bbclass has hard code "/usr/lib". This patch fix it by using libdir variable.
--- meta/classes/libc-package.bbclass | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/libc-package.bbclass +2 -2
@@ -300,8 +300,8 @@ python package_do_split_gconvs () { raise bb.build.FuncFailed("unknown arch:" + target_arch + " for locale_arch_options") localedef_opts += " --force --old-style --no-archive --prefix=%s \ - --inputfile=%s/%s/i18n/locales/%s --charmap=%s %s/usr/lib/locale/%s" \ - % (treedir, treedir, datadir, locale, encoding, treedir, name) + --inputfile=%s/%s/i18n/locales/%s --charmap=%s %s%s/locale/%s" \ + % (treedir, treedir, datadir, locale, encoding, treedir, libdir, name) cmd = "PATH=\"%s\" I18NPATH=\"%s\" GCONV_PATH=\"%s\" cross-localedef %s" % \ (path, i18npath, gconvpath, localedef_opts)
Signature · 1 line
1.7.0.4
PATCH 4/10 python: fix for libdir=/usr/lib64 case
In reply to Yu Kepython has several place hard code "lib" which breaks build when libdir=/usr/lib64. SUSE has a patch to fix this issue.
So this patch add the SUSE patch to address this issue
--- meta/recipes-devtools/python/python/multilib.patch | 250 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- 2 files changed, 252 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/python/python/multilib.patch
meta/recipes-devtools/python/python/multilib.patch new file +250 -0
@@ -0,0 +1,250 @@ +commit 248279e54467a8cd5cde98fc124d1d1384703513 +Author: Yu Ke <[email protected]> +Date: Tue Jun 28 21:21:29 2011 +0800 + + SUSE patch for the lib64 issue + + see detail in http://bugs.python.org/issue1294959 + + also rebased a bit for Yocto python 2.6.6 + + Picked-by: Yu Ke <[email protected]> + +Index: Python-2.6.6/Include/pythonrun.h +=================================================================== +--- Python-2.6.6.orig/Include/pythonrun.h ++++ Python-2.6.6/Include/pythonrun.h +@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); + /* In their own files */ + PyAPI_FUNC(const char *) Py_GetVersion(void); + PyAPI_FUNC(const char *) Py_GetPlatform(void); ++PyAPI_FUNC(const char *) Py_GetLib(void); + PyAPI_FUNC(const char *) Py_GetCopyright(void); + PyAPI_FUNC(const char *) Py_GetCompiler(void); + PyAPI_FUNC(const char *) Py_GetBuildInfo(void); +Index: Python-2.6.6/Lib/distutils/command/install.py +=================================================================== +--- Python-2.6.6.orig/Lib/distutils/command/install.py ++++ Python-2.6.6/Lib/distutils/command/install.py +@@ -22,6 +22,8 @@ from site import USER_BASE + from site import USER_SITE + + ++libname = sys.lib ++ + if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', +@@ -42,7 +44,7 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +Index: Python-2.6.6/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.6.6.orig/Lib/distutils/sysconfig.py ++++ Python-2.6.6/Lib/distutils/sysconfig.py +@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": +- libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ if plat_specific or standard_lib: ++ lib = sys.lib ++ else: ++ lib = "lib" ++ libpython = os.path.join(prefix, lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +Index: Python-2.6.6/Lib/pydoc.py +=================================================================== +--- Python-2.6.6.orig/Lib/pydoc.py ++++ Python-2.6.6/Lib/pydoc.py +@@ -349,7 +349,7 @@ class Doc: + + docloc = os.environ.get("PYTHONDOCS", + "http://docs.python.org/library") +- basedir = os.path.join(sys.exec_prefix, "lib", ++ basedir = os.path.join(sys.exec_prefix, sys.lib, + "python"+sys.version[0:3]) + if (isinstance(object, type(os)) and + (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', +Index: Python-2.6.6/Lib/site.py +=================================================================== +--- Python-2.6.6.orig/Lib/site.py ++++ Python-2.6.6/Lib/site.py +@@ -265,13 +265,19 @@ def addsitepackages(known_paths): + if sys.platform in ('os2emx', 'riscos'): + sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': +- sitedirs.append(os.path.join(prefix, "lib", ++ sitedirs.append(os.path.join(prefix, sys.lib, + "python" + sys.version[:3], + "site-packages")) +- sitedirs.append(os.path.join(prefix, "lib", "site-python")) ++ if sys.lib != "lib": ++ sitedirs.append(os.path.join(prefix, "lib", ++ "python" + sys.version[:3], ++ "site-packages")) ++ sitedirs.append(os.path.join(prefix, sys.lib, "site-python")) ++ if sys.lib != "lib": ++ sitedirs.append(os.path.join(prefix, "lib", "site-python")) + else: + sitedirs.append(prefix) +- sitedirs.append(os.path.join(prefix, "lib", "site-packages")) ++ sitedirs.append(os.path.join(prefix, sys.lib, "site-packages")) + + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple +Index: Python-2.6.6/Lib/test/test_dl.py +=================================================================== +--- Python-2.6.6.orig/Lib/test/test_dl.py ++++ Python-2.6.6/Lib/test/test_dl.py +@@ -4,10 +4,11 @@ + """ + from test.test_support import verbose,TestSkipped, import_module + dl = import_module('dl', deprecated=True) ++import sys + + sharedlibs = [ +- ('/usr/lib/libc.so', 'getpid'), +- ('/lib/libc.so.6', 'getpid'), ++ ('/usr/'+sys.lib+'/libc.so', 'getpid'), ++ ('/'+sys.lib+'/libc.so.6', 'getpid'), + ('/usr/bin/cygwin1.dll', 'getpid'), + ('/usr/lib/libc.dylib', 'getpid'), + ] +Index: Python-2.6.6/Lib/trace.py +=================================================================== +--- Python-2.6.6.orig/Lib/trace.py ++++ Python-2.6.6/Lib/trace.py +@@ -759,10 +759,10 @@ def main(argv=None): + # should I also call expanduser? (after all, could use $HOME) + + s = s.replace("$prefix", +- os.path.join(sys.prefix, "lib", ++ os.path.join(sys.prefix, sys.lib, + "python" + sys.version[:3])) + s = s.replace("$exec_prefix", +- os.path.join(sys.exec_prefix, "lib", ++ os.path.join(sys.exec_prefix, sys.lib, + "python" + sys.version[:3])) + s = os.path.normpath(s) + ignore_dirs.append(s) +Index: Python-2.6.6/Makefile.pre.in +=================================================================== +--- Python-2.6.6.orig/Makefile.pre.in ++++ Python-2.6.6/Makefile.pre.in +@@ -75,6 +75,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -91,7 +92,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -509,6 +510,7 @@ Modules/getpath.o: $(srcdir)/Modules/get + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Modules/python.o: $(srcdir)/Modules/python.c +@@ -540,7 +542,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) + Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +Index: Python-2.6.6/Modules/getpath.c +=================================================================== +--- Python-2.6.6.orig/Modules/getpath.c ++++ Python-2.6.6/Modules/getpath.c +@@ -116,9 +116,11 @@ + #define EXEC_PREFIX PREFIX + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; + static char exec_prefix[MAXPATHLEN+1]; + static char progpath[MAXPATHLEN+1]; + static char *module_search_path = NULL; +-static char lib_python[] = "lib/python" VERSION; ++static char lib_python[] = LIB_PYTHON; + + static void + reduce(char *dir) +Index: Python-2.6.6/Python/getplatform.c +=================================================================== +--- Python-2.6.6.orig/Python/getplatform.c ++++ Python-2.6.6/Python/getplatform.c +@@ -10,3 +10,13 @@ Py_GetPlatform(void) + { + return PLATFORM; + } ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +Index: Python-2.6.6/Python/sysmodule.c +=================================================================== +--- Python-2.6.6.orig/Python/sysmodule.c ++++ Python-2.6.6/Python/sysmodule.c +@@ -1379,6 +1379,8 @@ _PySys_Init(void) + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", +Index: Python-2.6.6/configure.in +=================================================================== +--- Python-2.6.6.orig/configure.in ++++ Python-2.6.6/configure.in +@@ -613,6 +613,10 @@ SunOS*) + ;; + esac + ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++LIB=`basename ${LIBDIR}` ++AC_MSG_RESULT($LIB) + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY)
meta/recipes-devtools/python/python_2.6.6.bb +2 -1
@@ -1,7 +1,7 @@ require python.inc DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" -PR = "${INC_PR}.4" +PR = "${INC_PR}.5" LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6" DISTRO_SRC_URI ?= "file://sitecustomize.py"
@@ -17,6 +17,7 @@ SRC_URI = "\ file://06-avoid_usr_lib_termcap_path_in_linking.patch \ file://99-ignore-optimization-flag.patch \ ${DISTRO_SRC_URI} \ + file://multilib.patch \ " SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14"
Signature · 1 line
1.7.0.4
PATCH 5/10 python-native: fix for non /usr/lib libdir case
In reply to Yu Kethe get_python_lib() use hard code "lib". when other recipe building use python-native, the STAGING_LIBDIR is non /usr/lib, so the hard code "lib" will break the build
This patch replace the hardcoded "lib" with value from libdir to fix this issue.
--- ...2-distutils-prefix-is-inside-staging-area.patch | 15 +++++++++++---- .../recipes-devtools/python/python-native_2.6.6.bb | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-)
meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch +11 -4
@@ -30,19 +30,26 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py if os.name == "posix": if python_build: -@@ -116,7 +119,10 @@ def get_python_lib(plat_specific=0, stan +@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan + If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ ++ lib_basename = os.getenv("libdir").split('/')[-1] if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX + if plat_specific: -+ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib') ++ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip(lib_basename) + else: + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": libpython = os.path.join(prefix, -@@ -216,7 +222,7 @@ def get_config_h_filename(): +- "lib", "python" + get_python_version()) ++ lib_basename, "python" + get_python_version()) + if standard_lib: + return libpython + else: +@@ -216,7 +223,7 @@ def get_config_h_filename(): else: # The name of the config.h file changed in 2.2 config_h = 'pyconfig.h'
@@ -51,7 +58,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py def get_makefile_filename(): -@@ -225,7 +231,7 @@ def get_makefile_filename(): +@@ -225,7 +232,7 @@ def get_makefile_filename(): return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
meta/recipes-devtools/python/python-native_2.6.6.bb +1 -1
@@ -1,6 +1,6 @@ require python.inc DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6"
Signature · 1 line
1.7.0.4
PATCH 6/10 perl: fix for non /usr/lib libdir case
In reply to Yu Kethe config.sh is hardcoded to be /usr/lib, which does not work in non /usr/lib libdir case.
This patch replace the hard code /usr/lib with ${libdir} to fix this issue
--- meta/recipes-devtools/perl/perl_5.12.3.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-devtools/perl/perl_5.12.3.bb +2 -1
@@ -8,7 +8,7 @@ PRIORITY = "optional" # We need gnugrep (for -I) DEPENDS = "virtual/db grep-native" DEPENDS += "gdbm zlib" -PR = "r1" +PR = "r2" # 5.10.1 has Module::Build built-in PROVIDES += "libmodule-build-perl"
@@ -150,6 +150,7 @@ do_configure() { -e 's,@ARCH@-thread-multi,,g' \ -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \ -e "s%/usr/include%${STAGING_INCDIR}%g" \ + -e 's,/usr/lib/,${libdir}/,g' \ -e 's,/usr/,${exec_prefix}/,g' \ -e 's,/perl5,/perl,g' \ config.sh-${TARGET_ARCH}-${TARGET_OS}
Signature · 1 line
1.7.0.4
PATCH 7/10 libcap: fix for non /usr/lib libdir case
In reply to Yu Kethe recipe has hardcoded "lib=lib", which does not work in libdir=/usr/lib64 case where should be "lib=lib64",
So this patch fix it by replacing lib with libdir
--- meta/recipes-support/libcap/libcap.inc | 5 +++-- meta/recipes-support/libcap/libcap_2.20.bb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-support/libcap/libcap.inc +3 -2
@@ -20,8 +20,9 @@ do_configure() { sed -e 's,BUILD_CFLAGS ?=,BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules } -EXTRA_OEMAKE = "LIBATTR=yes PAM_CAP=yes INDENT= lib=lib SYSTEM_HEADERS=${STAGING_INCDIR} RAISE_SETFCAP=no" -EXTRA_OEMAKE_virtclass-native = "LIBATTR=no PAM_CAP=no INDENT= lib=lib" +EXTRA_OEMAKE = "LIBATTR=yes PAM_CAP=yes INDENT= SYSTEM_HEADERS=${STAGING_INCDIR} RAISE_SETFCAP=no" +EXTRA_OEMAKE_virtclass-native = "LIBATTR=no PAM_CAP=no INDENT= " +EXTRA_OEMAKE += " lib=${@os.path.basename('${libdir}')}" do_compile() { oe_runmake
meta/recipes-support/libcap/libcap_2.20.bb +1 -1
@@ -1,6 +1,6 @@ require libcap.inc -PR = "r1" +PR = "r2" SRC_URI[md5sum] = "10e47ed32ca2214eb0e58780282d27b4" SRC_URI[sha256sum] = "20e7c1ea4d3d5c410efb3a6ff138dc417912fae316d883460dcd58d9803a9220"
Signature · 1 line
1.7.0.4
PATCH 8/10 rpm: fix for non /usr/lib libdir case
In reply to Yu Kerpm default will use /usr/lib if the --with-path-lib is not specified. this will not work in non /usr/lib libdir case.
so this patch add the --with-path-lib to fix this issue.
--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.0.bb +2 -1
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" extrarpmdeps = "python perl" extrarpmdeps_virtclass-native = "" -PR = "r17" +PR = "r18" # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed # in order to extract the distribution SRPM into a format we can extract...
@@ -162,6 +162,7 @@ EXTRA_OECONF = "--verbose \ --enable-build-debug \ --enable-maintainer-mode \ --with-path-macros=${rpm_macros} \ + --with-path-lib=${libdir}/rpm \ --with-bugreport=http://bugzilla.yoctoproject.org" CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY"
Signature · 1 line
1.7.0.4
PATCH 9/10 sat-solver: fix for non /usr/lib libdir case
In reply to Yu Kewhen libdir set to non /usr/lib like /usr/lib64, there is do_configure error:
"
-- Libraries will be installed in /usr/lib
CMake Error at /home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Please install 'check' and 'check-devel' packages (missing: CHECK_LIBRARY)
Call Stack (most recent call first):
/home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindCheck.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:35 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
"
The reason is that cmake did not search /usr/lib64 for libcheck, thus report error
add ${libdir} to the CMAKE_SYSTEM_LIBRARY_PATH can fix this issue.
--- meta/classes/cmake.bbclass | 4 ++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-)
meta/classes/cmake.bbclass +4 -0
@@ -55,6 +55,10 @@ set( CMAKE_INSTALL_RPATH ${OECMAKE_RPATH} ) # Use native cmake modules set( CMAKE_MODULE_PATH ${STAGING_DATADIR}/cmake/Modules/ ) + +# add for non /usr/lib libdir, e.g. /usr/lib64 +LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${libdir}) + EOF }
meta/recipes-extended/sat-solver/sat-solver_git.bb +4 -2
@@ -8,7 +8,7 @@ DEPENDS = "libcheck rpm zlib expat db" SRCREV = "0a7378d5f482f477a01cf1690d76871ab8bdcc32" PV = "0.0-git${SRCPV}" -PR = "r10" +PR = "r11" PARALLEL_MAKE=""
@@ -23,7 +23,9 @@ SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ S = "${WORKDIR}/git" -EXTRA_OECMAKE += "-DLIB=lib -DRPM5=RPM5 -DOE_CORE=OE_CORE" +EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" + +EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" inherit cmake pkgconfig
Signature · 1 line
1.7.0.4
Op 11 jul 2011, om 09:23 heeft Yu Ke het volgende geschreven:
Quoted 7 lines
This is the V2 patches. the changes compared to V1 are:
- revise python patch to make the sys.lib deriving from libdir, instead of hardcode to lib64
- add two more fixes: sat-solver and libzypp, with these two more fixes, i can build qemux86-64 core-image-sato and core-image-sato-sdk with libdir=/usr/lib64Next step, I will do through test to make sure it does not impact normal libdir=/usr/lib case
Quoted 7 lines
The following changes since commit
2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
Tom Zanussi (1):
systemtap: remove non-coreCOMPATIBLE_MACHINESare available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/libdir-fix-v2
Do you also have patches against oe-core instead of poky?
That one doesn't exist
Quoted 38 lines
Yu Ke (10):
native.bbclass: generate libdir fromlibdir_native
openssl: fix for non/usr/liblibdir case libc-package.bbclass: fix for non/usr/liblibdir case
python: fix for libdir=/usr/lib64 case
python-native: fix for non/usr/liblibdir case
perl: fix for non/usr/liblibdir case
libcap: fix for non/usr/liblibdir case
rpm: fix for non/usr/liblibdir case
sat-solver: fix for non/usr/liblibdir case
libzypp: fix for non/usr/liblibdir casemeta/classes/cmake.bbclass | 4 + meta/classes/libc-package.bbclass | 4 +- meta/classes/native.bbclass | 2 + meta/recipes-connectivity/openssl/openssl.inc | 2 +- .../recipes-connectivity/openssl/openssl_0.9.8r.bb | 2 +- meta/recipes-devtools/perl/perl_5.12.3.bb | 3 +- ...2-distutils-prefix-is-inside-staging-area.patch | 15 +- .../recipes-devtools/python/python-native_2.6.6.bb | 2 +- meta/recipes-devtools/python/python/multilib.patch | 250 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 +- .../libzypp/libzypp/hardcode-lib-fix.patch | 22 ++ meta/recipes-extended/libzypp/libzypp_git.bb | 5 +- meta/recipes-extended/sat-solver/sat-solver_git.bb | 6 +- meta/recipes-support/libcap/libcap.inc | 5 +- meta/recipes-support/libcap/libcap_2.20.bb | 2 +- 16 files changed, 311 insertions(+), 19 deletions(-)create mode 100644
meta/recipes-devtools/python/python/multilib.patchcreate mode 100644meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 14 lines · Koen Kooi
Op 11 jul 2011, om 09:23 heeft Yu Ke het volgende geschreven:
Quoted 11 lines
This is the V2 patches. the changes compared to V1 are:
- revise python patch to make the sys.lib deriving from libdir, instead of hardcode to lib64
- add two more fixes: sat-solver and libzypp, with these two more fixes, i can build qemux86-64 core-image-sato and core-image-sato-sdk with libdir=/usr/lib64Next step, I will do through test to make sure it does not impact normal libdir=/usr/lib case
The following changes since commit
2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
Tom Zanussi (1):
systemtap: remove non-coreCOMPATIBLE_MACHINES
Quoted 5 lines
Quoted 3 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/libdir-fix-v2Do you also have patches against oe-core instead of poky?
Not yet. But I assume the difference between poky and oe-core is very small. do you see issue of applying these patches to oe-core? if so, I am happy to rebase this patch against oe-core.
Quoted 4 lines
Quoted 2 lines
http://git.pokylinux.org/cgit.cgi//log/?h=kyu3/libdir-fix-v2
That one doesn't exist
oh, this URL is generated by the create-pull-request script. seems there is some issue. Here is the correct URL: http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/libdir-fix-v2
Quoted 46 lines
Quoted 31 lines
Yu Ke (10):
native.bbclass: generate libdir fromlibdir_native
openssl: fix for non/usr/liblibdir case libc-package.bbclass: fix for non/usr/liblibdir case
python: fix for libdir=/usr/lib64 case
python-native: fix for non/usr/liblibdir case
perl: fix for non/usr/liblibdir case
libcap: fix for non/usr/liblibdir case
rpm: fix for non/usr/liblibdir case
sat-solver: fix for non/usr/liblibdir case
libzypp: fix for non/usr/liblibdir casemeta/classes/cmake.bbclass | 4 + meta/classes/libc-package.bbclass | 4 +- meta/classes/native.bbclass | 2 + meta/recipes-connectivity/openssl/openssl.inc | 2 +- .../recipes-connectivity/openssl/openssl_0.9.8r.bb | 2 +- meta/recipes-devtools/perl/perl_5.12.3.bb | 3 +- ...2-distutils-prefix-is-inside-staging-area.patch | 15 +- .../recipes-devtools/python/python-native_2.6.6.bb | 2 +- meta/recipes-devtools/python/python/multilib.patch | 250 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 +- .../libzypp/libzypp/hardcode-lib-fix.patch | 22 ++ meta/recipes-extended/libzypp/libzypp_git.bb | 5 +- meta/recipes-extended/sat-solver/sat-solver_git.bb | 6 +- meta/recipes-support/libcap/libcap.inc | 5 +- meta/recipes-support/libcap/libcap_2.20.bb | 2 +- 16 files changed, 311 insertions(+), 19 deletions(-)Quoted 8 lines
create mode 100644
meta/recipes-devtools/python/python/multilib.patchcreate mode 100644meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Op 11 jul 2011, om 09:54 heeft Yu Ke het volgende geschreven:
Quoted 15 lines
Quoted 14 lines · Koen Kooi
Op 11 jul 2011, om 09:23 heeft Yu Ke het volgende geschreven:
Quoted 11 lines
This is the V2 patches. the changes compared to V1 are:
- revise python patch to make the sys.lib deriving from libdir, instead of hardcode to lib64
- add two more fixes: sat-solver and libzypp, with these two more fixes, i can build qemux86-64 core-image-sato and core-image-sato-sdk with libdir=/usr/lib64Next step, I will do through test to make sure it does not impact normal libdir=/usr/lib case
The following changes since commit
2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
Tom Zanussi (1):
systemtap: remove non-coreCOMPATIBLE_MACHINES
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/libdir-fix-v2Do you also have patches against oe-core instead of poky?
Not yet. But I assume the difference between poky and oe-core is very small. do you see issue of applying these patches to oe-core? if so, I am happy to rebase this patch against oe-core.
'git merge' won't work if you publish a tree against poky. I can cherry pick 2 or 3 patches, but 10 is way too many :)
Quoted 16 lines · Yu Ke
This is the V2 patches. the changes compared to V1 are:
- revise python patch to make the sys.lib deriving from libdir, instead of hardcode to lib64
- add two more fixes: sat-solver and libzypp, with these two more fixes, i can build qemux86-64 core-image-sato and core-image-sato-sdk with libdir=/usr/lib64Next step, I will do through test to make sure it does not impact normal libdir=/usr/lib case
The following changes since commit
2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
Tom Zanussi (1):
systemtap: remove non-coreCOMPATIBLE_MACHINESare available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/libdir-fix-v2
http://git.pokylinux.org/cgit.cgi//log/?h=kyu3/libdir-fix-v2
Quoted 10 lines
Yu Ke (10):
native.bbclass: generate libdir fromlibdir_native
openssl: fix for non/usr/liblibdir case libc-package.bbclass: fix for non/usr/liblibdir case
python: fix for libdir=/usr/lib64 case
python-native: fix for non/usr/liblibdir case
perl: fix for non/usr/liblibdir case
libcap: fix for non/usr/liblibdir case
rpm: fix for non/usr/liblibdir case
sat-solver: fix for non/usr/liblibdir case
I merged these apart from the libc-package.bbclass change which doesn't apply against master and isn't needed since a different patch was already applied.
FWIW, these were hard to apply as they're based against an older tree :(
Quoted 1 line
libzypp: fix for non
/usr/liblibdir case
This one didn't make it to the mailing list, please resend.
Cheers,
Richard