All of lore.kernel.org
 help / color / mirror / Atom feed
* Sudden errors building Sumo
@ 2019-01-10 16:23 Ferry Toth
  2019-01-10 20:48 ` akuster808
  0 siblings, 1 reply; 6+ messages in thread
From: Ferry Toth @ 2019-01-10 16:23 UTC (permalink / raw)
  To: openembedded-core

After a new checkout I am experiencing multiple errors building Sumo 
that might be related:
bison-3.0.4

cross-localedef-native_2.27

coreutils-8.29

On another machine with slightly out-of-date Sumo these problems do not 
occur.


Detail below.


Any ideas how to fix?

Ferry


virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile

| ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
| ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib 
fseterr.c to your platform! Look at the definitions of ferror and 
clearerr on your system, then report this to bug-gnulib."
| #error "Please port gnulib fseterr.c to your platform! Look at the 
definitions of ferror and clearerr on your system, then report this to 
bug-gnulib."
| ^~~~~


/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile

| /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld: 
argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
| /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld: 
argp-help.o: in function `argp_failure':
| argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
| collect2: error: ld returned 1 exit status


virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile

| ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
| ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port 
gnulib freadseek.c to your platform! Look at the definition of getc, 
getc_unlocked on your system, then report this to bug-gnulib."
| #error "Please port gnulib freadseek.c to your platform! Look at the 
definition of getc, getc_unlocked on your system, then report this to 
bug-gnulib."
| ^~~~~



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sudden errors building Sumo
  2019-01-10 16:23 Sudden errors building Sumo Ferry Toth
@ 2019-01-10 20:48 ` akuster808
  2019-01-10 20:49   ` Marek Vasut
  2019-01-11 11:07   ` Ferry Toth
  0 siblings, 2 replies; 6+ messages in thread
From: akuster808 @ 2019-01-10 20:48 UTC (permalink / raw)
  To: Ferry Toth, openembedded-core



On 1/10/19 8:23 AM, Ferry Toth wrote:
> After a new checkout I am experiencing multiple errors building Sumo
> that might be related:
> bison-3.0.4
>
> cross-localedef-native_2.27
>
> coreutils-8.29
>
> On another machine with slightly out-of-date Sumo these problems do
> not occur.
>
>
> Detail below.
>
>
> Any ideas how to fix?
Can you provide how you are building this ie, local.conf, MACHINE and host

What are your before and after commit hashes used?

- armin
>
> Ferry
>
>
> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile
>
>
> | ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
> | ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib
> fseterr.c to your platform! Look at the definitions of ferror and
> clearerr on your system, then report this to bug-gnulib."
> | #error "Please port gnulib fseterr.c to your platform! Look at the
> definitions of ferror and clearerr on your system, then report this to
> bug-gnulib."
> | ^~~~~
>
>
> /home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile
>
>
> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
> argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
> argp-help.o: in function `argp_failure':
> | argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
> | collect2: error: ld returned 1 exit status
>
>
> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile
>
>
> | ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
> | ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port
> gnulib freadseek.c to your platform! Look at the definition of getc,
> getc_unlocked on your system, then report this to bug-gnulib."
> | #error "Please port gnulib freadseek.c to your platform! Look at the
> definition of getc, getc_unlocked on your system, then report this to
> bug-gnulib."
> | ^~~~~
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sudden errors building Sumo
  2019-01-10 20:48 ` akuster808
@ 2019-01-10 20:49   ` Marek Vasut
  2019-01-10 20:52     ` Marek Vasut
  2019-01-11 11:07   ` Ferry Toth
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2019-01-10 20:49 UTC (permalink / raw)
  To: akuster808, Ferry Toth, openembedded-core

On 1/10/19 9:48 PM, akuster808 wrote:
> 
> 
> On 1/10/19 8:23 AM, Ferry Toth wrote:
>> After a new checkout I am experiencing multiple errors building Sumo
>> that might be related:
>> bison-3.0.4
>>
>> cross-localedef-native_2.27
>>
>> coreutils-8.29
>>
>> On another machine with slightly out-of-date Sumo these problems do
>> not occur.
>>
>>
>> Detail below.
>>
>>
>> Any ideas how to fix?
> Can you provide how you are building this ie, local.conf, MACHINE and host
> 
> What are your before and after commit hashes used?
> 
> - armin
>>
>> Ferry
>>
>>
>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile
>>
>>
>> | ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
>> | ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib
>> fseterr.c to your platform! Look at the definitions of ferror and
>> clearerr on your system, then report this to bug-gnulib."
>> | #error "Please port gnulib fseterr.c to your platform! Look at the
>> definitions of ferror and clearerr on your system, then report this to
>> bug-gnulib."
>> | ^~~~~
>>
>>
>> /home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile
>>
>>
>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>> argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>> argp-help.o: in function `argp_failure':
>> | argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
>> | collect2: error: ld returned 1 exit status
>>
>>
>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile
>>
>>
>> | ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
>> | ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port
>> gnulib freadseek.c to your platform! Look at the definition of getc,
>> getc_unlocked on your system, then report this to bug-gnulib."
>> | #error "Please port gnulib freadseek.c to your platform! Look at the
>> definition of getc, getc_unlocked on your system, then report this to
>> bug-gnulib."
>> | ^~~~~

Sounds like one of those glibc-2.28 problems ?

-- 
Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sudden errors building Sumo
  2019-01-10 20:49   ` Marek Vasut
@ 2019-01-10 20:52     ` Marek Vasut
  2019-01-11 16:06       ` Ferry Toth
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2019-01-10 20:52 UTC (permalink / raw)
  To: akuster808, Ferry Toth, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]

On 1/10/19 9:49 PM, Marek Vasut wrote:
> On 1/10/19 9:48 PM, akuster808 wrote:
>>
>>
>> On 1/10/19 8:23 AM, Ferry Toth wrote:
>>> After a new checkout I am experiencing multiple errors building Sumo
>>> that might be related:
>>> bison-3.0.4
>>>
>>> cross-localedef-native_2.27
>>>
>>> coreutils-8.29
>>>
>>> On another machine with slightly out-of-date Sumo these problems do
>>> not occur.
>>>
>>>
>>> Detail below.
>>>
>>>
>>> Any ideas how to fix?
>> Can you provide how you are building this ie, local.conf, MACHINE and host
>>
>> What are your before and after commit hashes used?
>>
>> - armin
>>>
>>> Ferry
>>>
>>>
>>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile
>>>
>>>
>>> | ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
>>> | ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib
>>> fseterr.c to your platform! Look at the definitions of ferror and
>>> clearerr on your system, then report this to bug-gnulib."
>>> | #error "Please port gnulib fseterr.c to your platform! Look at the
>>> definitions of ferror and clearerr on your system, then report this to
>>> bug-gnulib."
>>> | ^~~~~
>>>
>>>
>>> /home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile
>>>
>>>
>>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>>> argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
>>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>>> argp-help.o: in function `argp_failure':
>>> | argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
>>> | collect2: error: ld returned 1 exit status
>>>
>>>
>>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile
>>>
>>>
>>> | ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
>>> | ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port
>>> gnulib freadseek.c to your platform! Look at the definition of getc,
>>> getc_unlocked on your system, then report this to bug-gnulib."
>>> | #error "Please port gnulib freadseek.c to your platform! Look at the
>>> definition of getc, getc_unlocked on your system, then report this to
>>> bug-gnulib."
>>> | ^~~~~
> 
> Sounds like one of those glibc-2.28 problems ?

Oh, in fact, I have this fixed locally, didn't get to sending the
patches out, see the two attached patches. One is backport from
oe-core/master , the other is something I grab'd from who knows where,
feel free to tweak the patches and post them.

-- 
Best regards,
Marek Vasut

[-- Attachment #2: 0001-cross-localedef.patch --]
[-- Type: text/x-patch, Size: 3905 bytes --]

From 0c01a1dc3bc821acffb0e00d4831ed3cb94b685d Mon Sep 17 00:00:00 2001
From: Marek Vasut <marex@denx.de>
Date: Thu, 20 Dec 2018 17:10:54 +0100
Subject: [PATCH] cross-localedef

Signed-off-by: Marek Vasut <marex@denx.de>
---
 .../glibc/cross-localedef-native_2.27.bb      |  1 +
 ...ll-_IO_fwide-if-_LIBC-is-not-defined.patch | 72 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch

diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
index 5e92eb71d5..e270675651 100644
--- a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
@@ -36,6 +36,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
            file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
            file://archive-path.patch \
+	   file://0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch \
 "
 # Makes for a rather long rev (22 characters), but...
 #
diff --git a/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch b/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch
new file mode 100644
index 0000000000..2dac4865cc
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0001-argp-do-not-call-_IO_fwide-if-_LIBC-is-not-defined.patch
@@ -0,0 +1,72 @@
+From 3a67e81d7527363a96af095a5af03b6201b82e9d Mon Sep 17 00:00:00 2001
+From: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
+Date: Thu, 29 Nov 2018 17:56:55 +0000
+Subject: [PATCH] argp: do not call _IO_fwide() if _LIBC is not defined
+
+_IO_fwide() is defined in libio.h file. This file is included only
+when _LIBC is defined.
+
+So, in case of compilation of these files without _LIBC definition,
+the compilation failed due to this unknown function.
+
+Now this function is called when libio.h file is included.
+
+(Change merged from gnulib.  Tested on x86_64.)
+
+	* argp/argp-fmtstream.c (__argp_fmtstream_update): Use [_LIBC]
+	conditional on calls to _IO_fwide and putwc_unlocked.  (Merge from
+	gnulib.)
+	* argp/argp-help.c (__argp_failure): Likewise.
+---
+ ChangeLog             | 7 +++++++
+ argp/argp-fmtstream.c | 4 ++++
+ argp/argp-help.c      | 2 ++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c
+index e43a0c7cf1..e9e4c0e5cc 100644
+--- a/argp/argp-fmtstream.c
++++ b/argp/argp-fmtstream.c
+@@ -149,9 +149,11 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
+ 	      size_t i;
+ 	      for (i = 0; i < pad; i++)
+ 		{
++#ifdef _LIBC
+ 		  if (_IO_fwide (fs->stream, 0) > 0)
+ 		    putwc_unlocked (L' ', fs->stream);
+ 		  else
++#endif
+ 		    putc_unlocked (' ', fs->stream);
+ 		}
+ 	    }
+@@ -312,9 +314,11 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
+ 	      *nl++ = ' ';
+ 	  else
+ 	    for (i = 0; i < fs->wmargin; ++i)
++#ifdef _LIBC
+ 	      if (_IO_fwide (fs->stream, 0) > 0)
+ 		putwc_unlocked (L' ', fs->stream);
+ 	      else
++#endif
+ 		putc_unlocked (' ', fs->stream);
+ 
+ 	  /* Copy the tail of the original buffer into the current buffer
+diff --git a/argp/argp-help.c b/argp/argp-help.c
+index 2b6b0775d6..a17260378c 100644
+--- a/argp/argp-help.c
++++ b/argp/argp-help.c
+@@ -1873,9 +1873,11 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
+ #endif
+ 	    }
+ 
++#ifdef _LIBC
+ 	  if (_IO_fwide (stream, 0) > 0)
+ 	    putwc_unlocked (L'\n', stream);
+ 	  else
++#endif
+ 	    putc_unlocked ('\n', stream);
+ 
+ #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+-- 
+2.19.2
+
-- 
2.20.1


[-- Attachment #3: 0001-bison-Fix-build-break-with-glibc-2.28.patch --]
[-- Type: text/x-patch, Size: 2427 bytes --]

From 5c0b240f6c18f14a1793b231f5cdedb417563ea2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Aug 2018 15:57:04 -0700
Subject: [PATCH] bison: Fix build break with glibc 2.28

(From OE-Core rev: 741415c58b3565764000028c26efd081212eb989)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../recipes-devtools/bison/bison/gnulib.patch | 21 +++++++++++++++++++
 meta/recipes-devtools/bison/bison_3.0.4.bb    |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-devtools/bison/bison/gnulib.patch

diff --git a/meta/recipes-devtools/bison/bison/gnulib.patch b/meta/recipes-devtools/bison/bison/gnulib.patch
new file mode 100644
index 0000000000..7eaf0ce0fa
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/gnulib.patch
@@ -0,0 +1,21 @@
+Fix gnulib issues found with glibc 2.28 libio.h removal
+
+see
+https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: bison-3.0.4/lib/fseterr.c
+===================================================================
+--- bison-3.0.4.orig/lib/fseterr.c
++++ bison-3.0.4/lib/fseterr.c
+@@ -29,7 +29,7 @@ fseterr (FILE *fp)
+   /* Most systems provide FILE as a struct and the necessary bitmask in
+      <stdio.h>, because they need it for implementing getc() and putc() as
+      fast macros.  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   fp->_flags |= _IO_ERR_SEEN;
+ #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+   fp_->_flags |= __SERR;
diff --git a/meta/recipes-devtools/bison/bison_3.0.4.bb b/meta/recipes-devtools/bison/bison_3.0.4.bb
index 58728f5021..cc155f0fbe 100644
--- a/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
            file://dont-depend-on-help2man.patch.patch \
            file://0001-src-local.mk-fix-parallel-issue.patch \
            file://add-with-bisonlocaledir.patch \
+           file://gnulib.patch \
 "
 
 # No point in hardcoding path to m4, just use PATH
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Sudden errors building Sumo
  2019-01-10 20:48 ` akuster808
  2019-01-10 20:49   ` Marek Vasut
@ 2019-01-11 11:07   ` Ferry Toth
  1 sibling, 0 replies; 6+ messages in thread
