Skip to content
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

Failed to build sqlite3 autoconf dependency on iOS 11, Xcode 9 #19

Open
iNiKe opened this issue Oct 27, 2017 · 5 comments
Open

Failed to build sqlite3 autoconf dependency on iOS 11, Xcode 9 #19

iNiKe opened this issue Oct 27, 2017 · 5 comments

Comments

@iNiKe
Copy link

iNiKe commented Oct 27, 2017

SQLite3-autoconf builds shell utility by default (shell.c -> sqlite3[.exe]).
It uses system() call that was deprecated in iOS 8:
'system' is deprecated: first deprecated in iOS 8.0 - Use posix_spawn APIs instead.

In iOS 11 system() was disabled:
__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable")
__API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
__WATCHOS_PROHIBITED __TVOS_PROHIBITED
int system(const char *) __DARWIN_ALIAS_C(system);
#undef __swift_unavailable_on

sqlite3 configure does not have option to exclude shell utility from makefile
So you need to modify makefile or replace "make clean install" command with targets excluding shell utility.

@iNiKe iNiKe changed the title filed to build sqlite3 autoconf on iOS 11, Xcode 9 Failed to build sqlite3 autoconf dependency on iOS 11, Xcode 9 Oct 27, 2017
@fhhowdy
Copy link

fhhowdy commented Mar 12, 2018

Is there a workaround for this? I have been unsuccessful thus far.

@sera4am
Copy link

sera4am commented Jun 8, 2018

Download Xcode 8.3.3
Rename app name and change build environment use xcode-select when make.

@SonicScholar
Copy link

SonicScholar commented Jul 28, 2018

I've got Xcode 9.3.1.
cloned this repo and ran make

This is the main error I'm getting:

shell.c:4870:9: error: 'system' is unavailable: not available on iOS
    x = system(zCmd);
        ^

@sera4am
Copy link

sera4am commented Jul 29, 2018

matrixugly
I've got Xcode 9.3.1.

Can change build environment to older xcode version. use "xcode-select -s" command

Download Xcode 8.3.3 from apple developer site
https://developer.apple.com/download/more/

Rename download and extracted Xcode.app to Xcode8.3.3.app and drop in Application folder
And terminal "xcode-select -s /Application/Xcode.8.3.3.app" (change build environment)
then make!

--
Dont forget back to currently xcode version environment after build.
"xcode-select -s /Application/Xcode.app"

@SonicScholar
Copy link

Thanks so much for the reply! I will give this a try and let you know how it goes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants