libgit2 / objective-git

Objective-C bindings to libgit2
MIT License
1.16k stars 280 forks source link

Failed to build current master branch using Carthage #692

Open mssun opened 5 years ago

mssun commented 5 years ago

Log:

...
Building for x86_64 i386 armv7 armv7s arm64
Building OpenSSL for iphonesimulator12.2 x86_64
Build log can be found in /.../Carthage/Checkouts/objective-git/External/build/log/OpenSSL-x86_64.log
Please stand by...
Building OpenSSL for iphonesimulator12.2 i386
Build log can be found in /.../Carthage/Checkouts/objective-git/External/build/log/OpenSSL-i386.log
Please stand by...
Can't open crypto/ui/ui_openssl.c: No such file or directory.
Command PhaseScriptExecution failed with a nonzero exit code

Should be caused by:

https://github.com/libgit2/objective-git/blob/36681837c5d10e3bdc501e3e9fdec9c1cc05d72a/script/update_libssl_ios#L34

tiennou commented 5 years ago

That's WIP in #688. I'm not doing enough iOS/Swift specific work to be sure I can fix CI, and there's a bunch of things that needs updating (on top of what you've identified in #693, there's Xcode itself, Quick/Nimble, and the xcconfigs).

A.k.a, help would be greatly appreciated.

mssun commented 5 years ago

Wish I can help, the building scripts look a little complex, and I don't know how to get involved actually.

kengruven commented 5 years ago

I'd really like to get this working again. How can I help? Is the iOS build process documented anywhere?

mssun commented 5 years ago

@kengruven , I guess you should start with these scripts: https://github.com/libgit2/objective-git/tree/master/script

kengruven commented 5 years ago

@mssun, yes, those are the scripts I'm trying to find documentation for. The comments there, when they exist (# LOL Cmake), aren't terribly helpful in enabling me to understand why it's doing what it's doing, or what might be going wrong.

mssun commented 4 years ago

Hi @kengruven, any progress can be shared? Let's fix this.

tiennou commented 4 years ago

What do you mean by not terribly helpful 😁 ? The build system is managed by Travis, see .travis.yml.

I don't remember what causes what to be called, apart from what .travis.yml says. YMMV.

kengruven commented 4 years ago

Hi @mssun. Sorry, I don't have anything to show for this.

Could it be as simple as updating the "static volatile sig_atomic_t intr_signal" Perl call? That line no longer exists in the submodule version of openssl that is used here.

(Aside: the scripts folder here use Perl, Bash, and Ruby!)

mssun commented 4 years ago

Hi, I tried to build the master branch with Carthage again. I don't know why, It seems that the current master works. Probably, this is related with the version of OS or Xcode?

Changes:

This is the log:

kengruven commented 4 years ago

I tried again with my application against libgit2/objective-git master (with Xcode 10.3), and it builds without error here, too. What gives?

It's true crypto/ui/ui_openssl.c exists (and seems to have existed for a long time), but sig_atomic_t doesn't exist on iOS, does it? Does that file not get compiled?

I think the correct fix would be to not use perl to muck up the source code. That's fragile and will break if that C file gets moved or restructured (as it has at least once since that objective-git script was written).

I suggest:

mssun commented 4 years ago

I have my own fork (https://github.com/libgit2/objective-git/compare/master...mssun:master), which has changed a lot. I abandon current openssl script but using openssl-apple.

kengruven commented 4 years ago

I'm using master master, and it still built without error.

marcuswestin commented 4 years ago

See #699 for related issues and eventual solution.