Can anyone help with this please?
% sudo ./configure --with-libevent-dir=/opt/local/lib/ && make && make install -> checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package.
% port contents libevent ->Port libevent contains: /opt/local/bin/event_rpcgen.py /opt/local/include/evdns.h /opt/local/include/event.h /opt/local/include/event2/buffer.h /opt/local/include/event2/buffer_compat.h /opt/local/include/event2/bufferevent.h /opt/local/include/event2/bufferevent_compat.h /opt/local/include/event2/bufferevent_ssl.h /opt/local/include/event2/bufferevent_struct.h /opt/local/include/event2/dns.h /opt/local/include/event2/dns_compat.h /opt/local/include/event2/dns_struct.h /opt/local/include/event2/event-config.h /opt/local/include/event2/event.h /opt/local/include/event2/event_compat.h /opt/local/include/event2/event_struct.h /opt/local/include/event2/http.h /opt/local/include/event2/http_compat.h /opt/local/include/event2/http_struct.h /opt/local/include/event2/keyvalq_struct.h /opt/local/include/event2/listener.h /opt/local/include/event2/rpc.h /opt/local/include/event2/rpc_compat.h /opt/local/include/event2/rpc_struct.h /opt/local/include/event2/tag.h /opt/local/include/event2/tag_compat.h /opt/local/include/event2/thread.h /opt/local/include/event2/util.h /opt/local/include/evhttp.h /opt/local/include/evrpc.h /opt/local/include/evutil.h /opt/local/lib/libevent-2.0.5.dylib /opt/local/lib/libevent.a /opt/local/lib/libevent.dylib /opt/local/lib/libevent.la /opt/local/lib/libevent_core-2.0.5.dylib /opt/local/lib/libevent_core.a /opt/local/lib/libevent_core.dylib /opt/local/lib/libevent_core.la /opt/local/lib/libevent_extra-2.0.5.dylib /opt/local/lib/libevent_extra.a /opt/local/lib/libevent_extra.dylib /opt/local/lib/libevent_extra.la /opt/local/lib/libevent_openssl-2.0.5.dylib /opt/local/lib/libevent_openssl.a /opt/local/lib/libevent_openssl.dylib /opt/local/lib/libevent_openssl.la /opt/local/lib/libevent_pthreads-2.0.5.dylib /opt/local/lib/libevent_pthreads.a /opt/local/lib/libevent_pthreads.dylib /opt/local/lib/libevent_pthreads.la /opt/local/lib/pkgconfig/libevent.pc /opt/local/lib/pkgconfig/libevent_openssl.pc /opt/local/lib/pkgconfig/libevent_pthreads.pc
I'm flying blind here - should libevent be a binary or just a load of source files? I've only a vague idea of what the error messages mean, let alone how to fix them. GD
On Mon, Jan 23, 2012 at 2:27 PM, Geoff Down geoffdown@fastmail.net wrote:
Can anyone help with this please?
% sudo ./configure --with-libevent-dir=/opt/local/lib/ && make && make install -> checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package.
"/opt/local/" seems like a better bet than "/opt/local/lib" .
On Mon, Jan 23, 2012, at 02:33 PM, Nick Mathewson wrote:
On Mon, Jan 23, 2012 at 2:27 PM, Geoff Down geoffdown@fastmail.net wrote:
Can anyone help with this please?
% sudo ./configure --with-libevent-dir=/opt/local/lib/ && make && make install -> checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package.
"/opt/local/" seems like a better bet than "/opt/local/lib" . _______________________________________________
Thanks, that got me further, and moving the source to an admin user's home and chowning it got me a bit further still. The last few lines of the output are
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _EVP_sha256 _RSA_generate_key_ex _SHA256 _SHA256_Final _SHA256_Init _SHA256_Update _CRYPTO_ctr128_encrypt collect2: ld returned 1 exit status make[4]: *** [tor-gencert] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
- I assume this is a failure? Does it matter that there is a symlink already at /usr/bin/tor? GD
On 1/23/2012 2:56 PM, Geoff Down wrote:
On Mon, Jan 23, 2012, at 02:33 PM, Nick Mathewson wrote:
On Mon, Jan 23, 2012 at 2:27 PM, Geoff Downgeoffdown@fastmail.net wrote:
Can anyone help with this please?
% sudo ./configure --with-libevent-dir=/opt/local/lib/&& make&& make install -> checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package.
"/opt/local/" seems like a better bet than "/opt/local/lib" . _______________________________________________
Thanks, that got me further, and moving the source to an admin user's home and chowning it got me a bit further still. The last few lines of the output are
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _EVP_sha256 _RSA_generate_key_ex _SHA256 _SHA256_Final _SHA256_Init _SHA256_Update _CRYPTO_ctr128_encrypt collect2: ld returned 1 exit status make[4]: *** [tor-gencert] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
- I assume this is a failure? Does it matter that there is a symlink
already at /usr/bin/tor? GD
Do you have the 10.4u sdk installed? You might try something like the following (with changes to the directories as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --with-libevent-dir=/opt/local/lib/ --disable-dependency-tracking CC="gcc-4.0"
Of course, that sets you back to using the sdk-packaged version of OpenSSL, but if it builds at least that's progress. Also, if you haven't built libevent yourself, I'd try doing that, with the following flags (again, with directory changes as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --enable-static --disable-shared --disable-dependency-tracking CC="gcc-4.0"
and seeing if that makes any difference.
Personally, on my OSX 10.4.11 ppc node (Japnonymous) I don't use the sdk, but then, I build static versions of libevent, openssl, and libz myself and do a "mostly-static" build of tor. Everything's been building fine for me so far.
~Japlin
On Mon, Jan 23, 2012, at 06:24 PM, Justin Aplin wrote:
On 1/23/2012 2:56 PM, Geoff Down wrote:
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _EVP_sha256 _RSA_generate_key_ex _SHA256 _SHA256_Final _SHA256_Init _SHA256_Update _CRYPTO_ctr128_encrypt collect2: ld returned 1 exit status make[4]: *** [tor-gencert] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Do you have the 10.4u sdk installed? You might try something like the following (with changes to the directories as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --with-libevent-dir=/opt/local/lib/ --disable-dependency-tracking CC="gcc-4.0"
Of course, that sets you back to using the sdk-packaged version of OpenSSL, but if it builds at least that's progress. Also, if you haven't built libevent yourself, I'd try doing that, with the following flags (again, with directory changes as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --enable-static --disable-shared --disable-dependency-tracking CC="gcc-4.0"
and seeing if that makes any difference.
Personally, on my OSX 10.4.11 ppc node (Japnonymous) I don't use the sdk, but then, I build static versions of libevent, openssl, and libz myself and do a "mostly-static" build of tor. Everything's been building fine for me so far.
Hi Justin, I do have MacOSX10.4u.sdk in /Developer/SDKs/ (whatever that is). Running your first test above (with libevent-dir=/opt/local/ not /opt/local/lib) does get through to the end without an 'error' (assuming 'configure: Transparent proxy support enabled, but missing headers' isn't an error). I did 'install' the latest openssl using Macports, that generated a binary that I moved to /usr/bin. But as far as I can see 'installing' libevent 2 didn't produce a binary (even though there was a 'building' message at one point). What's the next step? GD
On 1/23/2012 6:55 PM, Geoff Down wrote:
On Mon, Jan 23, 2012, at 06:24 PM, Justin Aplin wrote:
On 1/23/2012 2:56 PM, Geoff Down wrote:
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _EVP_sha256 _RSA_generate_key_ex _SHA256 _SHA256_Final _SHA256_Init _SHA256_Update _CRYPTO_ctr128_encrypt collect2: ld returned 1 exit status make[4]: *** [tor-gencert] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Do you have the 10.4u sdk installed? You might try something like the following (with changes to the directories as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --with-libevent-dir=/opt/local/lib/ --disable-dependency-tracking CC="gcc-4.0"
Of course, that sets you back to using the sdk-packaged version of OpenSSL, but if it builds at least that's progress. Also, if you haven't built libevent yourself, I'd try doing that, with the following flags (again, with directory changes as necessary): CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --enable-static --disable-shared --disable-dependency-tracking CC="gcc-4.0"
and seeing if that makes any difference.
Personally, on my OSX 10.4.11 ppc node (Japnonymous) I don't use the sdk, but then, I build static versions of libevent, openssl, and libz myself and do a "mostly-static" build of tor. Everything's been building fine for me so far.
Hi Justin, I do have MacOSX10.4u.sdk in /Developer/SDKs/ (whatever that is). Running your first test above (with libevent-dir=/opt/local/ not /opt/local/lib) does get through to the end without an 'error' (assuming 'configure: Transparent proxy support enabled, but missing headers' isn't an error). I did 'install' the latest openssl using Macports, that generated a binary that I moved to /usr/bin. But as far as I can see 'installing' libevent 2 didn't produce a binary (even though there was a 'building' message at one point). What's the next step? GD
I'm kind of flying in the dark here (being unfamiliar with macports), but I think a proper --with-openssl-dir= statement will help. Run "openssl version -a", check the version number to make sure it's the new version and not the packaged one, and put the output of the OPENSSLDIR field in as an argument. So you'd end up with something like:
CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" \ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/path/to/openssldir --disable-dependency-tracking CC="gcc-4.0"
We won't bother with the sdk bits, since that will (by definition) use the old libs, instead of the ones you're aiming for. I think what's happening is the build/test process is using the new openssl binary with the old libs, or missing out on the openssl libs completely.
~Japlin
On Mon, Jan 23, 2012, at 09:20 PM, Justin Aplin wrote:
I'm kind of flying in the dark here (being unfamiliar with macports), but I think a proper --with-openssl-dir= statement will help. Run "openssl version -a", check the version number to make sure it's the new version and not the packaged one, and put the output of the OPENSSLDIR field in as an argument. So you'd end up with something like:
CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" \ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/path/to/openssldir --disable-dependency-tracking CC="gcc-4.0"
We won't bother with the sdk bits, since that will (by definition) use the old libs, instead of the ones you're aiming for. I think what's happening is the build/test process is using the new openssl binary with the old libs, or missing out on the openssl libs completely.
So should LDFLAGS be set to a null string? GD
On 1/23/2012 9:36 PM, Geoff Down wrote:
On Mon, Jan 23, 2012, at 09:20 PM, Justin Aplin wrote:
I'm kind of flying in the dark here (being unfamiliar with macports), but I think a proper --with-openssl-dir= statement will help. Run "openssl version -a", check the version number to make sure it's the new version and not the packaged one, and put the output of the OPENSSLDIR field in as an argument. So you'd end up with something like:
CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" \ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/path/to/openssldir --disable-dependency-tracking CC="gcc-4.0"
We won't bother with the sdk bits, since that will (by definition) use the old libs, instead of the ones you're aiming for. I think what's happening is the build/test process is using the new openssl binary with the old libs, or missing out on the openssl libs completely.
So should LDFLAGS be set to a null string? GD
To be honest, I hadn't thought about it. To be safe, I'd use "unset CFLAGS && unset LDFLAGS" to clear them, rather than explicitly defining them as empty when running ./configure
~Japlin
On Mon, Jan 23, 2012, at 10:06 PM, Justin Aplin wrote:
I'm kind of flying in the dark here (being unfamiliar with macports), but I think a proper --with-openssl-dir= statement will help. Run "openssl version -a", check the version number to make sure it's the new version and not the packaged one, and put the output of the OPENSSLDIR field in as an argument. So you'd end up with something like:
CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" \ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/path/to/openssldir --disable-dependency-tracking CC="gcc-4.0"
Thanks for your patience. Output attached - I'm running as an admin user, and have Xcode 2.5 installed (but not X11). GD
On Jan 23, 2012, at 10:29 PM, Geoff Down wrote:
On Mon, Jan 23, 2012, at 10:06 PM, Justin Aplin wrote:
I'm kind of flying in the dark here (being unfamiliar with macports), but I think a proper --with-openssl-dir= statement will help. Run "openssl version -a", check the version number to make sure it's the new version and not the packaged one, and put the output of the OPENSSLDIR field in as an argument. So you'd end up with something like:
CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" \ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/path/to/openssldir --disable-dependency-tracking CC="gcc-4.0"
Thanks for your patience. Output attached - I'm running as an admin user, and have Xcode 2.5 installed (but not X11). GD
My bad, I wasn't thinking straight when I wrote that. I forgot the openssldir, at least on OSX, doesn't actually contain the libs. Try "sudo find / -iname libssl*.dylib" to find an appropriate lib in your setup. Since I replaced my system openssl with 1.0.0g, I have /usr/lib/libssl.1.0.0.dylib, so I use --with-openssl-dir=/usr at build time. If you get the same error with an appropriate explicit pointer to your libs, I'll be truly stumped, and you may have to resort to building your own.
~Japlin
On Tue, Jan 24, 2012, at 11:01 AM, Justin Aplin wrote:
My bad, I wasn't thinking straight when I wrote that. I forgot the openssldir, at least on OSX, doesn't actually contain the libs. Try "sudo find / -iname libssl*.dylib" to find an appropriate lib in your setup. Since I replaced my system openssl with 1.0.0g, I have /usr/lib/libssl.1.0.0.dylib, so I use --with-openssl-dir=/usr at build time. If you get the same error with an appropriate explicit pointer to your libs, I'll be truly stumped, and you may have to resort to building your own.
ok, barring one in a .app directory, I have /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libssl.0.9.7.dylib /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libssl.0.9.dylib /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libssl.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libssl.0.9.7.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libssl.0.9.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libssl.dylib /opt/local/lib/libssl.1.0.0.dylib /opt/local/lib/libssl.dylib /usr/lib/libssl.0.9.7.dylib /usr/lib/libssl.0.9.dylib /usr/lib/libssl.dylib
So if I understand correctly, I should use $ unset LDFLAGS $ CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" $ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/opt/local --disable-dependency-tracking CC="gcc-4.0"
GD
On Tue, 24 Jan 2012 17:47:21 +0000 Geoff Down geoffdown@fastmail.net wrote:
So if I understand correctly, I should use $ unset LDFLAGS $ CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" $ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/opt/local --disable-dependency-tracking CC="gcc-4.0"
Fwiw, this was written for 10.4 back when we had a 10.4 build machine, https://gitweb.torproject.org/vidalia.git/blob/HEAD:/pkg/osx/build-bundle.tx...
In theory, it should still work.
On Tue, Jan 24, 2012, at 12:55 PM, Andrew Lewman wrote:
On Tue, 24 Jan 2012 17:47:21 +0000 Geoff Down geoffdown@fastmail.net wrote:
So if I understand correctly, I should use $ unset LDFLAGS $ CFLAGS="-O -g -mmacosx-version-min=10.4 -arch ppc" $ ./configure --with-libevent-dir=/opt/local --with-openssl-dir=/opt/local --disable-dependency-tracking CC="gcc-4.0"
Fwiw, this was written for 10.4 back when we had a 10.4 build machine, https://gitweb.torproject.org/vidalia.git/blob/HEAD:/pkg/osx/build-bundle.tx...
In theory, it should still work.
Justin's guidance got me through it - relay up and running! Can I stick with this method in future? A couple of final questions: Now I have the latest Libevent and OpenSSL, do I still need 'export EVENT_NOKQUEUE=1' in my Tor invocation script? How do I make 'make install' install to /Library/Tor rather than /usr/local/bin ?
No OSX10.4 build machine now as well as no OSX10.3 . All that old hardware going to waste.
Thanks again, GD
On 1/24/2012 1:30 PM, Geoff Down wrote:
On Tue, Jan 24, 2012, at 12:55 PM, Andrew Lewman wrote:
Fwiw, this was written for 10.4 back when we had a 10.4 build machine, https://gitweb.torproject.org/vidalia.git/blob/HEAD:/pkg/osx/build-bundle.tx...
In theory, it should still work.
It does, with some minor modifications for arch and whatnot; this is what I use to build the Vidalia bundle for Japnonymous. It just assumes you build all your libs yourself, instead of using macports.
Justin's guidance got me through it - relay up and running! Can I stick with this method in future?
Glad to hear it! There shouldn't be any issues in the future now that you know which paths to use.
A couple of final questions: Now I have the latest Libevent and OpenSSL, do I still need 'export EVENT_NOKQUEUE=1' in my Tor invocation script?
This one's beyond me, sorry.
How do I make 'make install' install to /Library/Tor rather than /usr/local/bin ?
This should be as simple as adding --prefix=/Library/Tor to the configure command. There's a lot more directory fine-tuning available if you want/need it, you can get a list with ./configure --help
No OSX10.4 build machine now as well as no OSX10.3 . All that old hardware going to waste.
If I'm not mistaken, I think the devtools for 10.5 can backport to 10.4, and I know that the 10.4 devtools can build for 10.2 and 10.3. Well, in theory, at least; I've never tried it myself.
~Japlin
On Tue, 24 Jan 2012 14:46:21 -0500 Justin Aplin japlin@gmail.com wrote:
If I'm not mistaken, I think the devtools for 10.5 can backport to 10.4, and I know that the 10.4 devtools can build for 10.2 and 10.3. Well, in theory, at least; I've never tried it myself.
We could never get the backports to work. Too many symbol errors with actual 10.2, 10.3, and 10.4 dylibs when run on those systems. The build machine is a 10.5 system, and nothing produced from it will run on older versions, regardless of what 10.x sdk we point it at.
10.2 and 10.3 are missing the needed openssl primitives altogether.
On Tue, 24 Jan 2012 18:30:58 +0000 Geoff Down geoffdown@fastmail.net wrote:
No OSX10.4 build machine now as well as no OSX10.3 . All that old hardware going to waste.
The 10.3 machine had the system board partially melt during a qt compile (which takes 15 hours on a ppc). Turns out the cpu heatsink was never properly applied and hot cpu was hot.
The 10.4 machine had a drive die and the ram go bad within a month of each other. After replacing both, 10.5 was the current OS and is the current ppc build machine.
tor-relays@lists.torproject.org