Re: [lfs-support] 6.48. Libelf 0.170

2018-05-24 Thread DM
On Thu, 2018-05-24 at 15:02 -0400, Michael Shell wrote:
> On Thu, 24 May 2018 12:38:59 +0200
> DM  wrote:
> 
> > 
> > ar.c:1077:56: error: '%-*ld' directive output may be truncated
> > writing
> 
> 
> However, the above does not explain why others have not encountered
> this
> bug in LFS 8.2 - I suppose you are compiling with -O3 which is needed
> to trigger the bug. So, another option would be to compile with -O2
> 
> 
>   Cheers,
> 
>   Mike Shell
> 

Yup. Thanks. Worked. -O3 to -O2.

Regards,
Daniel
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] 6.48. Libelf 0.170

2018-05-24 Thread Michael Shell
On Thu, 24 May 2018 12:38:59 +0200
DM  wrote:

> ar.c:1077:56: error: '%-*ld' directive output may be truncated writing


  Daniel,

This was fixed in elfutils on September 20, 2017:

https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=b10d7eb74064c5906f031cd17c0f82041c6a4ca1

the most recent release of elfutils (0.170) dates to August 3, 2017.

The elfutil developers really should put out another release.

You can either apply the patches in the above URL, or checkout the elfutils
source tree via git:

https://sourceware.org/elfutils/

However, the above does not explain why others have not encountered this
bug in LFS 8.2 - I suppose you are compiling with -O3 which is needed
to trigger the bug. So, another option would be to compile with -O2


  Cheers,

  Mike Shell

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


[lfs-support] 6.48. Libelf 0.170

2018-05-24 Thread DM
Heya,

I'm getting this error on elfutils (LFS 8.2):



  CC   ar.o
ar.c: In function 'do_oper_insert':
ar.c:1077:56: error: '%-*ld' directive output may be truncated writing
between 6 and 10 bytes into a region of size 7 [-Werror=format-
truncation=]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
^
ar.c:1077:55: note: directive argument in the range [0, 4294967295]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
   ^~~
In file included from /usr/include/stdio.h:862:0,
 from /usr/include/argp.h:23,
 from ar.c:23:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk'
output between 7 and 11 bytes into a destination of size 7
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  ^~~~
__bos (__s), __fmt, __va_arg_pack ());
~
ar.c:1077:56: error: '%-*ld' directive output may be truncated writing
between 6 and 10 bytes into a region of size 7 [-Werror=format-
truncation=]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
^
ar.c:1077:55: note: directive argument in the range [0, 4294967295]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
   ^~~
In file included from /usr/include/stdio.h:862:0,
 from /usr/include/argp.h:23,
 from ar.c:23:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk'
output between 7 and 11 bytes into a destination of size 7
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  ^~~~
__bos (__s), __fmt, __va_arg_pack ());
~
ar.c:1077:46: error: '%-*lo' directive output may be truncated writing
between 8 and 11 bytes into a region of size 9 [-Werror=format-
truncation=]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
  ^
ar.c:1077:45: note: directive argument in the range [0, 4294967295]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
bufsize, val);
 ^~~
In file included from /usr/include/stdio.h:862:0,
 from /usr/include/argp.h:23,
 from ar.c:23:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk'
output between 9 and 12 bytes into a destination of size 9
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  ^~~~
__bos (__s), __fmt, __va_arg_pack ());
~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:714: ar.o] Error 1
make[1]: *** [Makefile:481: all-recursive] Error 1
make: *** [Makefile:397: all] Error 2


Any ideas? The host is LFS 8.1.

Regards,
Daniel
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style