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

git build failure with libssl (OpenSSL) in custom directory

From
LBLars Buitinck <larsmans@gmail.com>
Date
Nov 18, 2010, 17:37 UTC
Message-ID
<AANLkTikQC9hncPZkeScWi7OsWw+Optbvxaygyn1p7_sN@mail.gmail.com>
Hi all,

I've built Git on a Debian Linux box where I don't have root rights. I first built OpenSSL 1.0.0b and Curl successfully, installing both in $HOME/apps. I tried to do the same for Git, using

  CPPFLAGS=-I$HOME/apps/include LDFLAGS=-L$HOME/apps/lib make
prefix=$HOME/apps all doc info
but the build failed with the error
      LINK git-fast-import
  /usr/bin/ld: cannot find -lcrypto
  collect2: ld returned 1 exit status
  make: *** [git-fast-import] Error 1
I checked the Makefile, and found
  # CFLAGS and LDFLAGS are for the users to override from the command line.
  CFLAGS = -g -O2 -Wall
  LDFLAGS =

I'm not a Makefile expert, but it seems to me that the last line contradicts the comment. In any case, changing it to

  LDFLAGS = -L$(HOME)/apps/lib -lssl -lcrypto -ldl

worked, but only after also building and installing a shared library version of OpenSSL.

I've got a working Git now, but I thought I'd let you know. I haven't checked out the development version yet.

Regards, Lars

PS.: I'm not a member of this list, but git-scm.com suggested I send my question to you.

Next: Jonathan Nieder
Message 1 of 4 in “git build failure with libssl (OpenSSL) in custom directory”
  1. Lars BuitinckNov 18, 2010
  2. Jonathan NiederNov 18, 2010
  3. Lars BuitinckNov 18, 2010
  4. Jonathan NiederNov 18, 2010

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.