New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up Makefile for rebuilding dependencies #486
Conversation
This has angered openssl, which, last I checked, is not compatible with parallel builds (in exactly what ways, I do not know! but this is very on brand for openssl):
|
Yeah I noticed that I didn’t like that, that’s why I pulled out the configure step and forced it to be serial. Let me look into it more and see if I can reproduce |
Hmm I tried it a couple dozen times and could not reproduce. I wonder if you might have some cruft from a previous build attempt lying around? Can you try running |
Still fails. Here's my log: https://gist.github.com/gnachman/bea5d119916e1bc240479cfc27155a03 Skipping the ARM build seems to fix the problem. I guess it's leaving some crap behind that breaks the x86 build. |
Hmm, I'm a bit confused by your log. When you run |
Makefile
Outdated
make libgit2 | ||
|
||
PATH=/usr/local/bin:${PATH} cd submodules/libgit2/build && ${CMAKE} -DBUILD_SHARED_LIBS=OFF -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" -DCMAKE_INSTALL_PREFIX=../../../ThirdParty/libgit2 .. | ||
PATH=/usr/local/bin:${PATH} cd submodules/libgit2/build && ${CMAKE} --build . --target install --parallel "$(sysctl -n hw.ncpu)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs double dollar signs $$(sysctl -n hw.ncpu)
or else make evaluates it to empty string.
This is failing because libgit2 doesn't find the right libssh library (the fat one). I spent some time trying to persuade it to use mine, going so far as to create a fake .pc file, but it appears to be an unwinnable war. I think libssh2 (and libssl and libcrypto at least) need to go through proper install procedures in a clean sandbox so it won't accidentally pick up homebrew stuff. I build the Python runtime this way, using a .sb file of:
I think you'll probably need to also deny /opt/homebrew and use |
To be entirely honest my personal copy builds with |
8bad38a
to
89fe56f
Compare
@gnachman pulled the latest changes. I think your Makefile had a couple of new mistakes (for example armlibssh2 builds for x86_64) and it didn't seem necessary anyways so I mostly just grabbed your -ld64 updates. While this warns in Xcode because they renamed it to -ld_classic I think we can deal with that later. |
@saagarjha Thanks for pointing that out. I've fixed the architecture issue and switch to the new linker flag. LMK if you find any other issues. |
This also allows the build to run in parallel.
Rebased your latest changes. Anything else I need to do for this PR? |
Thank you. Merged as 9b37706 |
This also allows the build to run in parallel.