Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BJOERN_WANT_STATSD=yes python setup.py install fails #185

Open
totti4Life opened this issue May 21, 2020 · 2 comments
Open

BJOERN_WANT_STATSD=yes python setup.py install fails #185

totti4Life opened this issue May 21, 2020 · 2 comments

Comments

@totti4Life
Copy link

I tried to install with the BJOERN_WANT_STATSD=yes flag
tried to run BJOERN_WANT_STATSD=yes python setup.py install
fails with the fallowing output:
running install
running bdist_egg
running egg_info
writing bjoern.egg-info/PKG-INFO
writing dependency_links to bjoern.egg-info/dependency_links.txt
writing top-level names to bjoern.egg-info/top_level.txt
reading manifest file 'bjoern.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'bjoern.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib.linux-x86_64-3.7
copying bjoern.py -> build/lib.linux-x86_64-3.7
running build_ext
building '_bjoern' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/http-parser
creating build/temp.linux-x86_64-3.7/statsd-c-client
creating build/temp.linux-x86_64-3.7/bjoern
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSIGNAL_CHECK_INTERVAL=0.1 -DWANT_SIGNAL_HANDLING=yes -DWANT_SIGINT_HANDLING=yes -DWANT_STATSD=yes -Ihttp-parser -Istatsd-c-client -I/usr/include/libev -I/opt/local/include -I/usr/local/include/python3.7m -c http-parser/http_parser.c -o build/temp.linux-x86_64-3.7/http-parser/http_parser.o -std=c99 -fno-strict-aliasing -fcommon -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -g
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSIGNAL_CHECK_INTERVAL=0.1 -DWANT_SIGNAL_HANDLING=yes -DWANT_SIGINT_HANDLING=yes -DWANT_STATSD=yes -Ihttp-parser -Istatsd-c-client -I/usr/include/libev -I/opt/local/include -I/usr/local/include/python3.7m -c statsd-c-client/statsd-client.c -o build/temp.linux-x86_64-3.7/statsd-c-client/statsd-client.o -std=c99 -fno-strict-aliasing -fcommon -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -g
statsd-c-client/statsd-client.c: In function ‘statsd_init’:
statsd-c-client/statsd-client.c:57:37: error: storage size of ‘hints’ isn’t known
struct addrinfo *result = NULL, hints;
^~~~~
statsd-c-client/statsd-client.c:63:19: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
if ( (error = getaddrinfo(host, NULL, &hints, &result)) ) {
^~~~~~~~~~~
statsd-c-client/statsd-client.c:64:33: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration]
fprintf(stderr, "%s\n", gai_strerror(error));
^~~~~~~~~~~~
statsd-c-client/statsd-client.c:64:27: warning: format ‘%s’ expects argument of type ‘char ’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "%s\n", gai_strerror(error));
^
statsd-c-client/statsd-client.c:67:67: error: dereferencing pointer to incomplete type ‘struct addrinfo’
memcpy(&(temp->server.sin_addr), &((struct sockaddr_in
)result->ai_addr)->sin_addr, sizeof(struct in_addr));
^~
statsd-c-client/statsd-client.c:68:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
freeaddrinfo(result);
^~~~~~~~~~~~
statsd-c-client/statsd-client.c:70:5: warning: implicit declaration of function ‘srandom’ [-Wimplicit-function-declaration]
srandom(time(NULL));
^~~~~~~
statsd-c-client/statsd-client.c:57:37: warning: unused variable ‘hints’ [-Wunused-variable]
struct addrinfo *result = NULL, hints;
^~~~~
statsd-c-client/statsd-client.c: In function ‘should_send’:
statsd-c-client/statsd-client.c:116:27: warning: implicit declaration of function ‘random’ [-Wimplicit-function-declaration]
float p = ((float)random() / RAND_MAX);
^~~~~~
error: command 'gcc' failed with exit status 1

Related to storage size of ‘hints’ isn’t known I found this topic https://stackoverflow.com/questions/38931930/compile-libxml2-get-error-storage-size-of-hints-isn-t-known/38933236#38933236
Maybe this helps.
I tried both with python2 and python3

Thank you

@jonashaag
Copy link
Owner

jonashaag commented May 21, 2020

Looks like you’re missing some headers. The Stack Overflow link you found is unrelated. Can you try to compile statsd separately? (e.g. as part of bjoern's make process)

@totti4Life
Copy link
Author

Does not help.
Tested on Ubuntu 19 and 18 also under Debian 10 (inside docker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants