On 2017/03/30 06:38, Sebastien Marie wrote:
> Hi,
> 
> naddy@ reported to me that lang/rust build has failed. The error was
> related to rustdoc hack which wasn't enough to have documentation (the
> problem is related to not determinist order of build).
> 
> I patched rustbuild (the build tool for rustc) to ensure that
> documentation requires rustdoc as dependency.
> 
> The following diff changes the dependency of src/doc which is on stage0
> (the bootstrap) to stage2 (the final executable).
> 
> I tested it on amd64. By requesting building only documentation (edd@:
> so it is possible with "src/doc" as argument of rustbuild), I was able
> to reliably trigger the problem. After the diff, building the
> documentation requires to first build rustc and rustdoc.
> 
> Bumping REVISION shouldn't be strictly needed: the diff changes only the
> build order of targets: or the order was right and package was built, or
> the order was wrong and package wasn't built. There is no binary changes
> expected. But it doesn't hurt to do it.

I ran into this too - OK with me, though I'd prefer to skip the REVISION
bump in this case.

> The default build order is not determinist. It explains why I missed it
> on testing. Sorry about that.

No worries..there are lots of non-deterministic builds in ports (e.g.
500+ ports using ninja..), it usually takes quite a few builds to spot
problems (and it often shows up differently depending on the number of
cores used for the build). Thanks for tracking down + fixing!

> Thanks.
> -- 
> Sebastien Marie
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/rust/Makefile,v
> retrieving revision 1.40
> diff -u -p -r1.40 Makefile
> --- Makefile  27 Mar 2017 23:43:07 -0000      1.40
> +++ Makefile  30 Mar 2017 04:25:59 -0000
> @@ -8,6 +8,7 @@ COMMENT-doc =         html documentation for ru
>  
>  V =                  1.16.0
>  DISTNAME =           rustc-${V}-src
> +REVISION =           0
>  
>  # rustc bootstrap version
>  RBV-amd64 =          1.16.0-20160315
> Index: patches/patch-src_bootstrap_step_rs
> ===================================================================
> RCS file: patches/patch-src_bootstrap_step_rs
> diff -N patches/patch-src_bootstrap_step_rs
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_bootstrap_step_rs       30 Mar 2017 04:25:59 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +Require having building rustdoc before trying to build docs.
> +--- src/bootstrap/step.rs.orig       Wed Mar 29 18:57:20 2017
> ++++ src/bootstrap/step.rs    Wed Mar 29 18:57:35 2017
> +@@ -542,7 +542,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
> +              s.name("rustc")
> +               .host(&build.config.build)
> +               .target(&build.config.build)
> +-              .stage(0)
> ++              .stage(2)
> +          })
> +          .default(build.config.docs)
> +          .run(move |s| doc::standalone(build, s.target));
> 

Reply via email to