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

Cannot compile after ./configure ARIA2_STATIC=yes #359

Closed
Haocen opened this issue Apr 4, 2015 · 2 comments
Closed

Cannot compile after ./configure ARIA2_STATIC=yes #359

Haocen opened this issue Apr 4, 2015 · 2 comments

Comments

@Haocen
Copy link

Haocen commented Apr 4, 2015

Compile with default setting is OK.
But if run ./configure ARIA2_STATIC=yes first, compiler will report redefinition of "struct addrinfo".

  CXX      AbstractAuthResolver.lo
  CXX      AbstractCommand.lo
In file included from a2time.h:45:0,
                 from TimerA2.h:39,
                 from AbstractCommand.h:44,
                 from AbstractCommand.cc:35:
gettimeofday.h:55:13: error: expected initializer before 'gettimeofday'
 int __cdecl gettimeofday(struct timeval *__restrict__ tp,
             ^
In file included from a2netcompat.h:85:0,
                 from DownloadEngine.h:46,
                 from AbstractCommand.cc:40:
getaddrinfo.h:242:8: error: redefinition of 'struct addrinfo'
 struct addrinfo {
        ^
In file included from a2netcompat.h:57:0,
                 from DownloadEngine.h:46,
                 from AbstractCommand.cc:40:
/usr/include/netdb.h:567:8: error: previous definition of 'struct addrinfo'
 struct addrinfo
        ^
make[3]: *** [AbstractCommand.lo] Error 1

It only happens when compiling with GNUtls instead of OpenSSL.

@tatsuhiro-t
Copy link
Collaborator

It looks like gnutls.pc provides invalid LDFLAGS. I saw following error in config.log:

configure:19267: checking for gnutls_certificate_set_x509_system_trust
configure:19267: g++ -o conftest -g -O2 -pipe -std=c++11  -I/usr/include/p11-kit-1   -I/usr/include/libxml2    conftest.cpp -L/usr/lib/x86_64-linux-gnu -lgnutls -lz -R/usr/lib/x86_64-linux-gnu -lp11-kit -lgmp -lhogweed -lgmp -lnettle -ltasn1 -lp11-kit -lz  -lsqlite3 -ldl -lpthread  -lxml2 -L/usr/lib/x86_64-linux-gnu -lz   >&5
g++: error: unrecognized command line option '-R'

That could be gnutls bug. The workaround is build with OpenSSL.

@Haocen
Copy link
Author

Haocen commented Apr 7, 2015

Thank you for confirming that.

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