Git 2.4.8从kernel.org源和缺少HTTP / HTTPS帮助构建 [英] Git 2.4.8 built from kernel.org sources and missing HTTP/HTTPS helpers
问题描述
这与 git clone:fatal:无法找到https的远程帮助类似。这与其他类似的问题有点不同。另一个类似的问题是在Ubuntu上,并有一个包管理器提供最新的组件。
This is similar to git clone: fatal: Unable to find remote helper for 'https'. This is a little different than other similar questions. The other similar question was on Ubuntu and had a package manager that provided up to date componentes.
这个设置基本上是一个废弃的操作系统。没有现有的Git,并且没有软件包管理器(例如Yum,Apt-Get,Homebrew或Macports)。一切Git和cURL需求都是从头开始构建的,并安装在 / usr / local
中,它包括:
This setup is basically an abandoned OS. There is no existing Git, and there are no package managers available (like Yum, Apt-Get, Homebrew or Macports). Everything Git and cURL needs was built from scratch and installed in /usr/local
, and it includes:
- libz(Zlib库)
- libssl和libcrypto(OpenSSL库)
- libidn(IDN库)
- libiconv(iConvert library)
- libpcre(PERL RE library)
- libcurl(cURL library)
- libz (Zlib library)
- libssl and libcrypto (OpenSSL libraries)
- libidn (IDN library)
- libiconv (iConvert library)
- libpcre (PERL RE library)
- libcurl (cURL library)
我使用下面的食谱来cURL。 cURL同时支持HTTP和HTTPS。 cURL配置,构建,测试和安装都很好。
I'm using the recipe below for cURL. cURL has both HTTP and HTTPS support. cURL configures, builds, tests and installs fine.
我使用下面的配方Git。 Git配置和构建良好。根据 configure --help
我只需要调用cURL来获得HTTP和HTTPS支持:
I'm using the following recipe for Git. Git configures and builds fine. According to configure --help
I only need to call out cURL to get HTTP and HTTPS support:
$ ./configure --help | egrep -i "(http|openssl)"
--with-openssl use OpenSSL library (default is YES)
ARG can be prefix for openssl library and headers
--with-curl support http(s):// transports (default is YES)
但是,当尝试通过HTTP和HTTPS执行克隆时,Git失败。
However, Git fails when attempting to perform a clone over both HTTP and HTTPS. I've built from scratch twice, so whatever I am doing wrong, I've done it twice now.
为什么Git无法构建所需的辅助函数?
Why is Git failing to build the helpers it needs?
Git食谱
Git Recipe
curl -k https://www.kernel.org/pub/software/scm/git/git-2.4.8.tar.gz -o git-2.4.8.tar.gz
tar zf git-2.4.8.tar.gz
cd git-2.4.8
make configure
sed -i "" 's|-lcrypto|/usr/local/lib/libcrypto.a|g' configure.ac configure Makefile
sed -i "" 's|-lssl|/usr/local/lib/libssl.a|g' configure.ac configure Makefile
sed -i "" 's|-lcurl|/usr/local/lib/libcurl.a|g' configure.ac configure Makefile
sed -i "" 's|-lpcre|/usr/local/lib/libpcre2-posix.a|g' configure.ac configure Makefile
./configure --with-openssl=/usr/local --with-libpcre=/usr/local --with-curl=/usr/local \
--with-zlib=/usr/local --with-iconv=/usr/local --prefix=/usr/local
cURL食谱 p>
cURL Recipe
curl -k http://curl.haxx.se/download/curl-7.44.0.tar.gz -o curl-7.44.0.tar.gz
tar zf curl-7.44.0.tar.gz
cd curl-7.44.0
sed -i "" 's|-lidn|/usr/local/lib/libidn.a|g' configure.ac configure lib/Makefile.m32 src/Makefile.m32
./configure --enable-optimize --disable-ldap --disable-ldaps --disable-rtsp --disable-dict \
--disable-ntlm-wb --disable-tls-srp --enable-http --enable-file --enable-proxy \
--enable-telnet --enable-tftp --enable-pop3 --enable-imap --enable-ftp --enable-smb \
--enable-smtp --enable-gopher --enable-manual --enable-ipv6 --enable-unix-sockets \
--enable-cookies --without-darwinssl --without-libssh2 --without-winidn --with-gnu-ld \
--with-libidn=/usr/local --with-glib=/usr/local --with-ssl=/usr/local \
--with-ca-path=/usr/share/curl --prefix=/usr/local
sed
在配方中确保我使用静态链接。它需要在OS X,因为苹果总是使用 *。dylibs
如果他们可用(即使有选项如 -Bstatic
)。更糟糕的是,这是一个较旧的PowerMac在PowerPC上运行OS X 10.5。它用于在处理器上测试软件。
The calls to sed
in the recipes ensures I am using static linking. Its needed on OS X, because Apple always uses *.dylibs
if they are available (even with options like -Bstatic
). To make matters a little worse, this is an older PowerMac running OS X 10.5 on a PowerPC. Its used to test software on the processor.
推荐答案
为什么Git无法构建助手需要?
Why is Git failing to build the helpers it needs?
似乎至少有两个问题。首先,Git的配置不报告错误。相反,它默默地吞下他们。
There appears to be at least two problems. First, Git's configure does not report errors. Rather, it silently swallows them. It silently swallowed an error with the PCRE library, too.
其次,cURL架构 -arch ppc
正在更改为 -arch ppc7400
。所以八个左右的依赖库看起来像:
Second, the cURL architecture -arch ppc
is being changes to -arch ppc7400
. So the eight or so dependent libraries look like:
$ file /usr/local/lib/libcrypto.a
/usr/local/lib/libcrypto.a: Mach-O universal binary with 2 architectures
/usr/local/lib/libcrypto.a (for architecture ppc): current ar
archive random library
/usr/local/lib/libcrypto.a (for architecture ppc64): current ar
archive random library
b $ b
但cURL看起来像:
But cURL looks like:
$ file /usr/local/lib/libcurl.a
/usr/local/lib/libcurl.a: Mach-O universal binary with 2 architectures
/usr/local/lib/libcurl.a (for architecture ppc7400): current ar
archive random library
/usr/local/lib/libcurl.a (for architecture ppc64): current ar
archive random library
我验证了它不是我的设置:
I verified its not my setting:
export CFLAGS="-arch ppc"
./configure ...
make
然后:
$ find . -name libcurl.a
./lib/.libs/libcurl.a
$ lipo -info ./lib/.libs/libcurl.a
...
Non-fat file: ./lib/.libs/libcurl.a is architecture: ppc7400
export LDFLAGS = - arch ppc
对此问题没有影响。
有一个相关的跟踪问题原因从 -arch ppc
更改为 -arch ppc7400
?
There's a related, follow up question that is tracking down the behavior at Cause of change from -arch ppc
to -arch ppc7400
?
这篇关于Git 2.4.8从kernel.org源和缺少HTTP / HTTPS帮助构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!