rpm compilation on uclibc
v3 cover rpm compilation on uclibc
This patch now can compile a uclibc sato image using rpm as packaging backend fixes libzypp, zypper, sat-solver builds on uclibc
Upgrades uclibc-0.9.33 to latest on branch since we need
the fixes for glib-2.32.x to work correctly.
Fix glib-2.32.x build failure on x86_64/uclibc by caching
the relevant config variables (guint32/guint64) same patch was applied to other architecture site files recently.
The following changes since commit ba380813c0198f95b1e786aa7f49b80c68cfe9b9:
gcc-configure-target: Fix sysroot option breakage I introduced (sorry) (2012-06-14 19:48:07 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/misc-updates
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc-updates
Khem Raj (9):
uclibc_0.9.33.bb: Upgrade to latest git site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
rpm: Fix compilation on uclibc
rpm: Use link time check for libssp
sat-solver: Fix build on uclibc
libzypp: Fix build with uclibc
rpm: pass lrt and lpthread to link step explicitly for uclibc
zypper: Fix build on uclibc
libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc
meta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 +- .../rpm/rpm/fstack-protector-configure-check.patch | 13 ++++ meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++ meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 7 ++- meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 +++++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 9 ++- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 + meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++ meta/recipes-extended/zypper/zypper_git.bb | 2 + meta/site/x86_64-linux-uclibc | 3 + 12 files changed, 245 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch create mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/cstdio.patch create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch create mode 100644 meta/recipes-extended/zypper/zypper/rpmatch.patch
Signature · 1 line
1.7.5.4
PATCH v3 1/9 uclibc_0.9.33.bb: Upgrade to latest git
This is needed otherwise glib-2.0 wont run
correctly
--- meta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/uclibc/uclibc_0.9.33.bb +2 -2
@@ -1,8 +1,8 @@ -SRCREV="f7c18471f1ff8f3e54e462df0e96e19739869c78" +SRCREV="7810e4f8027b5c4c8ceec6fefec4eb779362ebb5" require uclibc.inc -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" SRC_URI = "git://uclibc.org/uClibc.git;branch=${PV};protocol=git \
Signature · 1 line
1.7.5.4
PATCH v3 2/9 site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
Without this glib 2.32.x wont build.
--- meta/site/x86_64-linux-uclibc | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/site/x86_64-linux-uclibc +3 -0
@@ -60,6 +60,9 @@ am_cv_func_working_getline=${am_cv_func_working_getline=yes} # glib-2.0 glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=8 # libidl libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
Signature · 1 line
1.7.5.4
PATCH v3 3/9 rpm: Fix compilation on uclibc
In reply to Khem Rajrpmatch is not there in uclibc therefore add logic to configure to detect it.
x* wrappers need to be defined for uclibc as well.
--- meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++ meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 4 +- 3 files changed, 108 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch create mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch
meta/recipes-devtools/rpm/rpm/rpmatch.patch new file +42 -0
@@ -0,0 +1,42 @@ +Add configure check for rpmatch() and +creates a compatable macro if it is not provided by the C library. + +This is needed for uclibc since it does not have the above function +implemented. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> + +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-05-31 15:40:05.985990822 -0700 ++++ rpm-5.4.0/configure.ac 2012-05-31 15:41:15.601995311 -0700 +@@ -800,7 +800,7 @@ + ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl + getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl + lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl +- posix_fadvise posix_fallocate putenv realpath regcomp __secure_getenv dnl ++ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch __secure_getenv dnl + setattrlist setenv setlocale setmode setxattr dnl + sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl + sigprocmask sigsuspend sigaction dnl +Index: rpm-5.4.0/system.h +=================================================================== +--- rpm-5.4.0.orig/system.h 2012-05-31 15:40:05.997991504 -0700 ++++ rpm-5.4.0/system.h 2012-05-31 15:42:04.941997731 -0700 +@@ -410,6 +410,14 @@ + #endif /* defined(__GNUC__) */ + #endif /* HAVE_MCHECK_H */ + ++#ifndef HAVE_RPMATCH ++#define rpmatch(line) \ ++ ( (line == NULL)? -1 : \ ++ (*line == 'y' || *line == 'Y')? 1 : \ ++ (*line == 'n' || *line == 'N')? 0 : \ ++ -1 ) ++#endif ++ + /* Retrofit glibc __progname */ + #if defined __GLIBC__ && __GLIBC__ >= 2 + #if __GLIBC_MINOR__ >= 1
meta/recipes-devtools/rpm/rpm/uclibc-support.patch new file +63 -0
63 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm_5.4.9.bb +3 -1
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "libpcre attr acl popt ossp-uuid file" -PR = "r43" +PR = "r44" # 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...
@@ -72,6 +72,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-ossp-uuid.patch \ file://rpm-packageorigin.patch \ file://rpm-pkgconfigdeps.patch \ + file://uclibc-support.patch \ + file://rpmatch.patch \ " SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
Signature · 1 line
1.7.5.4
PATCH v3 4/9 rpm: Use link time check for libssp
In reply to Khem Raj-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
system
--- .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-06-01 11:41:19.741480143 -0700 ++++ rpm-5.4.0/configure.ac 2012-06-01 11:41:51.773481676 -0700 +@@ -193,7 +193,7 @@ + my_save_cflags="$CFLAGS" + CFLAGS=$c + AC_MSG_CHECKING([whether GCC supports $c]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [my_cflags=$c], + [AC_MSG_RESULT([no])]
meta/recipes-devtools/rpm/rpm_5.4.9.bb +1 -0
@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-pkgconfigdeps.patch \ file://uclibc-support.patch \ file://rpmatch.patch \ + file://fstack-protector-configure-check.patch \ " SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
Signature · 1 line
1.7.5.4
Re: [PATCH 4/9] rpm: Use link time check for libssp
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
Quoted 17 lines · Khem Raj
-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
systemSigned-off-by Khem Raj <[email protected]>--- .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patchmeta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +0
-0
This is a rather subtle patch with no header information (author, explaination, upstream status).
Cheers,
Richard
Quoted 26 lines
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +13
-0@@ -0,0 +1,13 @@ +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-06-01 11:41:19.741480143 -0700 ++++ rpm-5.4.0/configure.ac 2012-06-01 11:41:51.773481676 -0700 +@@ -193,7 +193,7 @@ + my_save_cflags="$CFLAGS" + CFLAGS=$c + AC_MSG_CHECKING([whether GCC supports $c]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [my_cflags=$c], + [AC_MSG_RESULT([no])]meta/recipes-devtools/rpm/rpm_5.4.9.bb +1
-0@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-pkgconfigdeps.patch \ file://uclibc-support.patch \ file://rpmatch.patch \ + file://fstack-protector-configure-check.patch \ " SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
Re: [PATCH 4/9] rpm: Use link time check for libssp
Quoted 13 lines · Richard Purdie
Quoted 12 lines · Khem Raj
-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
systemSigned-off-by Khem Raj <[email protected]>---
.../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +2 files changed, 14 insertions(+), 0 deletions(-)create mode 100644
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
Quoted 9 lines
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
Quoted 5 lines
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +0
-0This is a rather subtle patch with no header information (author, explaination, upstream status).
oversight on my part. I have added a patch header to it and updated the pull request.
Quoted 38 lines
Cheers,
Richard
Quoted 25 lines
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +13
-0@@ -0,0 +1,13 @@ +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-06-01 11:41:19.741480143 -0700 ++++ rpm-5.4.0/configure.ac 2012-06-01 11:41:51.773481676 -0700 +@@ -193,7 +193,7 @@ + my_save_cflags="$CFLAGS" + CFLAGS=$c + AC_MSG_CHECKING([whether GCC supports $c]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [my_cflags=$c], + [AC_MSG_RESULT([no])]meta/recipes-devtools/rpm/rpm_5.4.9.bb +1
-0@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-pkgconfigdeps.patch \ file://uclibc-support.patch \ file://rpmatch.patch \ + file://fstack-protector-configure-check.patch \"
Quoted 1 line
SRC_URI[md5sum] = "
60d56ace884340c1b3fcac6a1d58e768"_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 4/9] rpm: Use link time check for libssp
In reply to Khem RajQuoted 4 lines · Khem Raj
-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
system
Won't this still break on systems without libssp where sstate-cache was built on systems with libssp?
-M
Quoted 46 lines
Signed-off-by Khem Raj <[email protected]>--- .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patchmeta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +13
-0@@ -0,0 +1,13 @@ +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-06-01 11:41:19.741480143 -0700 ++++ rpm-5.4.0/configure.ac 2012-06-01 11:41:51.773481676 -0700 +@@ -193,7 +193,7 @@ + my_save_cflags="$CFLAGS" + CFLAGS=$c + AC_MSG_CHECKING([whether GCC supports $c]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [my_cflags=$c], + [AC_MSG_RESULT([no])]meta/recipes-devtools/rpm/rpm_5.4.9.bb +1
-1@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-pkgconfigdeps.patch \ file://uclibc-support.patch \ file://rpmatch.patch \ + file://fstack-protector-configure-check.patch \ " SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" --1.7.5.4
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 4/9] rpm: Use link time check for libssp
Quoted 3 lines · On Mon, Sep 24, 2012 at 1:36 PM, McClintock Matthew-B29882…
Won't this still break on systems without libssp where sstate-cache was built on systems with libssp?
these two systems are not same IMO so native sstate should not be shared here it will break more than rpm.
Re: [PATCH 4/9] rpm: Use link time check for libssp
Quoted 8 lines · Khem Raj
Quoted 3 lines · On Mon, Sep 24, 2012 at 1:36 PM, McClintock Matthew-B29882…
Won't this still break on systems without libssp where sstate-cache was built on systems with libssp?
these two systems are not same IMO so native sstate should not be shared here it will break more than rpm.
If you build a binary and it depends on libssp it's its going to break if that changes between builds. Can we just always disable libssp?
-M
Quoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH v3 5/9 sat-solver: Fix build on uclibc
In reply to Khem Rajfutimes is not available on uclibc so use utimes qsort is also not as expected by sat-solver therefore for uclibc we resort to using internal version of qsort
--- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++ 2 files changed, 35 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
meta/recipes-extended/sat-solver/sat-solver/futimes.patch new file +32 -0
@@ -0,0 +1,32 @@ +This patch uses utimes instead of futimes for uclibc +since futimes is not available + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +Index: git/examples/solv.c +=================================================================== +--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700 ++++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700 +@@ -1027,7 +1027,8 @@ + int flags; + + cinfo = repo->appdata; +- if (!(fp = fopen(calccachepath(repo, repoext), "r"))) ++ const char* fname = calccachepath(repo, repoext); ++ if (!(fp = fopen(fname, "r"))) + return 0; + if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1) + { +@@ -1068,7 +1069,11 @@ + memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie)); + } + if (mark) ++#ifdef __UCLIBC__ ++ utimes(fname, 0); /* try to set modification time */ ++#else + futimes(fileno(fp), 0); /* try to set modification time */ ++#endif + fclose(fp); + return 1; + }
meta/recipes-extended/sat-solver/sat-solver_git.bb +3 -0
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \ file://sat-solver_core.patch \ file://fix_gcc-4.6.0_compile_issue.patch \ file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \ + file://futimes.patch \ " S = "${WORKDIR}/git"
@@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" +TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 " + inherit cmake pkgconfig RDEPENDS_${PN} = "rpm-libs"
Signature · 1 line
1.7.5.4
Re: [PATCH 5/9] sat-solver: Fix build on uclibc
Quoted 63 lines · Khem Raj
futimes is not available on uclibc so use utimes qsort is also not as expected by sat-solver therefore for uclibc we resort to using internal version of qsort
Signed-off-by Khem Raj <[email protected]>--- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++ 2 files changed, 35 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patchmeta/recipes-extended/sat-solver/sat-solver/futimes.patch new file +32
-0@@ -0,0 +1,32 @@ +This patch uses utimes instead of futimes for uclibc +since futimes is not available + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +Index: git/examples/solv.c +=================================================================== +--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700 ++++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700 +@@ -1027,7 +1027,8 @@ + int flags; + + cinfo = repo->appdata; +- if (!(fp = fopen(calccachepath(repo, repoext), "r"))) ++ const char* fname = calccachepath(repo, repoext); ++ if (!(fp = fopen(fname, "r"))) + return 0; + if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1) + { +@@ -1068,7 +1069,11 @@ + memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie)); + } + if (mark) ++#ifdef __UCLIBC__ ++ utimes(fname, 0); /* try to set modification time */ ++#else + futimes(fileno(fp), 0); /* try to set modification time */ ++#endif + fclose(fp); + return 1; + }meta/recipes-extended/sat-solver/sat-solver_git.bb +1
-0@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \ file://sat-solver_core.patch \ file://fix_gcc-4.6.0_compile_issue.patch \ file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \ + file://futimes.patch \ " S = "${WORKDIR}/git"
meta/recipes-extended/sat-solver/sat-solver_git.bb EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" · line 33
Quoted 5 lines
meta/recipes-extended/sat-solver/sat-solver_git.bb +2
-0@@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" +TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 " +
I suspect you mean TUNE_CCARGS_append_libc-uclibc here?
Cheers,
Richard
Re: [PATCH 5/9] sat-solver: Fix build on uclibc
Quoted 65 lines · Richard Purdie
Quoted 64 lines · Khem Raj
futimes is not available on uclibc so use utimes qsort is also not as expected by sat-solver therefore for uclibc we resort to using internal version of qsort
Signed-off-by Khem Raj <[email protected]>---
.../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++2 files changed, 35 insertions(+), 0 deletions(-)create mode 100644
meta/recipes-extended/sat-solver/sat-solver/futimes.patchmeta/recipes-extended/sat-solver/sat-solver/futimes.patch new file +32
-0@@ -0,0 +1,32 @@ +This patch uses utimes instead of futimes for uclibc +since futimes is not available + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +Index: git/examples/solv.c +=================================================================== +--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700 ++++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700 +@@ -1027,7 +1027,8 @@ + int flags; + + cinfo = repo->appdata; +- if (!(fp = fopen(calccachepath(repo, repoext), "r"))) ++ const char* fname = calccachepath(repo, repoext); ++ if (!(fp = fopen(fname, "r"))) + return 0; + if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1) + { +@@ -1068,7 +1069,11 @@ + memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie)); + } + if (mark) ++#ifdef __UCLIBC__ ++ utimes(fname, 0); /* try to set modification time */ ++#else + futimes(fileno(fp), 0); /* try to set modification time */ ++#endif + fclose(fp); + return 1; + }meta/recipes-extended/sat-solver/sat-solver_git.bb +1
-0@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \ file://sat-solver_core.patch \ file://fix_gcc-4.6.0_compile_issue.patch \ file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \ + file://futimes.patch \"
S = "${WORKDIR}/git"
meta/recipes-extended/sat-solver/sat-solver_git.bb +0
-0@@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
Quoted 6 lines
meta/recipes-extended/sat-solver/sat-solver_git.bb EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" · line 33
Quoted 4 lines
EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
meta/recipes-extended/sat-solver/sat-solver_git.bb +2
-0+TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 " +I suspect you mean TUNE_CCARGS_append_libc-uclibc here?
indeed good catch. This was incorrect and it worked because it overwrote TUNE_CCARGS and I did not see it because the options I wanted was still present and it was building.
I have updated the pull tree with this changed.
Quoted 10 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 5/9] sat-solver: Fix build on uclibc
In reply to Khem RajQuoted 1 line · Khem Raj
futimes is not available on uclibc so use utimes
futimes is non-standard, use futimens instead (or utimes as in this case).
Quoted 3 lines
qsort is also not as expected by sat-solver therefore for uclibc we resort to using internal version of qsort
What does that mean, please elaborate? uClibc does have qsort{,_r}..
thanks,
PATCH v3 6/9 libzypp: Fix build with uclibc
In reply to Khem Rajcstdio is included indrectly with eglibc based systems but not with uclibc based systems and use of functions like ::eof are then reported as warnings. Therefore we include cstdio explicitly.
--- meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 ++++++++++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 10 +++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/libzypp/libzypp/cstdio.patch
meta/recipes-extended/libzypp/libzypp/cstdio.patch new file +49 -0
@@ -0,0 +1,49 @@ +include cstdio to get definitions of ::xxx functions which +are now reported by gcc-4.7 as wanrings and warnings are treated +as errors + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: git/zypp/ExternalProgram.cc +=================================================================== +--- git.orig/zypp/ExternalProgram.cc 2012-06-01 16:25:17.098304709 -0700 ++++ git/zypp/ExternalProgram.cc 2012-06-01 16:25:37.254305681 -0700 +@@ -22,6 +22,7 @@ + #include <cstring> // strsignal + #include <iostream> + #include <sstream> ++#include <cstdio> + + #include "zypp/base/Logger.h" + #include "zypp/base/String.h" +Index: git/zypp/PluginScript.cc +=================================================================== +--- git.orig/zypp/PluginScript.cc 2012-06-01 16:21:37.814294089 -0700 ++++ git/zypp/PluginScript.cc 2012-06-01 16:24:41.002302961 -0700 +@@ -14,6 +14,7 @@ + + #include <iostream> + #include <sstream> ++#include <cstdio> + + #include "zypp/base/LogTools.h" + #include "zypp/base/DefaultIntegral.h" +@@ -336,7 +337,7 @@ + if ( fd == -1 ) + ZYPP_THROW( PluginScriptException( "Bad file descriptor" ) ); + +- ::clearerr( filep ); ++ std::clearerr( filep ); + std::string data; + { + PluginDebugBuffer _debug( data ); // dump receive buffer if PLUGIN_DEBUG +@@ -370,7 +371,7 @@ + int retval = select( fd+1, &rfds, NULL, NULL, &tv ); + if ( retval > 0 ) // FD_ISSET( fd, &rfds ) will be true. + { +- ::clearerr( filep ); ++ std::clearerr( filep ); + } + else if ( retval == 0 ) + {
meta/recipes-extended/libzypp/libzypp_git.bb +8 -2
@@ -11,7 +11,7 @@ DEPENDS = "rpm boost curl libxml2 zlib sat-solver expat openssl udev libproxy" S = "${WORKDIR}/git" SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433" PV = "0.0-git${SRCPV}" -PR = "r22" +PR = "r23" SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://no-doc.patch \
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://hardcode-lib-fix.patch \ file://close.patch \ file://libzypp-rpm549.patch \ + file://cstdio.patch \ " SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -32,7 +33,10 @@ SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch" # rpmdb2solv from sat-solver is run from libzypp -RDEPENDS_${PN} = "sat-solver rpm-libs gzip gnupg" +RDEPENDS_${PN} = "sat-solver rpm-libs gzip ${RDEPGNUPG}" + +RDEPGNUPG = "gnupg" +RDEPGNUPG_libc-uclibc = "" PACKAGES =+ "${PN}-pkgmgt"
@@ -46,6 +50,8 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \ EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" +LDFLAGS += "-lpthread" + PACKAGE_ARCH = "${MACHINE_ARCH}" AVOID_CONSTRUCTOR = ""
Signature · 1 line
1.7.5.4
PATCH v3 7/9 rpm: pass lrt and lpthread to link step explicitly for uclibc
In reply to Khem RajThese need to appear in DT_NEEDED for librpmio.so
for uclibc somehow it does not get added to link
cmdline so we do it explicitly.
--- meta/recipes-devtools/rpm/rpm_5.4.9.bb | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +2 -0
@@ -182,6 +182,8 @@ EXTRA_OECONF += "--verbose \ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" +LDFLAGS_append_libc-uclibc = "-lrt -lpthread" + PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" SOLIBS = "5.4.so"
Signature · 1 line
1.7.5.4
PATCH v3 8/9 zypper: Fix build on uclibc
In reply to Khem Rajuclibc does not have rpmatch() so we define
it if zypper is being compiled for uclibc
--- meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++++++++++++++++ meta/recipes-extended/zypper/zypper_git.bb | 2 + 2 files changed, 25 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-extended/zypper/zypper/rpmatch.patch
meta/recipes-extended/zypper/zypper/rpmatch.patch new file +23 -0
@@ -0,0 +1,23 @@ +rpmatch() is missing in uclibc so we provide a local definition +in form of a macro + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: git/src/utils/prompt.h +=================================================================== +--- git.orig/src/utils/prompt.h 2012-06-06 15:51:00.899112775 -0700 ++++ git/src/utils/prompt.h 2012-06-06 15:52:17.003116762 -0700 +@@ -172,4 +172,12 @@ + return errstr; + } + ++#ifdef __UCLIBC__ ++#define rpmatch(line) \ ++ ( (line == NULL)? -1 : \ ++ (*line == 'y' || *line == 'Y')? 1 : \ ++ (*line == 'n' || *line == 'N')? 0 : \ ++ -1 ) ++#endif /* __UCLIBC__ */ ++ + #endif /*ZYPPERPROMPT_H_*/
meta/recipes-extended/zypper/zypper_git.bb +2 -0
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/openSUSE/zypper.git;protocol=git \ file://dso_linking_change_build_fix.patch \ file://rpm5-flag.patch \ file://gcc-scope.patch \ + file://rpmatch.patch \ " S = "${WORKDIR}/git"
@@ -25,3 +26,4 @@ RDEPENDS_${PN} = "rpm-libs" RRECOMMENDS_${PN} = "procps util-linux-uuidgen" PACKAGE_ARCH = "${MACHINE_ARCH}" +OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-lintl"
Signature · 1 line
1.7.5.4
PATCH v3 9/9 libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc
In reply to Khem Raj--- meta/recipes-extended/libzypp/libzypp_git.bb | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
meta/recipes-extended/libzypp/libzypp_git.bb +1 -2
@@ -49,8 +49,7 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \ " EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" - -LDFLAGS += "-lpthread" +OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-pthread" PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
1.7.5.4
Quoted 41 lines · Khem Raj
This patch now can compile a uclibc sato image using rpm as packaging backend fixes libzypp, zypper, sat-solver builds on uclibc
Upgrades uclibc-0.9.33 to latest on branch since we need
the fixes for glib-2.32.x to work correctly.
Fix glib-2.32.x build failure on x86_64/uclibc by caching
the relevant config variables (guint32/guint64) same patch was applied to other architecture site files recently.The following changes since commit
ba380813c0198f95b1e786aa7f49b80c68cfe9b9:gcc-configure-target: Fix sysroot option breakage I introduced (sorry) (2012-06-14 19:48:07 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribkraj/misc-updates
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc-updatesKhem Raj (9):
uclibc_0.9.33.bb: Upgrade to latest git site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
rpm: Fix compilation on uclibc
rpm: Use link time check for libssp
sat-solver: Fix build on uclibc
libzypp: Fix build with uclibc
rpm: pass lrt and lpthread to link step explicitly for uclibc
zypper: Fix build on uclibc
libzypp: DefineOECMAKE_CXX_LINK_FLAGSwhen compiling for uclibcmeta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 +- .../rpm/rpm/fstack-protector-configure-check.patch | 13 ++++ meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++ meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.9.bb | 7 ++- meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 +++++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 9 ++- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 + meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++ meta/recipes-extended/zypper/zypper_git.bb | 2 + meta/site/x86_64-linux-uclibc | 3 + 12 files changed, 245 insertions(+), 5 deletions(-)
Quoted 7 lines
create mode 100644
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patchcreate mode 100644meta/recipes-devtools/rpm/rpm/rpmatch.patch
create mode 100644meta/recipes-devtools/rpm/rpm/uclibc-support.patchcreate mode 100644meta/recipes-extended/libzypp/libzypp/cstdio.patchcreate mode 100644meta/recipes-extended/sat-solver/sat-solver/futimes.patchcreate mode 100644meta/recipes-extended/zypper/zypper/rpmatch.patch
Merged Updated set into OE-Core
Thanks
Sau!