# Compiling 1.7.3 on Ubuntu 22.04 stalls

**URL:** <https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070>\
**Category:** General Usage\
**Tags:** build\
**Created:** [July 31, 2022, 5:09pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070 "2022-07-31T17:09:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [July 31, 2022, 5:09pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/1 "2022-07-31T17:09:15Z")

</div>

I have pulled the git repo and I’m trying to compile v1.7.3, but the process stalls here:

```julia
Sysimage built. Summary:
Total ─────── 53.120629 seconds 
Base: ─────── 22.231496 seconds 41.851%
Stdlibs: ──── 30.887624 seconds 58.1462%
    JULIA usr/lib/julia/sys-o.a
Generating REPL precompile statements... 25/36

```

Then nothing happens. Any idea what could be going wrong?

Here’s the trace after ^C:

```julia
Sysimage built. Summary:
Total ─────── 53.058508 seconds 
Base: ─────── 21.864563 seconds 41.2084%
Stdlibs: ──── 31.192213 seconds 58.7883%
    JULIA usr/lib/julia/sys-o.a
Generating REPL precompile statements... 25/36^C
signal (2): Interrupt
in expression starting at none:1
epoll_wait at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
uv__io_poll at /workspace/srcdir/libuv/src/unix/epoll.c:240
uv_run at /workspace/srcdir/libuv/src/unix/core.c:383
jl_task_get_next at /home/dabrowsa/lang/julia/julia/src/partr.c:481
poptask at ./task.jl:827
wait at ./task.jl:836
wait at ./condition.jl:123
#657 at ./stream.jl:1448 [inlined]
lock at ./lock.jl:190
lock at ./condition.jl:78 [inlined]
wait_readnb at ./stream.jl:1446 [inlined]
#666 at ./stream.jl:1489 [inlined]
lock at ./lock.jl:190
lock at ./condition.jl:78 [inlined]
eof at ./stream.jl:1488 [inlined]
iterate at ./io.jl:1056 [inlined]
readuntil_vector! at ./io.jl:873
#readuntil#382 at ./io.jl:904 [inlined]
readuntil##kw at ./io.jl:903 [inlined]
#readuntil#381 at ./io.jl:899
readuntil at ./io.jl:888 [inlined]
#2 at /home/dabrowsa/lang/julia/julia/contrib/generate_precompile.jl:331
mktemp at ./file.jl:722
mktemp at ./file.jl:720 [inlined]
generate_precompile_statements at /home/dabrowsa/lang/julia/julia/contrib/generate_precompile.jl:270
unknown function (ip: 0x7fea4785533f)
top-level scope at /home/dabrowsa/lang/julia/julia/contrib/generate_precompile.jl:416
jl_toplevel_eval_flex at /home/dabrowsa/lang/julia/julia/src/toplevel.c:876
jl_toplevel_eval_in at /home/dabrowsa/lang/julia/julia/src/toplevel.c:944
eval at ./boot.jl:373
jl_apply at /home/dabrowsa/lang/julia/julia/src/julia.h:1788 [inlined]
do_call at /home/dabrowsa/lang/julia/julia/src/interpreter.c:126
eval_value at /home/dabrowsa/lang/julia/julia/src/interpreter.c:215
eval_stmt_value at /home/dabrowsa/lang/julia/julia/src/interpreter.c:166 [inlined]
eval_body at /home/dabrowsa/lang/julia/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/dabrowsa/lang/julia/julia/src/interpreter.c:731
jl_toplevel_eval_flex at /home/dabrowsa/lang/julia/julia/src/toplevel.c:885
jl_toplevel_eval_flex at /home/dabrowsa/lang/julia/julia/src/toplevel.c:830
jl_toplevel_eval_in at /home/dabrowsa/lang/julia/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
_include at ./loading.jl:1253
include at ./Base.jl:418
exec_options at ./client.jl:292
_start at ./client.jl:495
unknown function (ip: 0x7fea47d6074f)
jl_apply at /home/dabrowsa/lang/julia/julia/src/julia.h:1788 [inlined]
true_main at /home/dabrowsa/lang/julia/julia/src/jlapi.c:559
jl_repl_entrypoint at /home/dabrowsa/lang/julia/julia/src/jlapi.c:701
main at /home/dabrowsa/lang/julia/julia/cli/loader_exe.c:42
unknown function (ip: 0x7fea59f80d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/dabrowsa/lang/julia/julia/usr/bin/julia (unknown line)
unknown function (ip: (nil))
Allocations: 7505026 (Pool: 7501072; Big: 3954); GC: 8
make[1]: *** [sysimage.mk:88: /home/dabrowsa/lang/julia/julia/usr/lib/julia/sys-o.a] Interrupt
make: *** [Makefile:88: julia-sysimg-release] Interrupt

```

Update 1: No special flags, just ran “make clean” and “make”.

Update 2: I’m not a pro programmer, I never program in C, so there should be unusual env settings:

```julia
$ printenv
momip=173.54.96.12
SHELL=/bin/bash
WINDOWID=27269551
QT_ACCESSIBILITY=1
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg/xdg-openbox:/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
GTK_IM_MODULE=ibus
GTK2_MODULES=overlay-scrollbar
LANGUAGE=en_US
NNN_BMS=h:~;f:~/teach/m118;m:~/teach/m447;D:~/Downloads/;g:~/mygit;z:~/Documents/Zoom/
MANDATORY_PATH=/usr/share/gconf/openbox.mandatory.path
XMODIFIERS=@im=ibus
DESKTOP_SESSION=openbox
NO_AT_BRIDGE=1
EDITOR=/usr/bin/emacs
GTK_MODULES=gail:atk-bridge
XDG_SEAT=seat0
PWD=/home/dabrowsa/lang/julia/julia
KEYPATH=/home/dabrowsa/key76e/lib
WEBWORK_ROOT=/home/dabrowsa/webwork/webwork2
LOGNAME=dabrowsa
XDG_SESSION_DESKTOP=openbox
QT_QPA_PLATFORMTHEME=appmenu-qt5
XDG_SESSION_TYPE=x11
PANEL_GDK_CORE_DEVICE_EVENTS=0
GPG_AGENT_INFO=/run/user/1001/gnupg/S.gpg-agent:0:1
XAUTHORITY=/home/dabrowsa/.Xauthority
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/dabrowsa
GDM_LANG=en_US
HOME=/home/dabrowsa
LANG=en_US.UTF-8
VTE_VERSION=6800
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
PG_ROOT=/home/dabrowsa/webwork/pg
CLUTTER_IM_MODULE=ibus
NVM_DIR=/home/dabrowsa/.nvm
XDG_SESSION_CLASS=user
ANDROID_HOME=/home/dabrowsa/Android/Sdk
TERM=xterm-256color
DEFAULTS_PATH=/usr/share/gconf/openbox.default.path
USER=dabrowsa
DISPLAY=:0.0
SHLVL=1
NVM_CD_FLAGS=
QT_IM_MODULE=ibus
XDG_VTNR=7
HOMEWPD=173.243.190.156
XDG_SESSION_ID=c2
LD_LIBRARY_PATH=:/usr/lib/llvm
XDG_RUNTIME_DIR=/run/user/1001
PS1=\[\033[1;46m\][\h:$(truncatedPWD)]$\[\033[m\] 
LYEDITOR=emacsclient --no-wait +%(line)s:%(column)s %(file)s
XDG_DATA_DIRS=/usr/share/openbox:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
PATH=/home/dabrowsa/.nvm/versions/node/v8.10.0/bin:/home/dabrowsa/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/dabrowsa/bin:/home/bin:/home/dabrowsa/Android/Sdk/platform-tools
GDMSESSION=openbox
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
NVM_BIN=/home/dabrowsa/.nvm/versions/node/v8.10.0/bin
OLDPWD=/home/dabrowsa/lang/julia
_=/usr/bin/printenv

```

Update 3: Compilation of v1.8.0-rc3 succeeds:

```julia
Sysimage built. Summary:
Total ─────── 54.466326 seconds 
Base: ─────── 22.949444 seconds 42.1351%
Stdlibs: ──── 31.515697 seconds 57.8627%
    JULIA usr/lib/julia/sys-o.a
WARNING: Error during initialization of module LinearAlgebra:
Base.KeyError(key=65)
WARNING: Error during initialization of module LinearAlgebra:
Base.KeyError(key=33)
Generating REPL precompile statements... 40/40
Executing precompile statements... 2007/2052
Precompilation complete. Summary:
Total ─────── 120.833380 seconds
Generation ── 92.020311 seconds 76.1547%
Execution ─── 28.813069 seconds 23.8453%
    LINK usr/lib/julia/sys.so
    CC usr/lib/libccalltest.so
    CC usr/lib/libllvmcalltest.so
WARNING: Error during initialization of module LinearAlgebra:
Base.KeyError(key=81)

```

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [July 31, 2022, 5:39pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/2 "2022-07-31T17:39:01Z")

</div>

Are you using any specific compilers ?  
Are you using any specific make flags ?

This path looks suspicious `/workspace/srcdir/libuv/src/unix/epoll.c` vs your sources located in `/home/dabrowsa/lang/julia/julia/src`: julia should build `libuv` (see `deps/libuv.mk`, `deps/libuv.version`) along all deps.

My build of `1.7.3` on `22.04` requires at least this PR [https://github.com/JuliaLang/julia/pull/45649](https://github.com/JuliaLang/julia/pull/45649) for the tests to pass (see [Build: failing `Float16` `intrinsics` on `1.6.6` or `1.7.2` on `ubuntu 22.04` · Issue #45433 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/45433)).

---

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [July 31, 2022, 7:26pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/3 "2022-07-31T19:26:36Z")

</div>

The Makefile has this:

`JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUV) += libuv`

Should I change something here?

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [July 31, 2022, 7:43pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/4 "2022-07-31T19:43:07Z")

</div>

`USE_SYSTEM_LIBUV` default to 0 ( see [julia/Make.inc at dbae5a50e506f05a4d4f2f3471c76291e5252df4 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/blob/dbae5a50e506f05a4d4f2f3471c76291e5252df4/Make.inc#L58)), so normally no.

We need more information on how you build julia. Try to inspect you environment variables for potential conflicts.

EDIT 1: `LD_LIBRARY_PATH=:/usr/lib/llvm` this is likely to conflict with the llvm build of julia.

EDIT 2: `WARNING: Error during initialization of module LinearAlgebra:` this is not what I’d call `succeed` 🙂 .

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [July 31, 2022, 8:53pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/5 "2022-07-31T20:53:50Z")

</div>

> [@unhandyandy](#):
>
> I have pulled the git repo and I’m trying to compile v1.7.3,

why？

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [July 31, 2022, 9:30pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/7 "2022-07-31T21:30:21Z")

</div>

I think @jling was implicitly asking: _why bother compiling julia, as the recommended way of obtaining julia is to use official binaries available at [Download Julia](https://julialang.org/downloads/) ?_

---

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [July 31, 2022, 9:30pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/8 "2022-07-31T21:30:41Z")

</div>

Well, at least the compilation complete without an Error.

---

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [August 1, 2022, 12:46am UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/9 "2022-08-01T00:46:27Z")

</div>

It’s the latest stable branch

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 1, 2022, 1:19am UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/10 "2022-08-01T01:19:34Z")

</div>

yes, it is, but why are YOU compiling it instead of get 1.7.3 from download page?

---

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [August 1, 2022, 1:44am UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/11 "2022-08-01T01:44:00Z")

</div>

Oh, that’s news to me, I’ve been following Julia for about 10 years and it’s always been recommended to compile it yourself.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 1, 2022, 1:52am UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/12 "2022-08-01T01:52:48Z")

</div>

> [@unhandyandy](#):
>
> I’ve been following Julia for about 10 years and it’s always been recommended to compile it yourself.

no f way… [Create getting-started.md · JuliaLang/www.julialang.org@b2e11b5 · GitHub](https://github.com/JuliaLang/www.julialang.org/commit/b2e11b5fecb01cf5bfde299ece107e66eaf9b487)

it has been at least 3 years and I suspect it’s much longer than that since people recommend download official binary no matter what

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [August 1, 2022, 2:03am UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/13 "2022-08-01T02:03:43Z")

</div>

That said, it really should compile properly.

---

<div class="post-metadata">

**Author:** ![unhandyandy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/unhandyandy/32/7634_2.png) [@unhandyandy](https://discourse.julialang.org/u/unhandyandy)\
**Post date:** [August 1, 2022, 2:52pm UTC](https://discourse.julialang.org/t/compiling-1-7-3-on-ubuntu-22-04-stalls/85070/14 "2022-08-01T14:52:08Z")

</div>

Well, they didn’t send me the memo.