From: Ferry Toth @ 2019-01-11 11:07 UTC (permalink / raw)
  To: akuster808, openembedded-core


Op 10-01-19 om 21:48 schreef akuster808:
>
> On 1/10/19 8:23 AM, Ferry Toth wrote:
>> After a new checkout I am experiencing multiple errors building Sumo
>> that might be related:
>> bison-3.0.4
>>
>> cross-localedef-native_2.27
>>
>> coreutils-8.29
>>
>> On another machine with slightly out-of-date Sumo these problems do
>> not occur.
>>
>>
>> Detail below.
>>
>>
>> Any ideas how to fix?
> Can you provide how you are building this ie, local.conf, MACHINE and host

https://github.com/edison-fw/meta-intel-edison/tree/sumo32

Local.conf and bblayers.conf are created by the setup.sh script.
>
> What are your before and after commit hashes used?
Unfortunately I don't have the last working hash available.
>
> - armin
>> Ferry
>>
>>
>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile
>>
>>
>> | ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
>> | ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib
>> fseterr.c to your platform! Look at the definitions of ferror and
>> clearerr on your system, then report this to bug-gnulib."
>> | #error "Please port gnulib fseterr.c to your platform! Look at the
>> definitions of ferror and clearerr on your system, then report this to
>> bug-gnulib."
>> | ^~~~~
>>
>>
>> /home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile
>>
>>
>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>> argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>> argp-help.o: in function `argp_failure':
>> | argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
>> | collect2: error: ld returned 1 exit status
>>
>>
>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile
>>
>>
>> | ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
>> | ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port
>> gnulib freadseek.c to your platform! Look at the definition of getc,
>> getc_unlocked on your system, then report this to bug-gnulib."
>> | #error "Please port gnulib freadseek.c to your platform! Look at the
>> definition of getc, getc_unlocked on your system, then report this to
>> bug-gnulib."
>> | ^~~~~
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sudden errors building Sumo
  2019-01-10 20:52     ` Marek Vasut
