Skip to content

Upgrade to macOS Mojave 10.14 caused an installation error #21

Closed

Description

@ootoovak

Platform

macOS Mojave 10.14
Rust 1.29

Problem

This is an error when trying to build a GGEZ project, but is during the installation of this package, when running cargo build. The project built fine before the Mojave upgrade, afterward it starting throwing the error:

error: failed to run custom build command for `coreaudio-sys v0.2.2`
process didn't exit successfully: `/<..path_to_project..>/target/debug/build/coreaudio-sys-9f38879f24253caf/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=framework=AudioUnit
cargo:rustc-link-lib=framework=CoreAudio

--- stderr
//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnit.h:12:10: fatal error: 'TargetConditionals.h' file not found
//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnit.h:12:10: fatal error: 'TargetConditionals.h' file not found, err: true
thread 'main' panicked at 'unable to generate bindings: ()', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

Hope this helps. I can try to provide any more info I can if this is not enough.

Activity

  1. changed the title [-]Upgrade to Mojave caused issue[/-] [+]Upgrade to Mojave caused an installation error[/+] on Oct 3, 2018
  2. changed the title [-]Upgrade to Mojave caused an installation error[/-] [+]Upgrade to macOS Mojave 10.14 caused an installation error[/+] on Oct 3, 2018
  3. ootoovak commented on Oct 4, 2018

    @ootoovak
    ContributorAuthor

    I tried this on another machine running macOS Mojave 10.14 and it compiled. So, I'm not sure if it is due to Rust upgrading to 1.29.1 that fixed it of if there is just something weird going on with the set up on my other machine. I'll double check later today and report back.

  4. ootoovak commented on Oct 4, 2018

    @ootoovak
    ContributorAuthor

    Checked on the machine that was originally having problems and even on Rust 1.29.1 I am still getting the above issue. Not sure why one machine is working and the other isn't yet. I've tried to to a complete reinstall of Rust and Cargo and still no luck. 🤔

  5. Rhuagh commented on Oct 13, 2018

    @Rhuagh
    Collaborator

    Try reinstalling xcode? Osx is terrible at removing old stuff.

  6. ootoovak commented on Oct 21, 2018

    @ootoovak
    ContributorAuthor

    What fixed it for me in the end was manually installing the macOS_SDK_headers by opening the .pkg file witch you can open by running the following command in your terminal:

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
    

    Not sure if how often it happens to other users of this library but wanted to report back if anyone else comes across this issue.

  7. loothood commented on Nov 11, 2018

    @loothood

    What fixed it for me in the end was manually installing the macOS_SDK_headers by opening the .pkg file witch you can open by running the following command in your terminal:

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
    

    Not sure if how often it happens to other users of this library but wanted to report back if anyone else comes across this issue.

    faced the same problem. Could you help me please?
    I try:

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
    The file /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg does not exist.
    
  8. loothood commented on Nov 11, 2018

    @loothood

    Solved:

    xcode-select --install
    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
    
  9. dbousamra commented on Mar 13, 2019

    @dbousamra

    I am still receiving this error.

    If I try the suggestion above:

    xcode-select --install
    xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    

    Edit: Fixed! I ran sudo xcode-select -r to reset to the default command line tools path. This solved it

  10. kahirokunn commented on Aug 4, 2019

    @kahirokunn

    I got the same error.

  11. ajmwagar commented on Aug 16, 2019

    @ajmwagar

    Same here.

    Edit: I got it working!

    sudo rm -r $(xcode-select -p)
    xcode-select --install
    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
    cargo build
    
  12. araa47 commented on Sep 20, 2019

    @araa47

    Im running 10.14.6 Mojave, but the above commands did not solve the problem.

  13. marcoscaceres commented on Oct 24, 2019

    @marcoscaceres

    FWIW, I hit this from a different project, but in case it helps anyone else:

    export CPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"
    

    (or track down there "MacOSX10.14.sdk" folder is being placed in the OS)

    Xcode no longer ships with "macOS_SDK_headers_for_macOS_10.14.pkg", so you need to point to it explicitly.

  14. marcoscaceres commented on Oct 28, 2019

    @marcoscaceres

    Actually, I just got confirmation that other folks are also hitting this when trying to build Firefox on Catalina. The fix I suggested above no longer seems to work.

  15. marcoscaceres commented on Oct 28, 2019

    @marcoscaceres

    So xcode trashes the "MacOSX10.14.sdk" directory on update, so it's best to put the directory somewhere else.

    So, solution is to clone:
    https://github.com/phracker/MacOSX-SDKs

    (SDK 10.14 is not in the releases... though check) ... then:

    export CPATH=/path/to/MacOSX-SDKs/MacOSX10.14.sdk/usr/include
    
  16. CleanCut commented on Nov 20, 2019

    @CleanCut

    I was able to fix this issue by upgrading my dependencies so that coreaudio-sys version 0.2.3 was used instead of version 0.2.2. (Specifically, I updated rodio from 0.9.0 to 0.10.0 and then ran cargo update to regenerate Cargo.lock). So maybe this issue has already been fixed?

  17. ootoovak commented on Dec 3, 2019

    @ootoovak
    ContributorAuthor

    Confirmed @CleanCut's fix on Catalina (macOS 10.15). I am currently using quicksilver for which coreaudio-sys is a dependancy and I was having the same issues. After I added the line coreaudio-sys = "^0.2.3" to my Cargo.toml file explicitly the build has worked.

  18. tsal commented on May 4, 2020

    @tsal

    Confirmed @CleanCut fixes this issue on Mojave (macOS 10.14) with the latest XCode (some clang updates broke the linking in 0.2.2, I think).

  19. est31 commented on May 4, 2020

    @est31
    Member

    Closing the issue due to the user reports that 0.2.3 fixes it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions