Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 311
    • Issues 311
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 35
    • Merge requests 35
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #40410
Closed
Open
Created Jun 10, 2021 by acidsys@acidsys

ratelim.h:55:27: error: initializer element is not constant

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 Jun 10, 2021 by acidsys
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking