Menu

#188 autogen 5.18.16 + git build error SPN_COMPACT_NAME_CHARS

autogen
pending
None
1
2020-09-27
2018-09-01
No

Hello,

autogen 5.18.16 plus 6da941a91e02642feff4a4a14d7614fabf47fc69 from GIT fails to build with the following error:

make[4]: Entering directory '/tmp/AUTOGEN/autogen-5.18.16/getdefs'
exec > gd.c ; \
echo '#undef   PKGDATADIR' ; \
echo '#define  PKGDATADIR "/usr/share/autogen"' ; \
echo ; echo '#define  DEFINING 1' ; \
echo '#include "autoopts/project.h"' ; \
for f in opts.c getdefs.h proto.h gdemit.c gdinit.c getdefs.c ; \
do echo "#include \"$f\"" ; done
top_builddir=".." top_srcdir=".." VERBOSE="" /bin/bash "../build-aux/run-ag.sh" -MFstamp-opts -MTstamp-opts -MP ./opts.def
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../autoopts -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/tmp/AUTOGEN/autogen-5.18.16=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-format-contains-nul -Wno-format-contains-nul -fno-strict-aliasing -Wall -Werror -Wcast-align -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Wstrict-aliasing=3 -Wextra -Wno-cast-qual -g -O2 -fdebug-prefix-map=/tmp/AUTOGEN/autogen-5.18.16=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-format-contains-nul -Wno-format-contains-nul -fno-strict-aliasing -c -o gd.o gd.c
In file included from gd.c:11:
getdefs.c: In function 'buildPreamble':
getdefs.c:208:22: error: implicit declaration of function 'SPN_COMPACT_NAME_CHARS'; did you mean 'SPN_COMPOUND_NAME_CHARS'? [-Werror=implicit-function-declaration]
         char * end = SPN_COMPACT_NAME_CHARS(def_scan + 1);
                      ^~~~~~~~~~~~~~~~~~~~~~
                      SPN_COMPOUND_NAME_CHARS
getdefs.c:208:22: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
cc1: all warnings being treated as errors

cu Andreas

