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

Upgrade to macOS Mojave 10.14 caused an installation error #21

Closed
ootoovak opened this issue Oct 3, 2018 · 17 comments
Closed

Upgrade to macOS Mojave 10.14 caused an installation error #21

ootoovak opened this issue Oct 3, 2018 · 17 comments

Comments

@ootoovak
Copy link
Contributor

ootoovak commented Oct 3, 2018

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.

@ootoovak ootoovak changed the title Upgrade to Mojave caused issue Upgrade to Mojave caused an installation error Oct 3, 2018
@ootoovak ootoovak changed the title Upgrade to Mojave caused an installation error Upgrade to macOS Mojave 10.14 caused an installation error Oct 3, 2018
@ootoovak
Copy link
Contributor Author

ootoovak commented Oct 4, 2018

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.

@ootoovak
Copy link
Contributor Author

ootoovak commented Oct 4, 2018

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. 🤔

@Rhuagh
Copy link
Collaborator

Rhuagh commented Oct 13, 2018

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

@ootoovak
Copy link
Contributor Author

ootoovak commented Oct 21, 2018

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.

@loothood
Copy link

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.

@loothood
Copy link

Solved:

xcode-select --install
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

@dbousamra
Copy link

dbousamra commented Mar 13, 2019

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

@kahirokunn
Copy link

kahirokunn commented Aug 4, 2019

I got the same error.

@ajmwagar
Copy link

ajmwagar commented Aug 16, 2019

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

@araa47
Copy link

araa47 commented Sep 20, 2019

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

@marcoscaceres
Copy link

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.

@marcoscaceres
Copy link

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.

@marcoscaceres
Copy link

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

@CleanCut
Copy link

CleanCut commented Nov 20, 2019

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?

@ootoovak
Copy link
Contributor Author

ootoovak commented Dec 3, 2019

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.

@tsal
Copy link

tsal commented May 4, 2020

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).

@est31
Copy link
Member

est31 commented May 4, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests