{"thread":{"id":"43676","subject":"static linking lib order problem","startedAt":"2006-11-20T17:32:25Z","lastAt":"2006-11-20T17:32:25Z","messageCount":1,"participants":["Bennett Todd"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"296595","messageId":"20061120173225.GA16161@rahul.net","threadId":"43676","inReplyTo":null,"subject":"static linking lib order problem","fromName":"Bennett Todd","fromEmail":"bet@rahul.net","sentAt":"2006-11-20T17:32:25Z","receivedAt":"2006-11-20T17:32:25Z","isPatch":false,"sender":{"key":"bet@rahul.net","avatar":null},"body":"I build git for Bent Linux, with\n\n\tmake prefix=/usr NEEDS_LIBICONV=YesPlease\n\nIt develops compile and link lines that look like:\n\ngcc -g -O2 -Wall  -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRLCPY -o git-http-fetch   fetch.o http.o http-fetch.o \\\n                libgit.a xdiff/lib.a -lz  -liconv  -lcrypto -lcurl -lexpat\n\nwhich produce vast numbers of errors, which look like\n\n/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../libcurl.a(ssluse.o)(.text.rand_enough+0x4): In function `rand_enough':\n: undefined reference to `RAND_status'\n/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../libcurl.a(ssluse.o)(.text.ossl_seed+0x2b): In function `ossl_seed':\n: undefined reference to `RAND_load_file'\n[...]\n/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../libcurl.a(http_ntlm.o)(.text.Curl_output_ntlm+0x370): In function `Curl_output_ntlm':\n: undefined reference to `MD5_Update'\n/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../libcurl.a(http_ntlm.o)(.text.Curl_output_ntlm+0x37d): In function `Curl_output_ntlm':\n: undefined reference to `MD5_Final'\ncollect2: ld returned 1 exit status\nmake: *** [git-http-fetch] Error 1\n\nI've been kludging around it with this patch:\n\ndiff -ru git-1.4.4.orig/Makefile git-1.4.4/Makefile\n--- git-1.4.4.orig/Makefile\t2006-11-15 07:22:27.000000000 +0000\n+++ git-1.4.4/Makefile\t2006-11-15 20:49:26.000000000 +0000\n@@ -439,7 +439,7 @@\n \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n \t\tCURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl\n \telse\n-\t\tCURL_LIBCURL = -lcurl\n+\t\tCURL_LIBCURL = -lcurl -lssl -lcrypto\n \tendif\n \tPROGRAMS += git-http-fetch$X\n \tcurl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)\n\njust because I didn't take the time to understand the git build\nprocess's library conf system.\n\n-Bennett\n"}]}