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

Unusual library path on OS X

From
JWJeffrey Walton <noloader@gmail.com>
Date
Dec 31, 2018, 20:57 UTC
Message-ID
<CAH8yC8n1BB4ZBqd7VcLXdRzovbOxCRrmztsCBK8ENAexbxSyBA@mail.gmail.com>
Hi Everyone,

I'm building Git 1.20.1 from sources on OS X. Git (and its dependents) were configured with:

  PKGCONFPATH: /usr/local/lib/pkgconfig
       CPPFLAGS: -I/usr/local/include -DNDEBUG
         CFLAGS: -g2 -O2 -march=native -fPIC
       CXXFLAGS: -g2 -O2 -march=native -fPIC
        LDFLAGS: -L/usr/local/lib -Wl,-rpath,/usr/local/lib
         LDLIBS: -ldl -lpthread
For Git it results in a configure called with:
    PERL="$SH_PERL" \
    PKG_CONFIG_PATH="${BUILD_PKGCONFIG[*]}" \
    CPPFLAGS="${BUILD_CPPFLAGS[*]}" \
    CFLAGS="${BUILD_CFLAGS[*]}" \
    CXXFLAGS="${BUILD_CXXFLAGS[*]}" \
    LDFLAGS="${BUILD_LDFLAGS[*]}" \
    LIBS="-lssl -lcrypto -lz ${BUILD_LIBS[*]}" \
./configure --prefix="$BUILD_PREFIX" --with-lib="$BUILD_LIBDIR" \
    ...
BUILD_PREFIX is /usr/local, and BUILD_LIBDIR=/usr/local/lib.

Linking produces the following, which seems a bit unusual. It looks like PREFIX and LIBDIR are being concatenated:

    LINK t/helper/test-fake-ssh
    LINK t/helper/test-line-buffer
    LINK t/helper/test-svn-fe
ld: warning: directory not found for option '-L/usr/local//usr/local/lib'
ld: warning: directory not found for option '-L/usr/local//usr/local/lib'
ld: warning: directory not found for option '-L/usr/local//usr/local/lib'
ld: warning: directory not found for option '-L/usr/local//usr/local/lib'
When I try to use --with-libdir=/usr/local/lib, I get:
    configure: WARNING: unrecognized options: --with-libdir
Jeff
Message 1 of 1 in “Unusual library path on OS X”
  1. Jeffrey WaltonDec 31, 2018

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.