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

build
compilation

#1

I edited some docs locally and ran make docs as suggested by Contributing.md. It ran for several minutes, and errored out with this:

    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?


#2

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? If so I think the problem is that you need to escape the backslashes in the docstrings, like Kristoffer pointed out in the PR.


#3

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.


#4

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 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?


#5

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 where you see fit. (Perhaps just under @r_str?)


#6

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.)