Re: [PATCH] imap-send: link against libcrypto for HMAC and others
- From
Anders Kaseorg <andersk@mit.edu>
- Date
- Dec 6, 2010, 05:28 UTC
- Message-ID
- <1291613304.3339.12.camel@fixed-disk>
- In-Reply-To
- <1290629033-20566-1-git-send-email-flameeyes@gmail.com>
On Wed, 2010-11-24 at 21:03 +0100, Diego Elio Pettenò wrote:
Show 9 quoted lines
> When using stricter linkers, such as GNU gold or Darwin ld, transitive > dependencies are not counted towards symbol resolution. If we don't > link imap-send to libcrypto, we'll have undefined references to the > HMAC_*, EVP_* and ERR_* functions families. > […] > git-imap-send$X: imap-send.o $(GITLIBS) > $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ > - $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) > + $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
This broke the build with NO_OPENSSL=1, so Debian will need to revert it:
CC imap-send.o
LINK git-imap-send
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
make[1]: *** [git-imap-send] Error 1Also, the Makefile already has a NEEDS_CRYPTO_WITH_SSL flag that’s automatically set on Darwin, Windows, and MinGW. We shouldn’t have two mechanisms for addressing the same problem; maybe we just need to enable the existing flag on more (or all) platforms?
Anders