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

Git 2.18: RUNTIME_PREFIX... is it working?

From
Paul Smith <paul@mad-scientist.net>
Date
Jul 4, 2018, 05:12 UTC
Message-ID
<97803ec8dae0a73bae301a37377b7b4a78f77e99.camel@mad-scientist.net>

I was excited to see the RUNTIME_PREFIX for POSIX systems patchset go by earlier this year. Although I didn't see any mention of it being included in the 2.18.0 release notes, it does appear that it was merged in for this release.

Has anyone else tried to get it working? It doesn't appear to be working properly for me so I'm not sure if I'm supposed to be doing something different... I didn't see any documentation on it.

Basically what happens is that I run configure with --prefix=/my/install/path --with-gitconfig=etc/gitconfig --with-gitattributes=etc/gitattributes.

Then I run make with RUNTIME_PREFIX=YesPlease.

When I look in the makefile, I see that the make variable gitexecdir is initially properly set to libexec/git-core which is what I expect.

However, later in the makefile we include the config.mak.autogen file, which was generated from config.mk.in by configure. In the .in file we have this:

 gitexecdir = @libexecdir@/git-core
After configure gets done with it, this becomes:
 gitexecdir = ${prefix}/libexec/git-core

which is a fully-qualified path. This means that exec-cmd.c is compiled with -DGIT_EXEC_PATH="/my/install/path/libexec/git-core" which effectively disables RUNTIME_PREFIX, as the exec-cmd.c:system_prefix() function always returns FALLBACK_RUNTIME_PREFIX since GIT_EXEC_PATH is not a suffix of executable_dirname (once the install location has been moved).

I suppose we need to pass more configure options to reset paths; is
there information somewhere on exactly which ones should be overridden?
 For example if I try to pass configure --libexecdir=libexec to solve
the above issue, I get an error from configure:
 configure: error: expected an absolute directory name for --libexecdir: libexec
Any info on how this is supposed to work, is welcome!
Next: Johannes Schindelin
Message 1 of 24 in “Git 2.18: RUNTIME_PREFIX... is it working?”
  1. Paul SmithJul 4, 2018
  2. Johannes SchindelinJul 4, 2018
  3. Paul SmithJul 5, 2018
  4. Johannes SchindelinJul 6, 2018
  5. Daniel JacquesJul 6, 2018
  6. Paul SmithJul 8, 2018
  7. Johannes SchindelinJul 8, 2018
  8. Jeff KingJul 9, 2018
  9. Johannes SchindelinJul 9, 2018
  10. Jeff KingJul 10, 2018
  11. Johannes SchindelinJul 10, 2018
  12. Daniel JacquesJul 10, 2018
  13. Junio C HamanoJul 10, 2018
  14. Junio C HamanoJul 9, 2018
  15. Jeff KingJul 10, 2018
  16. Perry HutchisonJul 10, 2018
  17. Jeff KingJul 10, 2018
  18. Jonathan NiederJul 10, 2018
  19. Jonathan NiederJul 10, 2018
  20. Johannes SchindelinJul 17, 2018
  21. brian m. carlsonJul 14, 2018
  22. Johannes SchindelinJul 18, 2018
  23. brian m. carlsonJul 19, 2018
  24. Jeff HostetlerJul 20, 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.