@ 2019-01-11 16:06       ` Ferry Toth
  0 siblings, 0 replies; 6+ messages in thread
From: Ferry Toth @ 2019-01-11 16:06 UTC (permalink / raw)
  To: Marek Vasut, akuster808, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]


Op 10-01-19 om 21:52 schreef Marek Vasut:
> On 1/10/19 9:49 PM, Marek Vasut wrote:
>> On 1/10/19 9:48 PM, akuster808 wrote:
>>>
>>> On 1/10/19 8:23 AM, Ferry Toth wrote:
>>>> After a new checkout I am experiencing multiple errors building Sumo
>>>> that might be related:
>>>> bison-3.0.4
>>>>
>>>> cross-localedef-native_2.27
>>>>
>>>> coreutils-8.29
>>>>
>>>> On another machine with slightly out-of-date Sumo these problems do
>>>> not occur.
>>>>
>>>>
>>>> Detail below.
>>>>
>>>>
>>>> Any ideas how to fix?
>>> Can you provide how you are building this ie, local.conf, MACHINE and host
>>>
>>> What are your before and after commit hashes used?
>>>
>>> - armin
>>>> Ferry
>>>>
>>>>
>>>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_compile
>>>>
>>>>
>>>> | ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
>>>> | ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib
>>>> fseterr.c to your platform! Look at the definitions of ferror and
>>>> clearerr on your system, then report this to bug-gnulib."
>>>> | #error "Please port gnulib fseterr.c to your platform! Look at the
>>>> definitions of ferror and clearerr on your system, then report this to
>>>> bug-gnulib."
>>>> | ^~~~~
>>>>
>>>>
>>>> /home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile
>>>>
>>>>
>>>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>>>> argp-fmtstream.c:(.text+0x525): undefined reference to `_IO_fwide'
>>>> | /home/ferry/Develop/tmp/out/linux64/build/tmp/hosttools/ld:
>>>> argp-help.o: in function `argp_failure':
>>>> | argp-help.c:(.text+0x20b3): undefined reference to `_IO_fwide'
>>>> | collect2: error: ld returned 1 exit status
>>>>
>>>>
>>>> virtual:native:/home/ferry/Develop/tmp/out/linux64/poky/meta/recipes-core/coreutils/coreutils_8.29.bb:do_compile
>>>>
>>>>
>>>> | ../coreutils-8.29/lib/freadseek.c: In function 'freadptrinc':
>>>> | ../coreutils-8.29/lib/freadseek.c:68:3: error: #error "Please port
>>>> gnulib freadseek.c to your platform! Look at the definition of getc,
>>>> getc_unlocked on your system, then report this to bug-gnulib."
>>>> | #error "Please port gnulib freadseek.c to your platform! Look at the
>>>> definition of getc, getc_unlocked on your system, then report this to
>>>> bug-gnulib."
>>>> | ^~~~~
>> Sounds like one of those glibc-2.28 problems ?
> Oh, in fact, I have this fixed locally, didn't get to sending the
> patches out, see the two attached patches. One is backport from
> oe-core/master , the other is something I grab'd from who knows where,
> feel free to tweak the patches and post them.
>
Thanks, no need to tweak them. The 2 patches solve 2 of the above errors.

For the 3rd (coreutils-native) I created asimilar patch, which fixes the 
build (see attached).

I haven't run-time tested the result. Hope to do that tonight.


