git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Under NO_OPENSSL -lssl should not be used

From
Junio C Hamano <junkio@cox.net>
Date
Jul 30, 2005, 05:02 UTC
Message-ID
<7vek9g6g4f.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0507292038160.29650@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 8 quoted lines
> This doesn't work at least in the form that Junio merged it (and from 
> what I can tell, he merged your patch as-is):
>
>   torvalds@shell0:~/src/git> make NO_OPENSSL=1
>   cc -g -O2 -Wall '-DNO_OPENSSL' '-DSHA1_HEADER="mozilla-sha1/sha1.h"' -o git-rev-list rev-list.o libgit.a -lz -lssl
>   /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld: cannot find -lssl
>
> it needs to disable the -lssl too..
Would this be OK?  I think it is ugly but it gets the job done.

Jon, do we really need bignum to do the flow computation? From a quick glance, it appears to me that the fraction manipulation part is quite well isolated. Do you think adding the support for using other bignum implementation be reasonable (assuming you do need to use bignum based fraction)?

------------ This is quick and dirty but under NO_OPENSSL we should not attempt to link with -lssl (nor -lcrypto).

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
cd /opt/packrat/playpen/public/in-place/git/git.junio/
jit-diff
# - pu: Fetch from a packed repository on dumb servers.
# + (working tree)
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -108,9 +108,11 @@ LIBS += -lz
 
 ifndef NO_OPENSSL
 	LIB_OBJS += epoch.o
+	OPENSSL_LIBSSL=-lssl
 else
 	CFLAGS += '-DNO_OPENSSL'
 	MOZILLA_SHA1=1
+	OPENSSL_LIBSSL=
 endif
 ifdef MOZILLA_SHA1
   SHA1_HEADER="mozilla-sha1/sha1.h"
@@ -148,7 +150,7 @@ git-ssh-pull: rsh.o pull.o
 git-ssh-push: rsh.o
 
 git-http-pull: LIBS += -lcurl
-git-rev-list: LIBS += -lssl
+git-rev-list: LIBS += $(OPENSSL_LIBSSL)
 
 $(LIB_OBJS): $(LIB_H)
 $(DIFF_OBJS): diffcore.h

Compilation finished at Fri Jul 29 21:48:01
Previous: Junio C HamanoNext: Linus Torvalds
Message 15 of 21 in “Bits from git-pb”
  1. 0/2 Bits from git-pbPetr Baudis, Jul 29, 2005
  2. 1/2 Trivial tidyupsPetr Baudis, Jul 29, 2005
  3. 2/2 Unify usage strings declarationPetr Baudis, Jul 29, 2005
  4. Junio C HamanoJul 30, 2005
  5. Matthias UrlichsJul 30, 2005
  6. 3/2 git-merge-cache -q doesn't complain about failing merge programPetr Baudis, Jul 29, 2005
  7. Junio C HamanoJul 30, 2005
  8. 4/2 Improve the compilation-time settings interfacePetr Baudis, Jul 29, 2005
  9. Petr BaudisJul 29, 2005
  10. 5/2 Remove the explicit Makefile dependencies descriptionPetr Baudis, Jul 29, 2005
  11. 6/2 Reorder Makefile rulesPetr Baudis, Jul 29, 2005
  12. 7/2 Support for NO_OPENSSLPetr Baudis, Jul 29, 2005
  13. Linus TorvaldsJul 30, 2005
  14. Junio C HamanoJul 30, 2005
  15. Under NO_OPENSSL -lssl should not be usedJunio C Hamano, Jul 30, 2005
  16. Linus TorvaldsJul 30, 2005
  17. Jon SeymourAug 2, 2005
  18. 8/2 Build commands through object filesPetr Baudis, Jul 29, 2005
  19. Petr BaudisJul 30, 2005
  20. Junio C HamanoJul 30, 2005
  21. Junio C HamanoJul 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.