[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build tarsnap on cygwin



Hi all,

I attempted to build tarsnap on cygwin, but it complained about not finding OpenSSL. After trying various cygwin packages that looked like they provided it, I did a google search and found a person whose solution was to download/build/install OpenSSL from source code.

When I did that I ran into an OpenSSL bug[1] but they fixed it and now it builds and installs (or so it says).

Unfortunately, tarsnap still says it can't find OpenSSL. Is there an option I can give to tarsnap to tell it that it should be looking for OpenSSL in /usr/local/ instead of the standard place? Or is there any other advice for building tarsnap on cygwin when it says it can't find OpenSSL?

When I look at the config.log, it complains about gcc .... -lcrypto where it can't find crypto. When I look for it, I see it in the location /usr/local/lib/libcrypto.a and libcrypto.dll.a.

$ find /usr/local/ | grep crypto
/usr/local/bin/cygcrypto-3.dll
/usr/local/include/openssl/crypto.h
/usr/local/include/openssl/cryptoerr.h
*** this one *** /usr/local/lib/libcrypto.a
*** this one *** /usr/local/lib/libcrypto.dll.a
/usr/local/lib/pkgconfig/libcrypto.pc
/usr/local/share/doc/openssl/html/man3/ERR_load_crypto_strings.html
/usr/local/share/doc/openssl/html/man3/OPENSSL_init_crypto.html
/usr/local/share/doc/openssl/html/man7/crypto.html
/usr/local/share/man/man3/ERR_load_crypto_strings.3
/usr/local/share/man/man3/OPENSSL_init_crypto.3
/usr/local/share/man/man7/crypto.7

Any ideas or suggestions greatly appreciated.

V/r,
Bryan

[1] - https://github.com/openssl/openssl/issues/8684

PS - Here are relevant lines from configure and config.log.

$ ./configure
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking target system type... x86_64-unknown-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for ranlib... ranlib
checking for strip... strip
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
checking acl/libacl.h usability... yes
checking acl/libacl.h presence... yes
checking for acl/libacl.h... yes
checking attr/xattr.h usability... yes
checking attr/xattr.h presence... yes
checking for attr/xattr.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking linux/fs.h usability... no
checking linux/fs.h presence... no
checking for linux/fs.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/acl.h usability... yes
checking sys/acl.h presence... yes
checking for sys/acl.h... yes
checking sys/extattr.h usability... no
checking sys/extattr.h presence... no
checking for sys/extattr.h... no
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/utime.h usability... yes
checking sys/utime.h presence... yes
checking for sys/utime.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking for sysinfo... yes
checking for struct sysinfo... yes
checking for struct sysinfo.totalram... yes
checking for struct sysinfo.mem_unit... yes
checking for sys/mount.h... yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking sys/sysctl.h usability... no
checking sys/sysctl.h presence... no
checking for sys/sysctl.h... no
checking for struct statfs.f_fstypename... no
checking for struct statfs.f_type... yes
checking for struct statvfs.f_fstypename... no
checking for struct statvfs.f_basetype... no
checking linux/magic.h usability... no
checking linux/magic.h presence... no
checking for linux/magic.h... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for inflate in -lz... yes
checking openssl/rsa.h usability... yes
checking openssl/rsa.h presence... yes
checking for openssl/rsa.h... yes
checking for RSA_private_encrypt in -lcrypto... no
configure: error: *** OpenSSL missing ***

Relevant lines from config.log:

configure:6227: checking openssl/rsa.h usability
configure:6227: gcc -c -g -O2  conftest.c >&5
configure:6227: $? = 0
configure:6227: result: yes
configure:6227: checking openssl/rsa.h presence
configure:6227: gcc -E  conftest.c
configure:6227: $? = 0
configure:6227: result: yes
configure:6227: checking for openssl/rsa.h
configure:6227: result: yes
configure:6229: checking for RSA_private_encrypt in -lcrypto
configure:6254: gcc -o conftest.exe -g -O2   conftest.c -lcrypto -lz -lrt  >&5 /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
configure:6254: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tarsnap"
| #define PACKAGE_TARNAME "tarsnap"
| #define PACKAGE_VERSION "1.0.39"
| #define PACKAGE_STRING "tarsnap 1.0.39"
| #define PACKAGE_BUGREPORT "cperciva@tarsnap.com"
| #define PACKAGE_URL ""
| #define PACKAGE "tarsnap"
| #define VERSION "1.0.39"
| #define LIBARCHIVE_VERSION_STRING "2.7.0"
| #define LIBARCHIVE_VERSION_NUMBER "2007000"