patch for non /usr/lib libdir
cover patch for non /usr/lib libdir
in multilib case, libdir is usually not standard /usr/lib, so this series of patches are addressing some recipes's build failure when libdir is not /usr/lib, for example, libdir=/usr/lib64.
All the patches have no impact to current libdir=/usr/lib situation, since they just replace the hardcode /usr/lib with libdir.
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
http://git.pokylinux.org/cgit.cgi//log/?h=kyu3/libdir
Yu Ke (8):
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
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 | 295 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 +- meta/recipes-support/libcap/libcap.inc | 5 +- meta/recipes-support/libcap/libcap_2.20.bb | 2 +- 12 files changed, 323 insertions(+), 15 deletions(-) create mode 100644 meta/recipes-devtools/python/python/multilib.patch
PATCH 1/8 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/8 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/8 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
Re: [PATCH 3/8] libc-package.bbclass: fix for non /usr/lib libdir case
Quoted 24 lines · Yu Ke
if 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.Signed-off-by Yu Ke <[email protected]>--- meta/classes/libc-package.bbclass | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)meta/classes/libc-package.bbclass +0
-0
meta/classes/libc-package.bbclass python package_do_split_gconvs () { · line 307
Quoted 10 lines
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)
This must be against an older tree since Lianhao sent a patch for this already?
Cheers,
Richard
PATCH 4/8 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 | 295 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.6.6.bb | 3 +- 2 files changed, 297 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/python/python/multilib.patch
meta/recipes-devtools/python/python/multilib.patch new file +295 -0
@@ -0,0 +1,295 @@ +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]> + +diff --git a/Include/pythonrun.h b/Include/pythonrun.h +index 039b498..e8ee59a 100644 +--- a/Include/pythonrun.h ++++ b/Include/pythonrun.h +@@ -108,6 +108,8 @@ 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_GetArch(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); +diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py +index 76efe3b..2a9913f 100644 +--- a/Lib/distutils/command/install.py ++++ b/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', +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 350e48c..13bb5da 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + 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: +diff --git a/Lib/pydoc.py b/Lib/pydoc.py +index 20f4952..4ffb644 100755 +--- a/Lib/pydoc.py ++++ b/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', +diff --git a/Lib/site.py b/Lib/site.py +index 66c56c2..12b1c8e 100644 +--- a/Lib/site.py ++++ b/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 +diff --git a/Lib/test/test_dl.py b/Lib/test/test_dl.py +index c04bc1b..17c0546 100755 +--- a/Lib/test/test_dl.py ++++ b/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'), + ] +diff --git a/Lib/trace.py b/Lib/trace.py +index 3611f88..9c13aa1 100644 +--- a/Lib/trace.py ++++ b/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) +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 943a120..a6f1669 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -75,6 +75,8 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ ++ARCH= @ARCH@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -91,7 +93,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/@LIB@ + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +@@ -510,6 +512,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Modules/python.o: $(srcdir)/Modules/python.c +@@ -541,7 +544,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)"' -DARCH='"$(ARCH)"' -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 +diff --git a/Modules/getpath.c b/Modules/getpath.c +index f28f4c6..24f8e5e 100644 +--- a/Modules/getpath.c ++++ b/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) +diff --git a/Python/getplatform.c b/Python/getplatform.c +index 6899140..66a49c6 100644 +--- a/Python/getplatform.c ++++ b/Python/getplatform.c +@@ -10,3 +10,23 @@ Py_GetPlatform(void) + { + return PLATFORM; + } ++ ++#ifndef ARCH ++#define ARCH "unknown" ++#endif ++ ++const char * ++Py_GetArch(void) ++{ ++ return ARCH; ++} ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +diff --git a/Python/sysmodule.c b/Python/sysmodule.c +index 6703ba5..9ef4bd6 100644 +--- a/Python/sysmodule.c ++++ b/Python/sysmodule.c +@@ -1379,6 +1379,10 @@ _PySys_Init(void) + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("arch", ++ PyString_FromString(Py_GetArch())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", +diff --git a/configure.in b/configure.in +index 50b8072..8152ef4 100644 +--- a/configure.in ++++ b/configure.in +@@ -613,6 +613,41 @@ SunOS*) + ;; + esac + ++AC_SUBST(ARCH) ++AC_MSG_CHECKING(ARCH) ++ARCH=`uname -m` ++case $ARCH in ++i?86) ARCH=i386;; ++esac ++AC_MSG_RESULT($ARCH) ++ ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++case $ac_sys_system in ++Linux*) ++ # Test if the compiler is 64bit ++ echo 'int i;' > conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then ++ case `/usr/bin/file conftest.$ac_objext` in ++ *"ELF 64"*) ++ python_cv_cc_64bit_output=yes ++ ;; ++ esac ++ fi ++ rm -rf conftest* ++ ;; ++esac ++ ++case $ARCH:$python_cv_cc_64bit_output in ++ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64" ++ ;; ++*:*) ++ LIB="lib" ++ ;; ++esac ++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
Re: [PATCH 4/8] python: fix for libdir=/usr/lib64 case
Quoted 6 lines · Yu Ke
python 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
Signed-off-by Yu Ke <[email protected]>
[...]
Quoted 16 lines
++AC_SUBST(LIB)
++AC_MSG_CHECKING(LIB)
++case $ac_sys_system in
++Linux*)++ # Test if the compiler is 64bit ++ echo 'int i;' > conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then++ case
/usr/bin/file conftest.$ac_objextin
++ *"ELF 64"*)
++ python_cv_cc_64bit_output=yes
++ ;;
++ esac++ fi ++ rm -rf conftest* ++ ;;
Quoted 12 lines
++esac
++
++case $ARCH:$python_cv_cc_64bit_output in
++ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64"
++ ;;
++*:*)
++ LIB="lib"
++ ;;
++esac
++AC_MSG_RESULT($LIB)
+
This patch is good apart from this bit. I think we need to be able to pass in our own string to use here which we derive from the libdir variable...
Cheers,
Richard
Re: [PATCH 4/8] python: fix for libdir=/usr/lib64 case
Quoted 37 lines · Richard Purdie
Quoted 6 lines · Yu Ke
python 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
Signed-off-by Yu Ke<[email protected]>[...]
Quoted 16 lines
++AC_SUBST(LIB)
++AC_MSG_CHECKING(LIB)
++case $ac_sys_system in
++Linux*)++ # Test if the compiler is 64bit ++ echo 'int i;'> conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then++ case
/usr/bin/file conftest.$ac_objextin
++ *"ELF 64"*)
++ python_cv_cc_64bit_output=yes
++ ;;
++ esac++ fi ++ rm -rf conftest* ++ ;;Quoted 12 lines
++esac
++
++case $ARCH:$python_cv_cc_64bit_output in
++ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64"
++ ;;
++*:*)
++ LIB="lib"
++ ;;
++esac
++AC_MSG_RESULT($LIB)
+
Quoted 4 lines
This patch is good apart from this bit. I think we need to be able to pass in our own string to use here which we derive from the libdir variable...
Yes, indeed. I will revise it to use libdir instead of hardcode lib/lib64.
Regards
Ke
PATCH 5/8 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/8 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
Re: [PATCH 6/8] perl: fix for non /usr/lib libdir case
Hi Ke,
Is this for multilib ?
Nitin
Quoted 50 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Yu Ke
Sent: Thursday, July 07, 2011 7:10 AM
To: [email protected]; [email protected]
Subject: [OE-core] [PATCH 6/8] perl: fix for non/usr/liblibdir casethe
config.shis hardcoded to be/usr/lib, which does not work in non/usr/liblibdir case.This patch replace the hard code
/usr/libwith ${libdir} to fix this issueSigned-off-by Yu Ke <[email protected]>--- meta/recipes-devtools/perl/perl_5.12.3.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)meta/recipes- renamed from meta/recipes-devtools/perl/perl_5.12.3.bb +0
-0devtools/perl/perl_5.12.3.bb
index b053482..88dcfdd 100644meta/recipes-devtools/perl/perl_5.12.3.bb +2
-2@@ -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} --1.7.0.4
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 6/8] perl: fix for non /usr/lib libdir case
Quoted 2 lines · Nitin A
Hi Ke,
Is this for multilib ?
Yes, it is.
Cheers,
Richard
PATCH 7/8 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/8 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