On Thu, Jun 14, 2018 at 04:46:17PM -0400, Jean-Marc Pigeon wrote:
> Hello,
> 
> logrotate-3.11.0
> 
> I do confirm  logrotate is compiling nicely within LFS-8.2.
> 
> I do NOT confirm compiling within Version 2018-06-12.
> 
> I guess the compiling crash is caused by compiler GCC-8.1.0
> 
> here is the log..., Am I missing something?
> 

I built it using the 2018-05-31 book.  The difference is that I pass
my own CFLAGS, CXXFLAGS of '-O2 -march=native' to everything
(although no everything uses them, of course).
> ;---------------------------------------------------------------
> gcc -DPACKAGE_NAME=\"logrotate\" -DPACKAGE_TARNAME=\"logrotate\"
> -DPACKAGE_VERSION=\"3.11.0\" -DPACKAGE_STRING=\"logrotate\ 3.11.0\"
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"logrotate\"
> -DVERSION=\"3.11.0\" -D_GNU_SOURCE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1
> -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_ST_BLOCKS=1 -DHAVE_LIBPOPT=1
> -DHAVE_LIBACL=1 -DSTATEFILE=\"/var/lib/logrotate.status\" -DHAVE_ASPRINTF=1
> -DHAVE_FORK=1 -DHAVE_MADVISE=1 -DHAVE_QSORT=1 -DHAVE_STRNDUP=1
> -DHAVE_STRPTIME=1 -DHAVE_VFORK=1 -DHAVE_VSYSLOG=1 -I.   -Wall -Werror -g -O2
> -MT logrotate.o -MD -MP -MF .deps/logrotate.Tpo -c -o logrotate.o
> logrotate.c
> logrotate.c: In function 'prerotateSingleLog':
> logrotate.c:1328:6: error: 'strncat' specified bound depends on the length
> of the source argument [-Werror=stringop-overflow=]
>       strncat(tempstr, rotNames->baseName, baseLen - extLen);
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> logrotate.c:1320:19: note: length computed here
>   size_t baseLen = strlen(rotNames->baseName);
>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
> logrotate.c:1347:2: error: 'strncat' specified bound depends on the length
> of the source argument [-Werror=stringop-overflow=]
>   strncat(tempstr, rotNames->baseName,
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    strlen(rotNames->baseName) - strlen(log->extension));
>    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> logrotate.c:1348:3: note: length computed here
>    strlen(rotNames->baseName) - strlen(log->extension));
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [Makefile:472: logrotate.o] Error 1
> 
Mine (unfortunately, not nicely formatted for email) gave me:

gcc -DPACKAGE_NAME=\"logrotate\" -DPACKAGE_TARNAME=\"logrotate\" 
-DPACKAGE_VERSION=\"3.11.0\" -DPACKAGE_STRING=\"logrotate\ 3.11.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"logrotate\" 
-DVERSION=\"3.11.0\" -D_GNU_SOURCE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 
-DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_ST_BLOCKS=1 -DHAVE_LIBPOPT=1 
-DHAVE_LIBACL=1 -DSTATEFILE=\"/var/lib/logrotate.status\" -DHAVE_ASPRINTF=1 
-DHAVE_FORK=1 -DHAVE_MADVISE=1 -DHAVE_QSORT=1 -DHAVE_STRNDUP=1 
-DHAVE_STRPTIME=1 -DHAVE_VFORK=1 -DHAVE_VSYSLOG=1 -I.    -Wall  -O2 
-march=native -MT logrotate.o -MD -MP -MF .deps/logrotate.Tpo -c -o logrotate.o 
logrotate.c
logrotate.c: In function 'prerotateSingleLog':
logrotate.c:1328:6: warning: 'strncat' specified bound depends on the length of 
the source argument [-Wstringop-overflow=]
      strncat(tempstr, rotNames->baseName, baseLen - extLen);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So I only got a warning.  Either you have added -Werror (seems
unlikely) or by setting my own CFLAGS I have lost the -Werror
(unusual!).

I don't have time to explore this at the moment, but it sounds as if
we need to remove -Werror.  I think we've done that in the past in
various packages, but I don't recall what approaches we have used.

ĸen
-- 
              Keyboard not found, Press F1 to continue
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to