# Make fails at recipe julia-sysimg-release, no clue why

**URL:** <https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950>\
**Category:** Internals & Design\
**Tags:** build, compilation\
**Created:** [May 17, 2018, 9:15am UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950 "2018-05-17T09:15:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [May 17, 2018, 9:15am UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/1 "2018-05-17T09:15:33Z")

</div>

I edited some docs locally and ran `make docs` as suggested by [Contributing.md](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation). It ran for several minutes, and errored out with this:

```julia
    JULIA usr/lib/julia/sys-o.a
coreio.jl
exports.jl
essentials.jl
ctypes.jl
gcutils.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
pair.jl
traits.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refvalue.jl
refpointer.jl
checked.jl
indices.jl
array.jl
abstractarray.jl
subarray.jl
views.jl
reinterpretarray.jl
abstractdict.jl
iterators.jl
namedtuple.jl
hashing.jl
rounding.jl
float.jl
twiceprecision.jl
complex.jl
rational.jl
multinverses.jl
abstractarraymath.jl
arraymath.jl
simdloop.jl
reduce.jl
reshapedarray.jl
bitarray.jl
bitset.jl
some.jl
dict.jl
abstractset.jl
set.jl
char.jl
strings/basic.jl
strings/string.jl
build_h.jl
version_git.jl
osutils.jl
c.jl
io.jl
iostream.jl
iobuffer.jl
intfuncs.jl
strings/strings.jl
strings/substring.jl
strings/search.jl
strings/unicode.jl
strings/util.jl
strings/io.jl
parse.jl
shell.jl
regex.jl
pcre.jl
error during bootstrap:

rec_backtrace at ~/myrepos/julia/src/stackwalk.c:94
record_backtrace at ~/myrepos/julia/src/task.c:246
jl_throw at ~/myrepos/julia/src/task.c:577
jl_errorf at ~/myrepos/julia/src/rtutils.c:77
jl_toplevel_eval_flex at ~/myrepos/julia/src/toplevel.c:812
jl_parse_eval_all at ~/myrepos/julia/src/ast.c:852
jl_load at ~/myrepos/julia/src/toplevel.c:894
include at ./boot.jl:314 [inlined]
_include1 at ./sysimg.jl:49
include at ./sysimg.jl:36
jl_apply_generic at ~/myrepos/julia/src/gf.c:2140
do_call at ~/myrepos/julia/src/interpreter.c:324
eval_value at ~/myrepos/julia/src/interpreter.c:416
eval_stmt_value at ~/myrepos/julia/src/interpreter.c:367 [inlined]
eval_body at ~/myrepos/julia/src/interpreter.c:681
jl_interpret_toplevel_thunk_callback at ~/myrepos/julia/src/interpreter.c:798
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7fb5a32c5e0f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at ~/myrepos/julia/src/interpreter.c:807
jl_toplevel_eval_flex at ~/myrepos/julia/src/toplevel.c:856
jl_eval_module_expr at ~/myrepos/julia/src/toplevel.c:233
jl_toplevel_eval_flex at ~/myrepos/julia/src/toplevel.c:652
jl_parse_eval_all at ~/myrepos/julia/src/ast.c:852
jl_load at ~/myrepos/julia/src/toplevel.c:894
exec_program at ~/myrepos/julia/ui/repl.c:36
true_main at ~/myrepos/julia/ui/repl.c:121
main at ~/myrepos/julia/ui/repl.c:240
__libc_start_main at /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291
_start at ~/myrepos/julia/usr/bin/julia (unknown line)

***This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`.***
Makefile:203: recipe for target '~/myrepos/julia/usr/lib/julia/sys-o.a' failed
make[1]: *** [~/myrepos/julia/usr/lib/julia/sys-o.a] Error 1
Makefile:78: recipe for target 'julia-sysimg-release' failed
make: *** [julia-sysimg-release] Error 2

```

I have tried running `make clean` and then tried `make cleanall` too, and repeated the `make docs` attempt - it still fails the same way.

Does anyone have a clue what’s going on here and how I can fix it?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 17, 2018, 10:27am UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/2 "2018-05-17T10:27:42Z")

</div>

Does `make` on its own succeed, probably not, since `make docs` does something like `make && make -C doc`, and this failure seem to be before we try to make the actual docs.

Edit: Is this [https://github.com/JuliaLang/julia/pull/27134](https://github.com/JuliaLang/julia/pull/27134)? If so I think the problem is that you need to escape the backslashes in the docstrings, like Kristoffer pointed out in the PR.

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [May 17, 2018, 11:08am UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/3 "2018-05-17T11:08:02Z")

</div>

Thanks @fredrikekre. That was the issue, and now the build works (except for some doc reference errors from my changes, to be fixed).

I originally made the dumb assumption that bad doc strings would only cause bad HTML output, not build failures, and so assumed my build was failing for some other reason. Lesson learnt there. Thank you.

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [May 17, 2018, 12:36pm UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/4 "2018-05-17T12:36:09Z")

</div>

I’m stuck on the doc reference problem: I get a Documenter error during building cross-references

```
 !! No doc found for reference '[`SubstitutionString`](@ref)'. [src/base/strings.md]

```

(I can take this to a different forum thread if that would be better, just didn’t want to be creating threads all over the place.)

I tried changing [the reference in replace’s doc](https://github.com/JuliaLang/julia/pull/27134/files#diff-bac97f5afb02fd2acffea37bb8d836d4R455) to say

```
[`SubstitutionString`](@ref Base.SubstitutionString)

```

but that just changes the error message to:

```
     !! No doc found for reference '[`Base.SubstitutionString`](@ref)'. [src/base/strings.md]

```

I’ve tried searching around and looking at Documenter’s documentation, but I can’t figure out what I’m getting wrong.

Is it that SubstitutionString has to be exported for Documenter to be able to cross-reference to it? Or is there some other syntax I should be using here?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 17, 2018, 12:46pm UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/5 "2018-05-17T12:46:03Z")

</div>

The problem is that you have not added the docstring you are referencing to a suitable `@docs` block. Documenter can not create a link to it if it is not included in the docs. I suggest you add it somewhere in this file: [https://github.com/JuliaLang/julia/blob/master/doc/src/base/strings.md](https://github.com/JuliaLang/julia/blob/master/doc/src/base/strings.md) where you see fit. (Perhaps just under `@r_str`?)

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [May 17, 2018, 1:56pm UTC](https://discourse.julialang.org/t/make-fails-at-recipe-julia-sysimg-release-no-clue-why/10950/6 "2018-05-17T13:56:13Z")

</div>

Thank you! I’m now getting a better understanding of how the doc generation works. Adding `SubstitutionString` and `@s_str` to strings.md fixed the errors, and the HTML is now properly generated. (The only red line I still get is `!! Skipped doctesting`, but I’m guessing (hoping?) that’s a normal part of the build.)
