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

Fails to build for 64bit architectures #40

Closed
rainwolf opened this issue Mar 23, 2016 · 6 comments
Closed

Fails to build for 64bit architectures #40

rainwolf opened this issue Mar 23, 2016 · 6 comments

Comments

@rainwolf
Copy link
Contributor

OpenSSL builds for i386 and armv7 architectures, but Tor complains of a non-linkable OpenSSL for the arm64 and x86_64 architectures with XCode 7.3.

The specific error (when building Tor) is the following:
checking for openssl directory... configure: WARNING: Could not find a linkable openssl. If you have it installed somewhere unusual, you can specify an explicit path using --with-openssl-dir

@chrisballinger
Copy link
Collaborator

Seeing this now too. It's definitely related to Xcode 7.3 but I have no idea why it's broken all of a sudden.

@chrisballinger
Copy link
Collaborator

conftest.c:69:25: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
RAND_add((void*)0,0,0); exit(0);
                        ^
conftest.c:69:25: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
| void RAND_add(const void *buf, int num, double entropy);
| int
| main ()
| {
| RAND_add((void*)0,0,0); exit(0);
|   ;
|   return 0;
| }

Looks like the latest version of clang complains about conftest.c missing #include <stdlib.h> because it's using exit(). Not sure why it would only complain on 64-bit archs.

@chrisballinger
Copy link
Collaborator

Ok so it can be fixed with a patch to configure.ac but it also requires you to have autoconf installed. I'll see if this is something that should be fixed upstream in Tor.

@chrisballinger
Copy link
Collaborator

Tracking upstream here: https://trac.torproject.org/projects/tor/ticket/18626#ticket

@rainwolf
Copy link
Contributor Author

I used your suggested patch and incorporated it in my fork if others are interested. I'll remove it once the suggested patch (in the Tor ticket) makes it in the next Tor release.

@mtigas
Copy link
Contributor

mtigas commented Apr 4, 2016

Just wanted to note that I’m seeing this here as well.

Looks like the fix landed for 0.2.8.2-alpha and that works just fine once you’ve updated your build to include the new 0.2.8 libs (OnionBrowser/OnionBrowser@6b7be94#diff-bf0359edc5b2b5cebe5e69a8cfdadcc8L253).

Per the Tor ticket, doesn’t look like it will be backported to 0.2.7 so folks needing stable will probably need to keep using the patch for now.

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

3 participants