Skip to content

Ios-deploy install fails  #308

Closed
Closed

Description

@RobertArissen

Hello,

Expected behavior

Install ios-deploy global via NPM

Actual behavior.

Ios-deploy not installed and get the error:

Ld build/Release/ios-deploy normal x86_64
cd /usr/local/lib/node_modules/ios-deploy
export MACOSX_DEPLOYMENT_TARGET=10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/usr/local/lib/node_modules/ios-deploy/build/Release -F/usr/local/lib/node_modules/ios-deploy/build/Release -filelist /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.LinkFileList -mmacosx-version-min=10.8 -Xlinker -object_path_lto -Xlinker /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy_lto.o -fobjc-arc -fobjc-link-runtime -framework MobileDevice -F/System/Library/PrivateFrameworks -framework Foundation -framework CoreFoundation -Xlinker -dependency_info -Xlinker /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy_dependency_info.dat -o /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
ld: framework not found MobileDevice
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld build/Release/ios-deploy normal x86_64
(1 failure)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! [email protected] preinstall: ./src/scripts/check_reqs.js && xcodebuild
npm ERR! Exit status 65
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to reproduce the problem

I only run the command: npm install -g ios-deploy

System Specs

  • 1. system_profiler SPSoftwareDataType
    System Software Overview:
    System Version: macOS 10.12.6 (16G29)
    Kernel Version: Darwin 16.7.0
    Boot Volume: Macintosh HD
    Boot Mode: Normal
    Secure Virtual Memory: Enabled
    System Integrity Protection: Enabled
    Time since boot: 2:52

  • 2. ios-deploy -V

  • 3. xcodebuild -version
    Xcode 9.0
    Build version 9M202q

  • 4. xcode-select --print-path
    /Applications/Xcode.app/Contents/Developer

  • 5. gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 9.0.0 (clang-900.0.34.1)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

  • 6. lldb --version
    lldb-900.0.41
    Swift-4.0

Activity

  1. shazron commented on Aug 11, 2017

    @shazron

    Hello, when you filed a new issue, you deleted the template of requirements needed for filing a bug report. Please do that, there is not enough information. Without it, this issue will be closed.

  2. RobertArissen commented on Aug 11, 2017

    @RobertArissen
    Author

    Updated

  3. shazron commented on Aug 11, 2017

    @shazron

    This is the root of the problem:
    ld: framework not found MobileDevice and you are using Xcode 9. It may be missing in Xcode 9. I will investigate later.

  4. changed the title [-]Ios-depoly install fails [/-] [+]Ios-deploy install fails [/+] on Aug 11, 2017
  5. added this to the 1.9.2 milestone on Aug 11, 2017
  6. DomT4 commented on Aug 15, 2017

    @DomT4

    It seems to have vanished from Xcode 9, but curiously is in the Command-Line Tools package Apple also distributes and after installing that it becomes available at the usual:

    /System/Library/PrivateFrameworks/MobileDevice.framework/MobileDevice
    

    Build still fails though.

  7. shazron commented on Aug 15, 2017

    @shazron

    It's probably looking for it at:
    $XCODE/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks/MobileDevice.framework/

    where $XCODE is:
    xcode-select -p

  8. DomT4 commented on Aug 15, 2017

    @DomT4

    where $XCODE is: xcode-select -p

    Yeah, this is enforced. If you flip it back to the CLT using sudo xcode-select --reset the build aborts & tells you your active developer path needs to be an Xcode instance.

    This smells like an Xcode bug to me, I can't imagine why this behaviour would be intentional. If you create any small valid test.c file & then do:

    ~> clang -Wall -framework MobileDevice -F/System/Library/PrivateFrameworks test.c
    

    It fails with the now rather familiar:

     "/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.13.0 -syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o a.out -framework MobileDevice /var/folders/qs/rg1v7kz56wv3v9z4qwgtv3g80000gn/T/test-cfda58.o -L/usr/local/lib -lSystem /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a -F/System/Library/PrivateFrameworks
    ld: framework not found MobileDevice
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    But if you explicitly use the clang inside the CLT it works fine:

    ~> /Library/Developer/CommandLineTools/usr/bin/clang -Wall -framework MobileDevice -F/System/Library/PrivateFrameworks test.c
    
    ~> file a.out
    a.out: Mach-O 64-bit executable x86_64
    
    ~> otool -L a.out
    a.out:
    	/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (compatibility version 1.0.0, current version 1.0.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
    
    ~> ./a.out
    testSUCCESS
    
  9. shazron commented on Aug 24, 2017

    @shazron

    Similar report in #311

  10. DomT4 commented on Aug 24, 2017

    @DomT4

    Apple is aware of the issue. Last update was 3 days ago, an acknowledgement that they are looking into it with the information provided.

  11. DomT4 commented on Aug 25, 2017

    @DomT4

    Apparently if some PrivateFramework linking remains broken through to GM we're stuck with it.

    Apple took 10+ days to decide they had no interest in fixing the bug. So ios-deploy might continue to have issues with Xcode 9+ unless the Xcode clang is accidentally fixed or a workaround is found here.

    screen shot 2017-08-25 at 18 55 05

    I can link to other private frameworks just fine, so, I'm hoping they accidentally fix linking this specific one.

  12. antonioribeiro commented on Aug 29, 2017

    @antonioribeiro

    Trying to fix

    image

    For which updating header paths was not helping, I decided to install ios-deploy and now I'm getting the very same error and cordova build also gives me a

    Error: ios-deploy was not found. Please download, build and install version 1.9.0 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'
    

    Thank you, Apple.

  13. DomT4 commented on Sep 15, 2017

    @DomT4

    Intentionally or not, this is apparently fixed in the Xcode GM. clang -Wall -framework MobileDevice -F/System/Library/PrivateFrameworks test.c now delivers success & the expected linkage.

  14. shazron commented on Sep 15, 2017

    @shazron

    That's great. We'll wait and see if it's permanent, the workaround should still work for now

  15. tommybananas commented on Oct 24, 2017

    @tommybananas

    @shazron what is the workaround?

  16. shazron commented on Oct 30, 2017

    @shazron
  17. bjanuario commented on Nov 27, 2017

    @bjanuario

    If you are under Sierra you need to add the flag --unsafe-perm=true
    sudo npm install -g ios-deploy --unsafe-perm=true

  18. tresdev commented on Jan 22, 2018

    @tresdev

    @bjanuario this fixed the issue for me

  19. pyqui commented on Mar 25, 2018

    @pyqui

    @bjanuario Oh yeah!!! It works!

  20. himalayaahuja commented on Apr 17, 2018

    @himalayaahuja

    @bjanuario It installs the package successfully yes, but again when I create a cordova ios build it throws the same error , saying ---------------
    Unhandled promise rejection (rejection id: 1): ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'

  21. pabloca88 commented on May 11, 2018

    @pabloca88

    @bjanuario solved my issue.. great Job!

  22. mshyrokiy commented on Jul 17, 2018

    @mshyrokiy

    "sudo npm install -g ios-deploy --unsafe-perm=true" doesn't work for me
    macOS 10.13.6
    xcode Version 10.0 beta 3 (10L201y)

    Is there any other way to get "ios-deploy" installed?

  23. sgalvagno commented on Dec 27, 2018

    @sgalvagno

    @mshyrokiy
    brew install ios-deploy

  24. ziwei3749 commented on Jul 24, 2019

    @ziwei3749

    @sgalvagno this way make it work,thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions