Frugghi / iSSH2

A bash script to compile Libssh2 (and OpenSSL) for iOS, macOS, watchOS and tvOS.
Other
125 stars 46 forks source link

Libssh2 no longer compiling on latest MacOS 10.14.6 with Xcode 10.3 #9

Closed alexmocanu closed 5 years ago

alexmocanu commented 5 years ago

MacOS 10.14.6 Xcode 10.3 (10G8)

Command used: ./iSSH2.sh --platform=macosx --min-version=10.14

The script automatically downloads openssl-1.1.1c and libssh2 1.9.0 Openssl compiles just fine but libssh2 fails with this error:

Extracting libssh2-1.9.0.tar.gz
Building Libssh2 1.9.0:
Build failed, cleaning up temporary files...

build-libssh2.log contains this:

Configure: WARNING: unrecognized options: --with-openssl
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for sed... /usr/bin/sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking libssh2 version... 1.9.0
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... i386-apple-darwin
Configure: autobuild project... libssh2
Configure: autobuild revision... 1.9.0
Configure: autobuild hostname... AlexsMacMini
Configure: autobuild timestamp... 20190909-112840
checking whether make supports the include directive... yes (GNU style)
checking for i386-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works... no
Configure: error: in `/var/folders/zr/ph6s5xdx0858lcm33599_l980000gn/T/iSSH2/libssh2-1.9.0/MacOSX_10.14-i386/src':
Configure: error: C compiler cannot create executables
See `config.log' for more detai

In config.log it seems to fail here:

clang: error: unsupported option '-V -Wno-atomic-implicit-seq-cst'
clang: error: no input files

clang: error: unknown argument '-qversion', did you mean '--version'?
clang: error: no input files

Here is the complete file: config.log

niklassaers commented 5 years ago

On 10.15, removing i386 from ARCHS made it build fine for macOS using --platform=macosx --min-version=10.15

Jan-E commented 5 years ago

On 10.15.1 with Xcode 11.2 this did not work. I had to add a --archs argument as well: ./iSSH2.sh --platform=macosx --min-version=10.15 --archs=x86_64