Discussion

  • Bruce Korb

    Bruce Korb - 2020-09-14
    Egrep pattern: SPN_C[A-Z]*_NAME_CHARS
    
      File                   Line
    0 autoopts/ag-char-map.h 268 #define SPN_COMPOUND_NAME_CHARS(_s)   spn_ag_char_map_chars(_s, 30)
    1 autoopts/ag-char-map.h 273 #define SPN_COMPACT_NAME_CHARS(_s)    spn_ag_char_map_chars(_s, 31)
    2 getdefs/getdefs.c      208 char * end = SPN_COMPACT_NAME_CHARS(def_scan + 1);
    

    Looks like it ought to be defined to me. I don't see this problem. Does it persist?

     
  • Bruce Korb

    Bruce Korb - 2020-09-15
    • assigned_to: Bruce Korb
     
  • Bruce Korb

    Bruce Korb - 2020-09-15

    Just to be excruciatingly careful, I've added an explicit inclusion of ag-char-map.h in the compile, but it is also directly included in autoopts/project.h. It would be interesting to manually redo the compile with "-c" replaced with "-E" and the output redirected to a getdefs.i file. We can then see why the project.h header did not source in the ag-char-map.h file.

     
  • Bruce Korb

    Bruce Korb - 2020-09-26
    • status: open --> accepted
     
  • Bruce Korb

    Bruce Korb - 2020-09-26

    Can this be reproduced with the pre-processing result? All of my {SPN,BRK}_*_CHARS macros return a pointer to a char.

    #define  IS_COMPOUND_NAME_CHAR( _c)    is_ag_char_map_char((char)(_c), 0x007B0460)
    #define SPN_COMPOUND_NAME_CHARS(_s)   spn_ag_char_map_chars(_s, 30)
    #define BRK_COMPOUND_NAME_CHARS(_s)   brk_ag_char_map_chars(_s, 30)
    #define SPN_COMPOUND_NAME_BACK(s,e)   spn_ag_char_map_back(s, e, 30)
    #define BRK_COMPOUND_NAME_BACK(s,e)   brk_ag_char_map_back(s, e, 30)
    #define  IS_COMPACT_NAME_CHAR( _c)     is_ag_char_map_char((char)(_c), 0x005B0040)
    #define SPN_COMPACT_NAME_CHARS(_s)    spn_ag_char_map_chars(_s, 31)
    #define BRK_COMPACT_NAME_CHARS(_s)    brk_ag_char_map_chars(_s, 31)
    #define SPN_COMPACT_NAME_BACK(s,e)    spn_ag_char_map_back(s, e, 31)
    #define BRK_COMPACT_NAME_BACK(s,e)    brk_ag_char_map_back(s, e, 31)
    
     
  • Andreas Metzler

    Andreas Metzler - 2020-09-27

    Hello Bruce,

    on current GIT ( tag v5.19.94 / 3a9b6e2f67bc09af74d6d184ea4d3ed77a11adce ) I get an almost successful build with env GNULIBDIR=/tmp/AUTOGEN/gnulib config/bootstrap && ./configure && make && make check. (Locally installed version of autogen on 5.8.16). Building suceeds, but there are two testsuite errors:

    FAIL: directives.test
    FAIL: opts.test

    agen5/test/test-suite.log

    FAIL: directives
    ================
    
    creating directives.dir/subdir/directives.tpl
    creating directives.inc
    creating directives.def
    creating directives.base
    #assert yielded "false":
        ``echo false`
    Aborted (core dumped)
    #assert yielded "0":
        `(version-compare > autogen-version "5.8.4")`
    Aborted (core dumped)
    >directives-> cd /tmp/AUTOGEN/autogen-upstream/agen5/test/directives-testd/..
    >directives-> test -d FAILURES
    >directives-> mkdir FAILURES
    >directives-> mv directives-testd FAILURES/directives-testd
    >directives-> test -f directives.log
    >directives-> mv directives.log FAILURES/directives-testd/amtest-directives.log
    >directives-> ln -s FAILURES/directives-testd/amtest-directives.log directives.log
    >directives-> echo FAILURE: -DMUMBLE -DFOO=1-4 failed
    FAILURE: -DMUMBLE -DFOO=1-4 failed
    >directives-> exit 1
    FAIL directives.test (exit status: 1)
    
    FAIL: opts
    ==========
    
    >opts-> ls -l opts-tmpd opts.c.base opts.def opts.h.base ../VERSION
    >opts-> echo Checking for 'define DEBUG' options
    Checking for 'define DEBUG' options
    >opts-> /bin/grep define DEBUG /tmp/AUTOGEN/autogen-upstream/agen5/test/../opts.h
    >opts-> AGCMD=
    >opts-> run_ag x opts.def
    >opts-> local opts=
    >opts-> opts=
    >opts-> shift
    >opts-> opts=-L/tmp/AUTOGEN/autogen-upstream/autoopts/tpl
    >opts-> /tmp/AUTOGEN/autogen-upstream/agen5/autogen -L/tmp/AUTOGEN/autogen-upstream/autoopts/tpl opts.def
    >opts-> rm -f ../VERSION
    >opts-> unstamp opts.c opts.c.res
    >opts-> /bin/sed -e /-\*- buffer-read-only:/,/^ \*\//d -e / extracted from.* line [1-9]/d -e /static char const zDetail/,/";$/d -e /static char const zCopyright/,/";$/d -e /static char const zLicenseDescrip/,/";$/d -e / "autogen is free software: /,/www\.gnu\.org\/licenses/d opts.c
    >opts-> echo diff opts.c.base opts.c.res
    diff opts.c.base opts.c.res
    >opts-> diff opts.c.base opts.c.res
    >opts-> unstamp opts.h opts.h.res
    >opts-> /bin/sed -e /-\*- buffer-read-only:/,/^ \*\//d -e / extracted from.* line [1-9]/d -e /static char const zDetail/,/";$/d -e /static char const zCopyright/,/";$/d -e /static char const zLicenseDescrip/,/";$/d -e / "autogen is free software: /,/www\.gnu\.org\/licenses/d opts.h
    >opts-> echo diff opts.h.base opts.h.res
    diff opts.h.base opts.h.res
    >opts-> diff opts.h.base opts.h.res
    25c25
    < #define AO_TEMPLATE_VERSION 172033
    ---
    > #define AO_TEMPLATE_VERSION 172034
    >opts-> diff -c opts.h.base opts.h.res
    >opts-> failure *** opts.h.base Sun Sep 27 11:40:34 2020
    --- opts.h.res  Sun Sep 27 11:40:36 2020
    ***************
    *** 22,28 ****
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172033
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    --- 22,28 ----
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172034
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    >opts-> kill -9 824641
    >opts-> trap  15
    >opts-> set -x
    >opts-> cd /tmp/AUTOGEN/autogen-upstream/agen5/test/opts-testd/..
    >opts-> test -d FAILURES
    >opts-> test -d FAILURES/opts-testd
    >opts-> mv opts-testd FAILURES/opts-testd
    >opts-> test -f opts.log
    >opts-> mv opts.log FAILURES/opts-testd/amtest-opts.log
    >opts-> ln -s FAILURES/opts-testd/amtest-opts.log opts.log
    >opts-> echo FAILURE: *** opts.h.base   Sun Sep 27 11:40:34 2020
    --- opts.h.res  Sun Sep 27 11:40:36 2020
    ***************
    *** 22,28 ****
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172033
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    --- 22,28 ----
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172034
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    FAILURE: *** opts.h.base    Sun Sep 27 11:40:34 2020
    --- opts.h.res  Sun Sep 27 11:40:36 2020
    ***************
    *** 22,28 ****
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172033
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    --- 22,28 ----
       *  tolerable version is at least as old as what was current when the header
       *  template was released.
       */
    ! #define AO_TEMPLATE_VERSION 172034
      #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
       || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
      # error option template version mismatches autoopts/options.h header
    >opts-> exit 1
    FAIL opts.test (exit status: 1)
    
     
  • Bruce Korb

    Bruce Korb - 2020-09-27
    • status: accepted --> pending
     
  • Bruce Korb

    Bruce Korb - 2020-09-27

    The opts test failure I know about. I hit it and promise myself to fix it every time I bump the autogen version. :) See bug 207 :). I'll look into the directives thing, but it looks like versioning as well. Weirdly, I don't hit it, but with your failures tarball, I can likely see what caused it and fix it. Anyway, the specific issue raised here isn't happening, so I'm marking it as "pending" the next (5.20.0) release. Oh, there is an alpha.gnu.org version 5.19.95

     

Log in to post a comment.

MongoDB Logo MongoDB