bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0.22.2 FTBFS on Arch Linux


From: Bruno Haible
Subject: Re: 0.22.2 FTBFS on Arch Linux
Date: Thu, 21 Sep 2023 00:48:29 +0200

Hi,

Tobias Powalowski wrote:
> build breaks with this:
> 
>   for f in ../src/str-list.c ../src/dir-list.c ../src/message.c 
> ../src/pos.c ../src/msgl-ascii.c ../src/po-error.c ../src/po-xerror.c 
> ../src/write-catalog.c ../src/write-po.c ../src/open-catalog.c 
> ../src/po-charset.c ../src/po-lex.c ../src/po-gram-gen.c 
> ../src/read-po.c ../src/read-catalog-abstract.c ../src/read-catalog.c 
> ../src/plural-table.c ../src/format-c.c ../src/format-c++-brace.c 
> ../src/format-python.c ../src/format-python-brace.c ../src/format-java.c 
> ../src/format-java-printf.c ../src/format-csharp.c 
> ../src/format-javascript.c ../src/format-scheme.c ../src/format-lisp.c 
> ../src/format-elisp.c ../src/format-librep.c ../src/format-ruby.c 
> ../src/format-sh.c ../src/format-awk.c ../src/format-lua.c 
> ../src/format-pascal.c ../src/format-smalltalk.c ../src/format-qt.c 
> ../src/format-qt-plural.c ../src/format-kde.c ../src/format-kde-kuit.c 
> ../src/format-boost.c ../src/format-tcl.c ../src/format-perl.c 
> ../src/format-perl-brace.c ../src/format-php.c 
> ../src/format-gcc-internal.c ../src/format-gfc-internal.c 
> ../src/format.c ../src/plural-exp.c ../src/plural-eval.c 
> ../src/msgl-check.c ../src/sentence.c basename-lgpl.c c-ctype.h 
> c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c c-strstr.h 
> c-strstr.c c32iscntrl.c c32width.c cloexec.c  concat-filename.c 
> diffseq.h   error-progname.h error-progname.c exitfail.c fcntl.c 
> fd-hook.c      fstrcmp.h fstrcmp.c  full-write.h full-write.c 
> fwriteerror.h fwriteerror.c gcd.h gcd.c    getprogname.c gettext.h 
> hard-locale.c ialloc.c idx.h gl_linked_list.h gl_linked_list.c 
> gl_anylinked_list1.h gl_anylinked_list2.h gl_list.h gl_list.c 
> localcharset.c glthread/lock.h glthread/lock.c malloca.c markup.h 
> markup.c mbrtoc32.c mbrtowc.c  mbswidth.h mbswidth.c mbszero.c 
> mem-hash-map.h mem-hash-map.c   minmax.h   obstack.c safe-write.c 
> setlocale_null.c   size_max.h  stat-time.c striconv.h striconv.c 
> striconveh.h striconveh.c striconveha.h striconveha.c string-desc.c 
> string-desc-contains.c glthread/threadlib.c glthread/tls.h 
> glthread/tls.c unilbrk/lbrktables.c   unilbrk/ulc-common.c  unistd.c 
> unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c        wctype-h.c xmalloc.c 
> xalloc-die.c xconcat-filename.c xerror.h xerror.c gl_xlist.h gl_xlist.c 
> xmalloca.c xsize.h xsize.c xstriconv.h xstriconv.c xvasprintf.h 
> xvasprintf.c xasprintf.c asnprintf.lo fopen.lo printf-args.lo 
> printf-parse.lo vasnprintf.lo; do \
>        case $f in \
>          *.c | *.o | *.lo ) \
>            sf=`echo "$f" | sed -e 's,\\.[^.]*$,,'`.c; \
>            test -f $sf || sf=./$sf; \
>            of=`echo "$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$,,'`.o; \
>            gcc -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 
> -DHAVE_CONFIG_H -I. -I..  -I. -I. -I.. -I.. -I../src -I../src 
> -I../../gettext-runtime/intl -I../../gettext-runtime/intl -march=x86-64 
> -mtune=generic -O2 -pipe -fno-plt -fexceptions         
> -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         
> -fstack-clash-protection -fcf-protection -g 
> -ffile-prefix-map=/build/gettext/src=/usr/src/debug/gettext -flto=auto 
> -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 -DHAVE_CONFIG_H -w 
> -fno-analyzer -c $sf || { rm -f config.h; exit 1; }; \
>            sh ./exported.sh $of 1>&5; \
>            rm -f $of `echo "$of" | sed -e 's,\\.o$,.lo,'`; \
>            ;; \
>        esac; \
>      done; \
>    } 5>&1 1>&2 \
>      | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \
>      | sed -e 's,^obstack_free$,__obstack_free,' \
>      | sed -e 's,^\(.*\)$,#define \1 libgettextpo_\1,' > config.h-t && \
>    if test -f config.h; then \
>      cat config.h-t >> config.h; \
>      rm -f config.h-t; \
>    else \
>      rm -f config.h-t; \
>      exit 1; \
>    fi \
> fi
> In file included from ../src/write-catalog.h:22,
>                   from ../src/write-catalog.c:23:
> ./textstyle.h:709:1: error: redefinition of ‘noop_styled_ostream_create’
>    709 | noop_styled_ostream_create (ostream_t destination, bool 
> pass_ownership)
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./textstyle.h:679:1: note: previous definition of 
> ‘noop_styled_ostream_create’ with type ‘FILE *(FILE *, _Bool)’
>    679 | noop_styled_ostream_create (ostream_t destination, bool 
> pass_ownership)

In my builds, there are indeed two different textstyle.h files in
  gettext-tools/src/textstyle.h
and
  gettext-tools/libgettextpo/textstyle.h

BUT 1) In these files, the declaration of noop_styled_ostream_create is at
       lines 602 and 678, not 709 and 678.
    2) Only one of these files is effective in each compilation unit, since
       they both start with
         #ifndef _TEXTSTYLE_H
         #define _TEXTSTYLE_H

Why are these two things different in your build?

I had a suspicion that "-flto=auto" may be the problem, but in my testing
(with gcc 13) it does not cause this compilation error. Which gcc version
are you using? Does the error go away if you remove '-flto=auto' from the
CFLAGS?

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]