Comments (8)
As per f3d8981 onwards this should be in now.
from portacle.
Reopening this because GIT is being absolutely horrendous to ship. When built on certain systems some of its components seem to segfault for no (to me) discernible reason. The failure point is usually git-remote-http, in some libcurl call.
Configurations known to work:
- OS X 10.11, Brew
- Linux Mint 17.1
Configurations known to break:
- Arch Linux
- Windows, MinGWx86_64
from portacle.
The previous breakage is explained by the following fun story:
The thing I was testing was git-remote-http
which apparently segfaulted under strange circumstances. The one difference between the setups that I did not notice was that on Arch the root repository that I ran the git-remote-http
in had an SSH origin. Apparently git-remote-http
does not test whether the origin it gets is even valid for itself, and instead just segfaults if it encounters an URL it does not handle. Since my test machines were set up with an HTTPS clone they worked fine.
Now, on to Windows. Windows has a few more issues, namely every git command crashing if you compile it with NO_GETTEXT
, saying something akin to "your vsnprintf is broken". The only reference to this that I could find is a prior bug in gettext itself that stemmed from a _vsnprintf
and vsnprintf
definition difference in MinGW that was not handled. I assume this special casing has not been backported to Git because there's probably nobody who ever built Git without gettext on Windows. We "solve" this by begrudgingly including gettext anyway.
Now, the next issue is getting Curl/Git to find the ca-certificates.crt
file. No matter whether I place the file as curl-ca-bundle.crt
right next to all the git binaries or set the CURL_CA_BUNDLE
envvar to its location, nothing seems to work properly. strace
ing the execution does not even show an attempt to find that file. I assume Git has the path hardcoded into itself and passes it on to Curl. We can tell Git about the location of the file through the http.sslcainfo
configuration value. However, since we can't use relative paths in that and absolute paths are a no-go due to relocation, we have to do more work. The solution is to introduce a proper unix shell environment (bash.bat
) from which the git commands can bootstrap themselves. This environment sets the portacle root as the filesystem root, thus allowing us to specify an "absolute path" in the git configuration, while the path is actually relative to the entire system.
More fun because that's not directly possible. Git bakes the content of the prefix
envvar into its executable to calculate the system-wide config from, so we have to change our build to use a prefix that is relative to the portacle root.
from portacle.
My brain is collapsing in on itself
from portacle.
We are almost done. The last remaining hurdle was fortunately no longer a matter of recompiling git, but rather an issue in the scripting and wrapping of the binaries that got resolved through some emacs config changes.
See 06e1248
from portacle.
Ayyyy, I really thought I was done there, eh. Well, time to think again, lol.
The ld-linux.so trick doesn't work any longer when another program is execed. The new program will use the system ld-linux, so we need to actually also wrap execve
to inject ld-linux.so again for all future calls. Great!
from portacle.
I got a wrapper that seems to kinda work (ld-wrap.c
), except git doesn't like it for to me unknown reasons. It just fails on things like git fetch and push.
from portacle.
Thanks to LD_PRELOAD
and the exec*
wrappers, this is now dealt with.
from portacle.
Related Issues (20)
- reopen last session HOT 3
- Getting this issue when trying to run code HOT 1
- request: provide homebrew formula HOT 1
- installation on macos involves authorizing every subprogram and dylib HOT 5
- it doesn't work on- Mac OS 11.4(bigSur)... HOT 4
- Can' load osicat on win10 HOT 3
- Add diff program to windows to allow for use of M-x ediff or M-x merge
- git clone ssh:// does not work on windows HOT 4
- Quicklisp can't find binaries(is this the right term?) HOT 3
- Help needed: how to install Quickload-Libraries offline HOT 3
- emacs-nox based Portacle? HOT 1
- Font settings not saving HOT 2
- neotree icons messed up
- Is there a way to set up portacle to switch between SBCL and ECL? HOT 3
- [Windows] Hide startup terminal HOT 6
- Is it possible to run from a docker container?
- noob needs help loading ql
- How to add portacle.desktop to my launcher in Ubuntu
- Error when trying to push a repository to github from Windows (10.0.19045)
- Swank error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portacle.