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

Compilation doesn't complete in one step. #22922

Closed
robert-snakard opened this issue Feb 21, 2019 · 4 comments
Closed

Compilation doesn't complete in one step. #22922

robert-snakard opened this issue Feb 21, 2019 · 4 comments

Comments

@robert-snakard
Copy link
Contributor

@robert-snakard robert-snakard commented Feb 21, 2019

I am using a clean docker build from janitor.technology to build Servo. Every time I run ./mach build -d servo partially compiles then fails because it Failed to delete invalidated or incompatible incremental compilation session.

user@0f734da98db5:~/servo (master) $ ./mach build -d
   Compiling script_plugins_tests v0.0.1 (file:///home/user/servo/tests/unit/script_plugins)
   Compiling fallible v0.0.1 (file:///home/user/servo/components/fallible)
   Compiling deny_public_fields_tests v0.0.1 (file:///home/user/servo/tests/unit/deny_public_fields)
   Compiling selectors v0.19.0 (file:///home/user/servo/components/selectors)
   Compiling malloc_size_of v0.0.1 (file:///home/user/servo/components/malloc_size_of)
   Compiling servo_url v0.0.1 (file:///home/user/servo/components/url)
   Compiling msg v0.0.1 (file:///home/user/servo/components/msg)
   Compiling range v0.0.1 (file:///home/user/servo/components/range)
   Compiling malloc_size_of_tests v0.0.1 (file:///home/user/servo/tests/unit/malloc_size_of)
   Compiling gfx_traits v0.0.1 (file:///home/user/servo/components/gfx_traits)
   Compiling webvr_traits v0.0.1 (file:///home/user/servo/components/webvr_traits)
   Compiling style_traits v0.0.1 (file:///home/user/servo/components/style_traits)
   Compiling devtools_traits v0.0.1 (file:///home/user/servo/components/devtools_traits)
   Compiling embedder_traits v0.0.1 (file:///home/user/servo/components/embedder_traits)
   Compiling servo_geometry v0.0.1 (file:///home/user/servo/components/geometry)
   Compiling devtools v0.0.1 (file:///home/user/servo/components/devtools)
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/embedder_traits-95ml2abk66ss/s-f9pg05lprv-ztrahh-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `embedder_traits`.
warning: build failed, waiting for other jobs to finish...
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/devtools-s3ewsqujxahk/s-f9pg06nle5-tw3svh-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `devtools`.

To learn more, run the command again with --verbose.
[Warning] Could not generate notification! Optional Python module 'dbus' is not installed.
Build FAILED in 0:01:34
user@0f734da98db5:~/servo (master) $ ./mach build -d
   Compiling embedder_traits v0.0.1 (file:///home/user/servo/components/embedder_traits)
   Compiling devtools v0.0.1 (file:///home/user/servo/components/devtools)
   Compiling servo_config v0.0.1 (file:///home/user/servo/components/config)
   Compiling bluetooth_traits v0.0.1 (file:///home/user/servo/components/bluetooth_traits)
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/servo_config-1dx0tdx4dsp0c/s-f9pgauehg2-ncma1n-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `servo_config`.

To learn more, run the command again with --verbose.
Build FAILED in 0:00:15
user@0f734da98db5:~/servo (master) $ ./mach build -d
   Compiling servo_config v0.0.1 (file:///home/user/servo/components/config)
   Compiling canvas_traits v0.0.1 (file:///home/user/servo/components/canvas_traits)
   Compiling net_traits v0.0.1 (file:///home/user/servo/components/net_traits)
   Compiling profile_traits v0.0.1 (file:///home/user/servo/components/profile_traits)
   Compiling style v0.0.1 (file:///home/user/servo/components/style)
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/profile_traits-349a33pglh3w5/s-f9pgchyp9z-1ofdft9-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `profile_traits`.
warning: build failed, waiting for other jobs to finish...
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/canvas_traits-3l1az37ryzytx/s-f9pgchyrr2-1xmt4lq-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `canvas_traits`.
warning: build failed, waiting for other jobs to finish...
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/net_traits-buxjvcj4rpji/s-f9pgchyux7-1oot581-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `net_traits`.
warning: build failed, waiting for other jobs to finish...
2error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/user/servo/target/debug/incremental/style-2476then2zhkr/s-f9pgci39zv-1h3u3hu-working/dep-graph.bin`: No such file or directory (os error 2).

error: aborting due to previous error

error: Could not compile `style`.

To learn more, run the command again with --verbose.
[Warning] Could not generate notification! Optional Python module 'dbus' is not installed.
Build FAILED in 0:02:32
@robert-snakard
Copy link
Contributor Author

@robert-snakard robert-snakard commented Feb 21, 2019

After running this command multiple times it appears that mach tries to build these different components in parallel and only the first couple are able to complete.

See loading bar for try #5

    Building [=====================================================> ] 437/447:...

and loading bar for try #7

    Building [=====================================================> ] 441/447:...
@robert-snakard
Copy link
Contributor Author

@robert-snakard robert-snakard commented Feb 21, 2019

Finally finished build after 11 calls to ./mach build -d

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Feb 21, 2019

This looks like maybe a Cargo bug? Possible work-arounds to try:

  • Disable or reduce parallelism: ./mach build -d -j4 (is it a many-cores machine?), ./mach build -d -j1
  • Disable incremental compilation: CARGO_INCREMENTAL=0 environment variable or copy the servobuild.example file to .servobuild and uncomment the incremental = false line.
@robert-snakard
Copy link
Contributor Author

@robert-snakard robert-snakard commented Feb 24, 2019

disabling parallelism fixed the issue. Thanks Simon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.