Re: [fossil-users] Getting configure to find openssl on FreeBSD
Hello, more likely than not this is not related, but perhaps it gives a hint in the right direction anyway: on NetBSD there is also an openssl in the base-system, and one in pkgsrc (NetBSD's equivalent of ports). In my case, fossil's ./configure could find openssl, but the resulting binary could not find the .so. This turned out to be a flaw/mismatch in pkg-config when queried for compiler-/linker-flags. This was posted here: https://mail-index.netbsd.org/pkgsrc-users/2014/05/31/msg019783.html The local hack here was to alter the libssl.pc pkg-config config file, but it was fixed here: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=48871 h2h, Michai On 11 September 2014 21:06, wrote: > 'Lo. > > The fossil build scripts seem to be unable to find openssl on FreeBSD > 9.2. It has a choice of the version included with the base system > (in /usr) or the version available from FreeBSD ports (/usr/local), > but it can't seem to find either of them. > > Is there any way to get it to give more information about why it's > failing to find them? > > $ ./configure --with-openssl=auto > Host System...x86_64-unknown-freebsd9.2 > Build System...x86_64-unknown-freebsd9.2 > C compiler... cc -g -O2 > C++ compiler... c++ -g -O2 > Build C compiler...cc > Checking for stdlib.h...ok > Checking for uint32_t...ok > Checking for uint16_t...ok > Checking for int16_t...ok > Checking for uint8_t...ok > Checking for pread...ok > Checking for tclsh...no > Checking for system ssl...no > Checking for ssl in /usr/sfw...no > Checking for ssl in /usr/local/ssl...no > Checking for ssl in /usr/lib/ssl...no > Checking for ssl in /usr/ssl...no > Checking for ssl in /usr/pkg...no > Checking for ssl in /usr/local...no > Checking for ssl in /usr...no > Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS > support Try: 'configure --help' for options > > $ ./configure --with-openssl=/usr > ... > Checking for ssl in /usr...no > Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS > support Try: 'configure --help' for options > > $ ./configure --with-openssl=/usr/lib > ... > Checking for ssl in /usr/lib...no > Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS > support Try: 'configure --help' for options > > $ ./configure --with-openssl=/usr/local > ... > Checking for ssl in /usr/local...no > Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS > support Try: 'configure --help' for options > > $ ./configure --with-openssl=/usr/local/lib > ... > Checking for ssl in /usr/local/lib...no > Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS > support Try: 'configure --help' for options > > $ ls /usr/local/lib/libssl.so* > /usr/local/lib/libssl.so > /usr/local/lib/libssl.so.8 > > $ ls /usr/lib/libssl.so* > /usr/lib/libssl.so > /usr/lib/libssl.so.6 > > ... and so on. > > M > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Getting configure to find openssl on FreeBSD
Bizarrely, I went back to this today and fossil compiled first time without me needing to specify any --with-openssl options. I've no idea why! On 2014-09-11T17:33:33 -0400 Eric Rubin-Smith wrote: > > A stripped shared library would not be worth much, since the whole point > of a shared library is to provide symbols. Did you pass '-D'? Nope, didn't know -D existed. $ file /usr/lib/libssl.so.6 /usr/lib/libssl.so.6: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, stripped $ nm /usr/lib/libssl.so.6 nm: /usr/lib/libssl.so.6: no symbols $ nm -D /usr/lib/libssl.so.6 | grep SSL_new 00034810 T SSL_new All binaries in the FreeBSD base are stripped (not sure I really see the utility of it, but...) On 2014-09-12T12:15:18 +1000 Steve Bennett wrote: > > ./configure --debug ... > > And then look at config.log Thanks, useful for future reference. M ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Getting configure to find openssl on FreeBSD
On 12 Sep 2014, at 5:06 am, org.fossil-scm.fossil-us...@io7m.com wrote: > 'Lo. > > The fossil build scripts seem to be unable to find openssl on FreeBSD > 9.2. It has a choice of the version included with the base system > (in /usr) or the version available from FreeBSD ports (/usr/local), > but it can't seem to find either of them. > > Is there any way to get it to give more information about why it's > failing to find them? ./configure --debug ... And then look at config.log Cheers, Steve -- Embedded Systems Specialists - http://workware.net.au/ WorkWare Systems Pty Ltd W: www.workware.net.au P: +61 434 921 300 E: ste...@workware.net.au F: +61 7 3391 6002 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Getting configure to find openssl on FreeBSD
org.fossil-scm.fossil-us...@io7m.com wrote: > Think that may be partly wrong, as that'd mean that if I specified /usr, > then the following would have to exist: > > /usr/openssl/ssl.h Yeah, my mistake. The configurator does this (from auto.def): set cflags "-I$dir/include" set ldflags "-L$dir/lib" and then performs a check like: if {[check-for-openssl $msg "$cflags $ldflags"]} ... which means msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] { if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} { incr rc } } i.e. it is looking in your DIR/include/openssl/ssl.h and DIR/lib/lib{ssl,crypto}.so. Of course I assume that the config script under the covers is doing what traditional config scripts do, i.e. create a test program and try to compile it. You might check config.log to see exactly what it is doing when you pass /usr/local, which seems like it should be working for you. (The file seems to give less information than the usual 'configure' script, but does seem to report errors to config.log.) > The /usr/lib/*.so libraries are stripped, so doesn't appear to have > any symbols A stripped shared library would not be worth much, since the whole point of a shared library is to provide symbols. Did you pass '-D'? -- Eric A. Rubin-Smith ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Getting configure to find openssl on FreeBSD
On 2014-09-11T16:09:42 -0400 Eric Rubin-Smith wrote: > > I skimmed through the configure code. Looks like you need to have > the subdir and file 'openssl/ssl.h' beneath the dir you specify, and > the subdir and files 'lib/libssl.so' and 'lib/libcrypto.so' beneath the > dir you specify. Furthermore, one of those libraries has to provide > the symbol "SSL_new". > > My (very quick and possibly wrong) read of the code is that those are > exactly the "pass criteria" for deciding that SSL is supported on the > build box using the dir your specify. Think that may be partly wrong, as that'd mean that if I specified /usr, then the following would have to exist: /usr/openssl/ssl.h ... and that's obviously not true of any of the other platforms upon which I've built fossil. I do have (where → indicates a symlink): /usr/include/openssl/ssl.h /usr/lib/libssl.so → /usr/lib/libssl.so.6 /usr/lib/libssl.so.6 /usr/lib/libcrypto.so → /lib/libcrypto.so.6 /lib/libcrypto.so.6 /usr/local/include/openssl/ssl.h /usr/local/lib/libcrypto.so → /usr/local/lib/libcrypto.so.8 /usr/local/lib/libcrypto.so.8 /usr/local/lib/libssl.so → /usr/local/lib/libssl.so.8 /usr/local/lib/libssl.so.8 The /usr/lib/*.so libraries are stripped, so doesn't appear to have any symbols, but the /usr/local/lib/*.so libraries aren't, and the ssl library definitely contains SSL_new. M ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Getting configure to find openssl on FreeBSD
org.fossil-scm.fossil-us...@io7m.com wrote: > 'Lo. > > The fossil build scripts seem to be unable to find openssl on FreeBSD > 9.2. It has a choice of the version included with the base system > (in /usr) or the version available from FreeBSD ports (/usr/local), > but it can't seem to find either of them. > > Is there any way to get it to give more information about why it's > failing to find them? I skimmed through the configure code. Looks like you need to have the subdir and file 'openssl/ssl.h' beneath the dir you specify, and the subdir and files 'lib/libssl.so' and 'lib/libcrypto.so' beneath the dir you specify. Furthermore, one of those libraries has to provide the symbol "SSL_new". My (very quick and possibly wrong) read of the code is that those are exactly the "pass criteria" for deciding that SSL is supported on the build box using the dir your specify. Did you confirm that all those are true in your case? -- Eric A. Rubin-Smith ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Getting configure to find openssl on FreeBSD
'Lo. The fossil build scripts seem to be unable to find openssl on FreeBSD 9.2. It has a choice of the version included with the base system (in /usr) or the version available from FreeBSD ports (/usr/local), but it can't seem to find either of them. Is there any way to get it to give more information about why it's failing to find them? $ ./configure --with-openssl=auto Host System...x86_64-unknown-freebsd9.2 Build System...x86_64-unknown-freebsd9.2 C compiler... cc -g -O2 C++ compiler... c++ -g -O2 Build C compiler...cc Checking for stdlib.h...ok Checking for uint32_t...ok Checking for uint16_t...ok Checking for int16_t...ok Checking for uint8_t...ok Checking for pread...ok Checking for tclsh...no Checking for system ssl...no Checking for ssl in /usr/sfw...no Checking for ssl in /usr/local/ssl...no Checking for ssl in /usr/lib/ssl...no Checking for ssl in /usr/ssl...no Checking for ssl in /usr/pkg...no Checking for ssl in /usr/local...no Checking for ssl in /usr...no Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS support Try: 'configure --help' for options $ ./configure --with-openssl=/usr ... Checking for ssl in /usr...no Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS support Try: 'configure --help' for options $ ./configure --with-openssl=/usr/lib ... Checking for ssl in /usr/lib...no Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS support Try: 'configure --help' for options $ ./configure --with-openssl=/usr/local ... Checking for ssl in /usr/local...no Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS support Try: 'configure --help' for options $ ./configure --with-openssl=/usr/local/lib ... Checking for ssl in /usr/local/lib...no Error: OpenSSL not found. Consider --with-openssl=none to disable HTTPS support Try: 'configure --help' for options $ ls /usr/local/lib/libssl.so* /usr/local/lib/libssl.so /usr/local/lib/libssl.so.8 $ ls /usr/lib/libssl.so* /usr/lib/libssl.so /usr/lib/libssl.so.6 ... and so on. M ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users