Re: compile git

"Xi Ruoyao" ([email protected] via lfs-support Mailing List) <[email protected]> Mon, 29 Sep 2025 09:32:40 +0800
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>
On Sun, 2025-09-28 at 17:30 +0200, Thomas Seeling wrote:
> Hello dear list,
> 
> I had problems installing and using git, and I noticed it will be 
> compiled twice following the book.
> 
> "make" compiles for the first time; then during "make install" it 
> notices the "make" parameters have changed (caused by the override 
> command "perllibdir=..." and it compiles again - unnecessarily so. A 
> possible remedy would be to give the "perllibdir=..." argument to the 
> first "make" invocation as well.
> 
> When doing the actual "make install" it will use the home directory of
> the user as installation prefix, i.e. after "make install" I had new 
> directories "/root/bin", "/root/share" and "/root/libexec". This is 
> caused by a default setting of "prefix = $(HOME)" in the Makefile.
> This 
> is not overridden by using "./configure --prefix=/usr". The "make 
> install" invocation explicitly needs an additional override of 
> "prefix=/usr" to successfully inject this into the Makefile. 
> Alternatively after running "configure" we could change that line in
> the 
> Makefile with e.g. a "sed" command.

Your statement is incorrect.  Makefile has (at line 1469):

-include config.mak.autogen

and configure will create config.mak.autogen, which contains:

prefix = /usr

etc.  And because line 1469 is far after the prefix = $(HOME) lines you
quoted, the settings in config.mak.autogen overrides the defaults.

Please recheck if your configure command has succeeded (and if you've
even run it at the first place).

> Moreover git complains about certificates, and a solution to that
> would 
> be setting the CA definition with a git command.
> 
> git config --global http.sslcainfo=/etc/pki/tls/certs/ca-bundle.crt

It does not make sense.  Git uses cURL and we configure cURL with --
with-openssl --with-ca-path=/etc/ssl/certs, thus it should be able to
find CA in /etc/ssl/certs.  If you must use GnuTLS instead for cURL
because of whatever reason you need to change the --with-ca-path option,
as the book already notices:

--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt: Use this switch
instead of --with-ca-path if building with GnuTLS support instead of
OpenSSL for SSL/TLS.

-- 
Xi Ruoyao <[email protected]>

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page