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

Building on Mac OS #10

Open
ocschwar opened this issue Apr 3, 2017 · 5 comments
Open

Building on Mac OS #10

ocschwar opened this issue Apr 3, 2017 · 5 comments

Comments

@ocschwar
Copy link

ocschwar commented Apr 3, 2017

"cargo install alert-after" fails as follows right now:

= note: Undefined symbols for architecture x86_64: "_LSCopyApplicationURLsForBundleIdentifier", referenced from: _setApplication in libmac_notification_sys-29e1c5fea20af7d3.rlib(notify.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

@frewsxcv
Copy link
Owner

frewsxcv commented Apr 3, 2017

What version of macOS are you running?

@ocschwar
Copy link
Author

ocschwar commented Apr 3, 2017

Yosemite 10.10.5. Just ran rustup and tried again. Same error.

@frewsxcv
Copy link
Owner

frewsxcv commented Apr 3, 2017

This doesn't resolve this issue, but for posterity, here's a similar issue:

bazelbuild/bazel#1875

@zanedev
Copy link

zanedev commented Apr 27, 2017

failing on macos sierra for me doesnt look like same error, new to rust and cargo here so not sure how to troubleshoot it.

cargo install alert-after Updating registryhttps://github.com/rust-lang/crates.io-index`
Installing alert-after v1.4.1
Compiling libc v0.2.22
Compiling block v0.1.6
Compiling num-traits v0.1.37
Compiling gcc v0.3.45
Compiling time v0.1.37
Compiling malloc_buf v0.0.6
Compiling num-integer v0.1.34
Compiling objc v0.2.2
Compiling num-iter v0.1.33
Compiling objc_id v0.1.0
Compiling num v0.1.37
Compiling objc-foundation v0.1.1
Compiling chrono v0.3.0
Compiling mac-notification-sys v0.1.2
error: failed to run custom build command for mac-notification-sys v0.1.2
process didn't exit successfully: /var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-96773afb4b49e9e7/build-script-build (exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("release")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-fmodules" "-o" "/var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-69e567e5a4462529/out/objc/notify.o" "-c" "objc/notify.m"
ExitStatus(ExitStatus(0))
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
AR_x86_64-apple-darwin = None
AR_x86_64_apple_darwin = None
HOST_AR = None
AR = None
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
running: "ar" "crs" "/var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-69e567e5a4462529/out/libnotify.a" "/var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-69e567e5a4462529/out/objc/notify.o"
cargo:warning=/opt/local/bin/ranlib: object: /var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-69e567e5a4462529/out/libnotify.a(notify.o) malformed object (unknown load command 4)
cargo:warning=ar: internal ranlib command failed
ExitStatus(ExitStatus(256))

command did not execute successfully, got: exit code: 1

--- stderr
thread 'main' panicked at 'explicit panic', /Users/zanedev/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:1152
note: Run with RUST_BACKTRACE=1 for a backtrace.
`

@frewsxcv
Copy link
Owner

frewsxcv commented May 7, 2017

The original issue here by @ocschwar is pretty straightforward to understand: using a version of macOS that doesn't support the APIs we rely on. This could either be addressed by attempting to make the mac-notification-sys crate more backwards compatible, or just indicating in the alert-after documentation that we only support version 10.11 and above.

Regarding @zanedev's issue, I'm not sure at all what's going on there.

cargo:warning=/opt/local/bin/ranlib: object: /var/folders/vt/8fqn0xmn4cjd99v95sgzh98m0000gn/T/cargo-install.3T4mP25j5Sic/release/build/mac-notification-sys-69e567e5a4462529/out/libnotify.a(notify.o) malformed object (unknown load command 4)

This in particular is very weird. No idea :-/

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

3 participants