Skip to contentSkip to conversation

ncurses: Upgrade 4.9 stable to latest patchlevel 20150221

PATCH In review Khem Raj 2 participants 8 messages Feb 27, 2015 – Mar 23, 2015

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/6 ncurses: Upgrade 4.9 stable to latest patchlevel 20150221

gcc5 barfs on older release

Change-Id Ib1ad9b1cf7f16eb454da21fd61dc56fe1d9f6783
---
 meta/recipes-core/ncurses/ncurses.inc    | 5 ++++-
 meta/recipes-core/ncurses/ncurses_5.9.bb | 7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +4 -1
index 10f7dd1..49de358 100644
@@ -13,7 +13,7 @@ BINCONFIG = "${bindir}/ncurses-config"
 inherit autotools binconfig-disabled multilib_header
 
 # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz"
+SRC_URI = "ftp://invisible-island.net/${BPN}/current/${BP}-${REVISION}.tgz"
 
 EXTRA_AUTORECONF = "-I m4"
 CONFIG_SITE =+ "${WORKDIR}/config.cache"
@@ -97,6 +97,8 @@ do_configure() {
         # broken because it requires stdin to be pollable (which is
         # not the case for /dev/null redirections)
         export cf_cv_working_poll=yes
+	#Remove ${includedir} from CPPFLAGS, need for cross compile
+ 	sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS"
 
 	# The --enable-pc-files requires PKG_CONFIG_LIBDIR existed
 	mkdir -p ${PKG_CONFIG_LIBDIR}
@@ -105,6 +107,7 @@ do_configure() {
 		return 1
 	! ${ENABLE_WIDEC} || \
 		ncurses_configure "widec" "--enable-widec" "--without-progs"
+
 }
 
 do_compile() {
meta/recipes-core/ncurses/ncurses_5.9.bb +5 -2
index 6d23c0c..02db497 100644
@@ -1,10 +1,13 @@
 require ncurses.inc
 
+REVISION = "20150221"
+
 PR = "${INC_PR}.1"
 
 SRC_URI += "file://tic-hang.patch \
             file://config.cache \
 "
+S = "${WORKDIR}/${BP}-${REVISION}"
+SRC_URI[md5sum] = "e54c989cdf8fbb750d5639a83a89c61b"
+SRC_URI[sha256sum] = "9de5b66f8c434a09ff0647e97fc76f2329d406c2726fa3f9968e361941f02b07"
 
-SRC_URI[md5sum] = "8cb9c412e5f2d96bc6f459aa8c6282a1"
-SRC_URI[sha256sum] = "9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b"
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 2/6 libgpg-error: Add -P option to CPPFLAGS

Fixes https://www.mail-archive.com/[email protected]/msg1301822.html

libgpg-error FTBFS when built with gcc-5. Here is the relevant excerpt:

| Making all in src
| make[4]: Entering directory '/tmp/buildd/libgpg-error/libgpg-error-1.17/src'
| gawk -f ./mkstrtable.awk -v textidx=3 \
|         ./err-sources.h.in >err-sources.h
| gawk -f ./mkstrtable.awk -v textidx=3 \
|         ./err-codes.h.in >err-codes.h
| gawk -f ./mkerrnos.awk ./errnos.in >code-to-errno.h
| gawk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
| gcc -E -D_FORTIFY_SOURCE=2  _mkerrcodes.h | grep GPG_ERR_ | \
|                gawk -f ./mkerrcodes.awk >mkerrcodes.h
| rm _mkerrcodes.h
| gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
| In file included from ./mkerrcodes.c:26:0:
| ./mkerrcodes.h:9:5: error: expected expression before ',' token
|    { , "GPG_ERR_E2BIG" },
|      ^

It makes invalid assumptions on undefined behaviour of gcc. To see why, let us look at the contents of the intermediate steps:

_mkerrcodes.h (deleted):

| ...
| #ifdef E2BIG
| E2BIG   GPG_ERR_E2BIG
| #endif
| #ifdef WSAE2BIG
| WSAE2BIG        GPG_ERR_E2BIG
| #endif
| ...

gcc -E -D_FORTIFY_SOURCE=2 _mkerrcodes.h | grep -v '^$':

| ...
| # 26 "_mkerrcodes.h" 2
| 7
| # 31 "_mkerrcodes.h"
|      GPG_ERR_E2BIG
| # 37 "_mkerrcodes.h" 3 4
| 13
| # 37 "_mkerrcodes.h"
|       GPG_ERR_EACCES
| ...

As can be seen here, the cpp from gcc-5 can split lines and "grep GPG_ERR_" fails to account for that.

Change-Id I6f1476e4afc7163ebc3a05106ceaa3b83e3fab3e
---
 meta/recipes-support/libgpg-error/libgpg-error_1.18.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libgpg-error/libgpg-error_1.18.bb +1 -1
index 9501b67..6d11605 100644
@@ -19,7 +19,7 @@ SRC_URI[sha256sum] = "9ff1d6e61d4cef7c1d0607ceef6d40dc33f3da7a3094170c3718c00153
 BINCONFIG = "${bindir}/gpg-error-config"
 
 inherit autotools binconfig-disabled pkgconfig gettext
-
+CPPFLAGS += "-P"
 do_compile_prepend() {
 	TARGET_FILE=linux-gnu
 	if [ ${TARGET_OS} != "linux" ]; then
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH 3/6 mtd-utils: update to latest and fix static inlining

In reply to Khem Raj

use static storage class instead of extern for inline functions and remove duplicate definitions as a result

Change-Id I72e8c5f19dff656c18f719d1e9e2ca697c9a856f
---
 ...emove-duplicate-hashtable_iterator_value-.patch | 56 ++++++++++++++++++++++
 meta/recipes-devtools/mtd/mtd-utils_git.bb         |  3 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch new file +56 -0
new file mode 100644
index 0000000..695f020
@@ -0,0 +1,56 @@
+From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 25 Feb 2015 09:28:26 +0000
+Subject: [PATCH] hashtable: Remove duplicate
+ hashtable_iterator_value/hashtable_iterator_key
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.h
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h
++++ git/mkfs.ubifs/hashtable/hashtable_itr.h
+@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
+ /* hashtable_iterator_key
+  * - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_key(struct hashtable_itr *i)
+ {
+     return i->e->k;
+@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
+ /*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_value(struct hashtable_itr *i)
+ {
+     return i->e->v;
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.c
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c
++++ git/mkfs.ubifs/hashtable/hashtable_itr.c
+@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
+ }
+ 
+ /*****************************************************************************/
+-/* key      - return the key of the (key,value) pair at the current position */
+-/* value    - return the value of the (key,value) pair at the current position */
+-
+-void *
+-hashtable_iterator_key(struct hashtable_itr *i)
+-{ return i->e->k; }
+-
+-void *
+-hashtable_iterator_value(struct hashtable_itr *i)
+-{ return i->e->v; }
+-
+-/*****************************************************************************/
+ /* advance - advance the iterator to the next element
+  *           returns zero if advanced to end of table */
+ 
meta/recipes-devtools/mtd/mtd-utils_git.bb +2 -1
index 267d1e9..ce63695 100644
@@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
 
 # Use the latest version at 26 Oct, 2013
-SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+SRCREV = "92686f212c9a4e16891c6a3c57629cbf4f0f8360"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
 		file://add-exclusion-to-mkfs-jffs2-git-2.patch \
 		file://fix-armv7-neon-alignment.patch \
+		file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \
 "
 
 PV = "1.5.1+git${SRCPV}"
Signature · 1 line
2.1.4
#3 lore raw

Re: [PATCH 3/6] mtd-utils: update to latest and fix static inlining

Hi Khem,

Quoted 3 lines · Khem Raj

use static storage class instead of extern for inline functions and remove duplicate definitions as a result

There's now a master-next-1.9 branch to start collecting all the patches for when master un-freezes. This doesn't apply anymore, can you rebase and re-send?

Ross

author
#4 lore raw

Re: [PATCH 3/6] mtd-utils: update to latest and fix static inlining

Quoted 11 lines · Ross

Hi Khem,

On 27 February 2015 at 19:19, Khem Raj <[email protected] <mailto:[email protected]>> wrote:
use static storage class instead of extern for inline functions
and remove duplicate definitions as a result

There's now a master-next-1.9 branch to start collecting all the patches for when master un-freezes. This doesn't apply anymore, can you rebase and re-send?

Please take them from contrib/kraj/master

Quoted 1 line

Ross

#5 lore raw

Re: [PATCH 3/6] mtd-utils: update to latest and fix static inlining

Quoted 2 lines · Khem Raj

Please take them from contrib/kraj/master

Great, thanks.

Ross

author
#6 lore raw

PATCH 4/6 glibc_2.21.bb: Fix condition to skip parsing the recipe for non-glibc libc

In reply to Khem Raj

The condition should be uclibc 'or' musl then we know its not glibc right now it checks with 'and' operator, that condition will never be true

Change-Id Ifc48e81fd0b3c18d8e1ef76a18c216dc6acda092
---
 meta/recipes-core/glibc/glibc_2.21.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc_2.21.bb +1 -1
index 6e54046..693d937 100644
@@ -67,7 +67,7 @@ GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn
 #
 python __anonymous () {
     import re
-    notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) and (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None)
+    notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None)
     if notglibc:
         raise bb.parse.SkipPackage("incompatible with target %s" %
                                    d.getVar('TARGET_OS', True))
Signature · 1 line
2.1.4
author
#7 lore raw

PATCH 5/6 buildstats.bbclass: typecast argument to os.minor/os.major to long

In reply to Khem Raj

Started to run into this error on ubuntu 15.04

ERROR: Execution of event handler 'run_buildstats' failed
Traceback (most recent call last):
File "run_buildstats(e)", line 18, in run_buildstats(e=<bb.event.BuildStarted object at 0x7f93341c1b50>) File "buildstats.bbclass", line 17, in set_device(e=<bb.event.BuildStarted object at 0x7f93341c1b50>)
SystemError: ../Objects/longobject.c:998: bad argument to internal function

ERROR: Command execution failed: Traceback (most recent call last):
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 303, in buildTargets
command.cooker.buildTargets(pkgs_to_build, task)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/cooker.py", line 1336, in buildTargets
bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 163, in fire
fire_class_handlers(event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 102, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 76, in execute_handler
ret = handler(event)
File "run_buildstats(e)", line 18, in run_buildstats
File "buildstats.bbclass", line 17, in set_device
SystemError: ../Objects/longobject.c:998: bad argument to internal function

similar to here
http://pycuda.2962900.n2.nabble.com/bad-argument-to-internal-function-td4063274.html

If it is right fix .. Dont know

Change-Id I84f3a4043ad5246e080dfd7e2f066e5292d4af91
---
 meta/classes/buildstats.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/buildstats.bbclass +2 -2
index 89ae72c..4844264 100644
@@ -52,8 +52,8 @@ def set_device(e):
     # If we end up hitting one of these fs, we'll just skip diskstats collection.
     ############################################################################
     device=os.stat(tmpdir)
-    majordev=os.major(device.st_dev)
-    minordev=os.minor(device.st_dev)
+    majordev=os.major(long(device.st_dev))
+    minordev=os.minor(long(device.st_dev))
     ############################################################################
     # Bug 1700: 
     # Because tmpfs/encryptfs/ramfs etc inserts no entry in /proc/diskstats
Signature · 1 line
2.1.4