[-- Attachment #2: 0001-PATCH-coreutils-Fix-build-break-with-glibc-2.28.patch --]
[-- Type: text/plain, Size: 9563 bytes --]

From e619a55c0a299a59f3217ad145a5b69428a8e37e Mon Sep 17 00:00:00 2001
From: Ferry Toth <ftoth@exalondelft.nl>
Date: Fri, 11 Jan 2019 16:00:58 +0100
Subject: [PATCH] [PATCH] coreutils: Fix build break with glibc 2.28

Exposed when building sumo on Ubuntu 18.10

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
---
 .../coreutils/coreutils/sumo.patch            | 151 ++++++++++++++++++
 meta/recipes-core/coreutils/coreutils_8.29.bb |   1 +
 2 files changed, 152 insertions(+)
 create mode 100755 meta/recipes-core/coreutils/coreutils/sumo.patch
 mode change 100644 => 100755 meta/recipes-core/coreutils/coreutils_8.29.bb

diff --git a/meta/recipes-core/coreutils/coreutils/sumo.patch b/meta/recipes-core/coreutils/coreutils/sumo.patch
new file mode 100755
index 0000000000..03cf3c1b52
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/sumo.patch
@@ -0,0 +1,151 @@
+diff -ur coreutils-8.29/lib/fflush.c coreutils-8.29-mod/lib/fflush.c
+--- coreutils-8.29/lib/fflush.c	2019-01-11 15:10:49.792047031 +0100
++++ coreutils-8.29-mod/lib/fflush.c	2019-01-11 15:51:18.831796152 +0100
+@@ -33,7 +33,7 @@
+ #undef fflush
+ 
+ 
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ 
+ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
+ static void
+@@ -72,7 +72,7 @@
+ 
+ #endif
+ 
+-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+ 
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+@@ -148,7 +148,7 @@
+   if (stream == NULL || ! freading (stream))
+     return fflush (stream);
+ 
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ 
+   clear_ungetc_buffer_preserving_position (stream);
+ 
+diff -ur coreutils-8.29/lib/fpending.c coreutils-8.29-mod/lib/fpending.c
+--- coreutils-8.29/lib/fpending.c	2019-01-11 15:10:50.711269845 +0100
++++ coreutils-8.29-mod/lib/fpending.c	2019-01-11 15:50:11.153232743 +0100
+@@ -32,7 +32,7 @@
+   /* Most systems provide FILE as a struct and the necessary bitmask in
+      <stdio.h>, because they need it for implementing getc() and putc() as
+      fast macros.  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   return fp->_IO_write_ptr - fp->_IO_write_base;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+diff -ur coreutils-8.29/lib/fpurge.c coreutils-8.29-mod/lib/fpurge.c
+--- coreutils-8.29/lib/fpurge.c	2019-01-11 15:10:56.699812540 +0100
++++ coreutils-8.29-mod/lib/fpurge.c	2019-01-11 15:50:12.552242461 +0100
+@@ -62,7 +62,7 @@
+   /* Most systems provide FILE as a struct and the necessary bitmask in
+      <stdio.h>, because they need it for implementing getc() and putc() as
+      fast macros.  */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   fp->_IO_read_end = fp->_IO_read_ptr;
+   fp->_IO_write_ptr = fp->_IO_write_base;
+   /* Avoid memory leak when there is an active ungetc buffer.  */
+diff -ur coreutils-8.29/lib/freadahead.c coreutils-8.29-mod/lib/freadahead.c
+--- coreutils-8.29/lib/freadahead.c	2019-01-11 15:11:03.301249088 +0100
++++ coreutils-8.29-mod/lib/freadahead.c	2019-01-11 15:50:13.826993749 +0100
+@@ -30,7 +30,7 @@
+ size_t
+ freadahead (FILE *fp)
+ {
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   if (fp->_IO_write_ptr > fp->_IO_write_base)
+     return 0;
+   return (fp->_IO_read_end - fp->_IO_read_ptr)
+diff -ur coreutils-8.29/lib/freading.c coreutils-8.29-mod/lib/freading.c
+--- coreutils-8.29/lib/freading.c	2019-01-11 15:11:02.812511550 +0100
++++ coreutils-8.29-mod/lib/freading.c	2019-01-11 15:50:21.392772123 +0100
+@@ -31,7 +31,7 @@
+   /* Most systems provide FILE as a struct and the necessary bitmask in
+      <stdio.h>, because they need it for implementing getc() and putc() as
+      fast macros.  */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   return ((fp->_flags & _IO_NO_WRITES) != 0
+           || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+               && fp->_IO_read_base != NULL));
+diff -ur coreutils-8.29/lib/freadptr.c coreutils-8.29-mod/lib/freadptr.c
+--- coreutils-8.29/lib/freadptr.c	2019-01-11 15:10:56.059010089 +0100
++++ coreutils-8.29-mod/lib/freadptr.c	2019-01-11 14:49:54.293455980 +0100
+@@ -29,7 +29,7 @@
+   size_t size;
+ 
+   /* Keep this code in sync with freadahead!  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   if (fp->_IO_write_ptr > fp->_IO_write_base)
+     return NULL;
+   size = fp->_IO_read_end - fp->_IO_read_ptr;
+diff -ur coreutils-8.29/lib/freadseek.c coreutils-8.29-mod/lib/freadseek.c
+--- coreutils-8.29/lib/freadseek.c	2019-01-11 15:10:50.220888727 +0100
++++ coreutils-8.29-mod/lib/freadseek.c	2019-01-11 15:49:01.170630156 +0100
+@@ -36,7 +36,7 @@
+   /* Keep this code in sync with freadptr!  */
+ #if HAVE___FREADPTRINC              /* musl libc */
+   __freadptrinc (fp, increment);
+-#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#elif defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   fp->_IO_read_ptr += increment;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+diff -ur coreutils-8.29/lib/fseeko.c coreutils-8.29-mod/lib/fseeko.c
+--- coreutils-8.29/lib/fseeko.c	2019-01-11 15:10:56.840171355 +0100
++++ coreutils-8.29-mod/lib/fseeko.c	2019-01-11 15:51:28.260424120 +0100
+@@ -47,7 +47,7 @@
+ #endif
+ 
+   /* These tests are based on fpurge.c.  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   if (fp->_IO_read_end == fp->_IO_read_ptr
+       && fp->_IO_write_ptr == fp->_IO_write_base
+       && fp->_IO_save_base == NULL)
+@@ -123,7 +123,7 @@
+           return -1;
+         }
+ 
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+       fp->_flags &= ~_IO_EOF_SEEN;
+       fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+diff -ur coreutils-8.29/lib/fseterr.c coreutils-8.29-mod/lib/fseterr.c
+--- coreutils-8.29/lib/fseterr.c	2019-01-11 15:10:55.996374096 +0100
++++ coreutils-8.29-mod/lib/fseterr.c	2019-01-11 14:49:54.268664903 +0100
+@@ -29,7 +29,7 @@
+   /* Most systems provide FILE as a struct and the necessary bitmask in
+      <stdio.h>, because they need it for implementing getc() and putc() as
+      fast macros.  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+   fp->_flags |= _IO_ERR_SEEN;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+diff -ur coreutils-8.29/lib/stdio-impl.h coreutils-8.29-mod/lib/stdio-impl.h
+--- coreutils-8.29/lib/stdio-impl.h	2019-01-11 15:11:01.851395400 +0100
++++ coreutils-8.29-mod/lib/stdio-impl.h	2019-01-11 15:38:43.268798497 +0100
+@@ -18,6 +18,12 @@
+    the same implementation of stdio extension API, except that some fields
+    have different naming conventions, or their access requires some casts.  */
+ 
++/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
++   problem by defining it ourselves.  FIXME: Do not rely on glibc
++   internals.  */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+ 
+ /* BSD stdio derived implementations.  */
+ 
diff --git a/meta/recipes-core/coreutils/coreutils_8.29.bb b/meta/recipes-core/coreutils/coreutils_8.29.bb
old mode 100644
new mode 100755
index b0572afdc0..d525b3c3b4
--- a/meta/recipes-core/coreutils/coreutils_8.29.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.29.bb
@@ -21,6 +21,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
            file://0001-local.mk-fix-cross-compiling-problem.patch \
            file://CVE-2017-18018-1.patch \
            file://CVE-2017-18018-2.patch \
+           file://sumo.patch \
           "
 
 SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303"
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-11 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 16:23 Sudden errors building Sumo Ferry Toth
2019-01-10 20:48 ` akuster808
2019-01-10 20:49   ` Marek Vasut
2019-01-10 20:52     ` Marek Vasut
2019-01-11 16:06       ` Ferry Toth
2019-01-11 11:07   ` Ferry Toth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.