Skip to content
Snippets Groups Projects
Closed ratelim.h:55:27: error: initializer element is not constant
  • View options
  • ratelim.h:55:27: error: initializer element is not constant

  • View options
  • Closed Issue created by acidsys

    Summary

    Steps to reproduce:

    1. Clone latest master (0.4.7.0-alpha-dev as of 10/06/2021)
    2. ./autogen.sh
    3. ./configure
    4. make

    What is the current bug behavior?

      CC       src/feature/dircache/dircache.o
      CC       src/feature/dircache/dirserv.o
      CC       src/feature/dirclient/dirclient.o
    In file included from ./src/core/or/or.h:50:0,
                     from src/feature/dirclient/dirclient.c:13:
    src/feature/dirclient/dirclient.c: In function ‘dir_client_decompress_response_body’:
    ./src/lib/log/ratelim.h:55:27: error: initializer element is not constant
     #define RATELIM_INIT(r) { (r), 0, 0, 0 }
                               ^
    src/feature/dirclient/dirclient.c:1911:38: note: in expansion of macro ‘RATELIM_INIT’
         static ratelim_t warning_limit = RATELIM_INIT(LOG_INTERVAL);
                                          ^~~~~~~~~~~~
    ./src/lib/log/ratelim.h:55:27: note: (near initialization for ‘warning_limit.rate’)
     #define RATELIM_INIT(r) { (r), 0, 0, 0 }
                               ^
    src/feature/dirclient/dirclient.c:1911:38: note: in expansion of macro ‘RATELIM_INIT’
         static ratelim_t warning_limit = RATELIM_INIT(LOG_INTERVAL);
                                          ^~~~~~~~~~~~
    make[1]: *** [Makefile:11154: src/feature/dirclient/dirclient.o] Error 1
    make[1]: Leaving directory '/home/georg/new/tor'
    make: *** [Makefile:6180: all] Error 2

    What is the expected behavior?

    Either the program should compile without any errors, or configure should inform about dependency issues.

    Failed Environment

    • openSUSE Leap 15.2
    • Tor 0.4.7.0-alpha-dev via git clone
    • GNU Autoconf 2.69
    • GNU Make 4.2.1
    • gcc (SUSE Linux) 7.5.0

    Working environment

    • openSUSE Tumbleweed
    • Tor 0.4.7.0-alpha-dev via git clone
    • autoconf (GNU Autoconf) 2.69
    • GNU Make 4.3
    • gcc (SUSE Linux) 10.3.0

    Possible fixes

    No solution or workaround found so far.

    Suggestion

    In case the compatibility with older (stable) distributions is not restorable, an exemption should be implemented in configure

    Edited by acidsys

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading