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

build failure: task_info on fedora 25: missing header mach/mach_init.h #19286

Closed
matthiaskrgr opened this issue Nov 19, 2017 · 16 comments
Closed
Labels
A-build Related to or part of the build process P-linux Any Linux OS capable of running Servo

Comments

@matthiaskrgr
Copy link
Contributor

cargo build --release
[...]
error: failed to run custom build command for `task_info v0.0.1 (file:///home/matthias/vcs/github/servo/support/rust-task_info)`
process didn't exit successfully: `/home/matthias/vcs/github/servo/target/release/build/task_info-0c8bff6899d53809/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = Some("clang")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("release")
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-o" "/home/matthias/vcs/github/servo/target/release/build/task_info-b8f61f306ab54aec/out/src/task_info.o" "-c" "src/task_info.c"
cargo:warning=src/task_info.c:10:10: fatal error: 'mach/mach_init.h' file not found
cargo:warning=#include <mach/mach_init.h>
cargo:warning=         ^~~~~~~~~~~~~~~~~~
cargo:warning=1 error generated.
exit code: 1


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



--- stderr
thread 'main' panicked at 'explicit panic', /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.47/src/lib.rs:1210:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

This is fedora 25, I installed all the required dependencies listed in the readme and there seems to be no package providing mach/mach_init.h.

@jdm
Copy link
Member

jdm commented Nov 19, 2017

This is very surprising, since that crate is macOS-only and all uses are gated with appropriate cfg attributes.

@matthiaskrgr
Copy link
Contributor Author

rustc -vV prints this:

rustc 1.23.0-nightly (6160040d8 2017-11-18)
binary: rustc
commit-hash: 6160040d8547222e761ad876cbe3a48c9c90a5bf
commit-date: 2017-11-18
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0

@jdm
Copy link
Member

jdm commented Nov 19, 2017

./mach rustc -vV is more meaningful.

@matthiaskrgr
Copy link
Contributor Author

./mach rustc -vV
rustc 1.23.0-nightly (e21df8020 2017-11-13)
binary: rustc
commit-hash: e21df8020d0d1a37d2856117b1be2f1a91d8bc42
commit-date: 2017-11-13
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0

@jdm
Copy link
Member

jdm commented Nov 19, 2017

https://dxr.mozilla.org/servo/source/components/profile/Cargo.toml#27 is the only place that should be making use of that crate, so I'm not really sure what to suggest!

@jdm
Copy link
Member

jdm commented Nov 19, 2017

Do you have a .servobuild file? If so, are there any changes from the defaults in servobuild.example?

@matthiaskrgr
Copy link
Contributor Author

There is .servobuild.example from the repo but it is unmodified.

@matthiaskrgr
Copy link
Contributor Author

I managed to get around the task_info failure like this

diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml
index 6923b05..220dc93 100644
--- a/components/profile/Cargo.toml
+++ b/components/profile/Cargo.toml
@@ -23,9 +23,6 @@ serde_json = "1.0"
 servo_config = {path = "../config"}
 time = "0.1.12"
 
-[target.'cfg(target_os = "macos")'.dependencies]
-task_info = {path = "../../support/rust-task_info"}
-
 [target.'cfg(target_os = "linux")'.dependencies]
 regex = "0.2"
 

however there still were other crates not building

@emilio
Copy link
Member

emilio commented Nov 30, 2017

That doesn't really make sense, it seems your cargo is trying to build with a "macos" target, otherwise that patch wouldn't have made a difference.

@emilio
Copy link
Member

emilio commented Nov 30, 2017

Which also explains why is it failing to include mach headers, which are OSX only.

@matthiaskrgr
Copy link
Contributor Author

Yes, it seems it detects as macos in that case. I adding some other dependency for macos to some different crate and built that for testing, however the dependency was not pulled in then, so I have no idea what is going on with servo here. :/

@Bravo555
Copy link

Also happens to me on Ubuntu 17.10.

error: failed to run custom build command for `task_info v0.0.1 (file:///home/marcel/Documents/dev/stuff/servo/support/rust-task_info)`
process didn't exit successfully: `/home/marcel/Documents/dev/stuff/servo/target/debug/build/task_info-4fc6f7b6441fb6e7/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("debug")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-o" "/home/marcel/Documents/dev/stuff/servo/target/debug/build/task_info-5b509507e8510095/out/src/task_info.o" "-c" "src/task_info.c"
cargo:warning=src/task_info.c:10:10: fatal error: mach/mach_init.h: No such file or directory
cargo:warning= #include <mach/mach_init.h>
cargo:warning=          ^~~~~~~~~~~~~~~~~~
cargo:warning=compilation terminated.
exit code: 1


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



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

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

error: build failed
$ ./mach rustc -vV
rustc 1.23.0-nightly (e21df8020 2017-11-13)
binary: rustc
commit-hash: e21df8020d0d1a37d2856117b1be2f1a91d8bc42
commit-date: 2017-11-13
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0

@jdm jdm added A-build Related to or part of the build process P-linux Any Linux OS capable of running Servo labels Dec 19, 2017
@Xanewok
Copy link
Contributor

Xanewok commented Dec 19, 2017

Can confirm @Bravo555's case, also happens on Ubuntu 17.10.

EDIT: Silly me. I actually tried running cargo build, because I forgot about mach. As I can see @matthiaskrgr also ran cargo build --release, which might explain why it fails. Retrying with ./mach build --dev.

@jdm
Copy link
Member

jdm commented Dec 19, 2017

Oh, that is fascinating!

@matthiaskrgr
Copy link
Contributor Author

Hm, for the record, I get task_info failures with both
cargo build and cargo build --release

./mach build --release and ./mach build --dev
both fail when building osmesa-src.

@jdm
Copy link
Member

jdm commented Dec 20, 2017

cargo build is not a supported build configuration. Please file a separate issue about the osmesa-src error that you see!

@jdm jdm closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Related to or part of the build process P-linux Any Linux OS capable of running Servo
Projects
None yet
Development

No branches or pull requests

5 participants