# Cannot succeed in compiling julia

**URL:** <https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873>\
**Category:** New to Julia\
**Tags:** installation\
**Created:** [November 22, 2018, 4:56pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873 "2018-11-22T16:56:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 22, 2018, 4:56pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/1 "2018-11-22T16:56:03Z")

</div>

Hello  
It do not succeed in installing Julia (v. 0.7.0-full, downloaded as a source tgz). I tried two gnu/linux based machines: redhat 7, linux Mint workstation, gcc 5.4.0, clang 3.8.0. Always the same problem: everything OK, but at the end of the compilation I get the message:

…

> jl\_write\_compiler\_output at /home/manu/TMP/JULIA/julia-0.7.0-full/src/precompile.c:68  
> jl\_atexit\_hook at /home/manu/TMP/JULIA/julia-0.7.0-full/src/init.c:233  
> main at /home/manu/TMP/JULIA/julia-0.7.0-full/ui/repl.c:234  
> \_\_libc\_start\_main at /build/glibc-Cl5G7W/glibc-2.23/csu/…/csu/libc-start.c:291  
> \_start at /home/manu/TMP/JULIA/julia-0.7.0-full/usr/bin/julia (unknown line)  
> Generating precompile statements… 774 generated in 50.124638 seconds  
> \*\*\* This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. \*\*\*  
> Makefile:216: recipe for target ‘/home/manu/TMP/JULIA/julia-0.7.0-full/usr/lib/julia/sys-o.a’ failed  
> make[1]: \*\*\* [/home/manu/TMP/JULIA/julia-0.7.0-full/usr/lib/julia/sys-o.a] Error 1  
> Makefile:78: recipe for target ‘julia-sysimg-release’ failed  
> make: \*\*\* [julia-sysimg-release] Error 2

Then I try make clean, make cleanall then make again: go back to the same point. So at the end the file sys.so is missing, and julia does not start.

Am i doing anything wrong ?

Thanks for your help !  
Emmanuel

---

<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:** [November 22, 2018, 5:04pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/2 "2018-11-22T17:04:07Z")

</div>

It looks like the error is from the precompiliation part, which is rather memory demanding and could fail if you don’t have enough memory. You can try to set `JULIA_PRECOMPILE=0` in `Make.user` and try again.

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 22, 2018, 8:37pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/3 "2018-11-22T20:37:53Z")

</div>

Thanks for your help. However, the result is unchanged (I did not compile from scratch, I just tried make -j 4 again). Here is my Make.user:

> cat Make.user  
> BUILD\_LLVM\_CLANG := 1  
> USECLANG := 1  
> JULIA\_PRECOMPILE := 0

The versions are:

> clang --version  
> clang version 3.8.0-2ubuntu4 (tags/RELEASE\_380/final)  
> Target: x86\_64-pc-linux-gnu  
> Thread model: posix  
> InstalledDir: /usr/bin
> 
> cat /etc/\*-release  
> DISTRIB\_ID=LinuxMint  
> DISTRIB\_RELEASE=18.3  
> DISTRIB\_CODENAME=sylvia
> 
> uname -a  
> Linux hplap1 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux
> 
> free  
> total used free shared buff/cache available  
> Mem: 8046904 2550380 636164 393432 4860360 4734488  
> Swap: 8261628 655964 7605664

Sincerely,  
Emmanuel

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 23, 2018, 10:01am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/4 "2018-11-23T10:01:35Z")

</div>

@manu May I ask why 0.7 The latest version is 1.0.2  
OF course you may have a specific need for 0.7 and the deprecation warnings it has. But surely on a new project you should go with 1.0.x ??

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 23, 2018, 10:56am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/5 "2018-11-23T10:56:02Z")

</div>

While asking stupid questions: why can’t you use ready binaries from download page?

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 23, 2018, 11:09am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/6 "2018-11-23T11:09:25Z")

</div>

Hello

No your questions are not stupid. Here is the ultimate goal: installing julia on our supercomputer (cf. [https://www.calmip.univ-toulouse.fr/](https://www.calmip.univ-toulouse.fr/)) and make it available to our users through a gnu module ([http://modules.sourceforge.net/](http://modules.sourceforge.net/)). We recompile everything to get best performance (using intel mkl etc).

We install the 0.7.0 release because some of our users need compatibility with “old” work. However we’ll install also the 1.0.2 release, for new projects. Thanks to the Environment modules program it is easy to install several versions of softwares.

However, this is not an easy task compiling julia, and to start I am trying to compile Julia on my gnu/linux mint based laptop, because I thought it would be easier doing this on a quite standard machine. When I’ll succeed in this install (including tests), I’ll try to do the same on the supercomputer.

Sincerely,  
Emmanuel

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 23, 2018, 11:20am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/7 "2018-11-23T11:20:35Z")

</div>

Perhaps try to capture the complete log and post that.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 23, 2018, 11:20am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/8 "2018-11-23T11:20:48Z")

</div>

It would be cool, if you could run benchmark comparison of ready binaries and compiled ones on a cluster, after success in building and installing. This way others, me included, could make a conclusion if it is worth the effort.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 23, 2018, 1:46pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/9 "2018-11-23T13:46:18Z")

</div>

@manu Fantastic! I work in HPC myself. On my own laptop I have Modules and a couple of different versions of Julia.  
There should be an Easybuild or a Spack recipe for Julia . Update - I am not familiar with Spack but there is a recipe for Julia. I know Easybuild better.  
As @Tero_Frondelius says - please if you can share with us any comparisons between ready built binaries and optimised ones.

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 23, 2018, 3:55pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/10 "2018-11-23T15:55:51Z")

</div>

Well

Using the release 1.0.2 the compilation succeeds on my laptop, make testall succeeds too.  
So I tried compiling 1.0.2 on the supercomputer. Using gcc 4.8.5 and **the release 18.2 of intel MKL** : the compilation succeeds, but the tests fail with the message:

> ccall: could not find function \_\_ldexp\_expf in library libimf

I am not the first: see [Use\_intel\_libm = 1](https://discourse.julialang.org/t/use-intel-libm-1/16817)  
So, is there any solution for using Julia 1.0.2 with the mkl or is the issue still open ?

Sincerely,  
Emmanuel

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [November 23, 2018, 4:37pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/11 "2018-11-23T16:37:11Z")

</div>

> [@manu](#):
>
> I am not the first: see [Use\_intel\_libm = 1](https://discourse.julialang.org/t/use-intel-libm-1/16817)  
> So, is there any solution for using Julia 1.0.2 with the mkl or is the issue still open ?

As I see - [it is changed](https://github.com/JuliaLang/julia/pull/27317) to

- [GitHub - JuliaLang/julia at release-1.0](https://github.com/JuliaLang/julia/tree/release-1.0#intel-mkl)

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 23, 2018, 9:14pm UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/12 "2018-11-23T21:14:31Z")

</div>

hoho ! Thanks !  
So here is the new Make.user:

> prefix = /usr/local/julia/1.0.2  
> USEIFC = 1  
> USE\_INTEL\_MKL = 1

Compilation OK, but 4 tests failed:

> Worker 4 failed running test cmdlineargs:  
> Some tests did not pass: 202 passed, 4 failed, 0 errored, 0 broken.cmdlineargs: Test Failed at /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:422  
> Expression: success(#= /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:422 =# @cmd(“$exename -e "exit(0)"”))  
> Stacktrace:  
> [1] record(::Test.DefaultTestSet, ::Test.Fail) at /tmpdir/sysinst/julia/julia-1.0.2-full/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:745  
> [2] (::getfield(Main, Symbol(“##42#48”)))() at /tmpdir/sysinst/julia/julia-1.0.2-full/test/runtests.jl:237  
> [3] cd(::getfield(Main, Symbol(“##42#48”)), ::String) at ./file.jl:96  
> [4] top-level scope at none:0  
> [5] include at ./boot.jl:317 [inlined]  
> [6] include\_relative(::Module, ::String) at ./loading.jl:1044  
> [7] include(::Module, ::String) at ./sysimg.jl:29  
> [8] exec\_options(::Base.JLOptions) at ./client.jl:231  
> [9] \_start() at ./client.jl:425  
> cmdlineargs: Test Failed at /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425  
> Expression: success(#= /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425 =# @cmd(“$exename -e "exit(!(Base.load\_path() == ))"”))  
> Stacktrace:  
> [1] record(::Test.DefaultTestSet, ::Test.Fail) at /tmpdir/sysinst/julia/julia-1.0.2-full/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:745  
> [2] (::getfield(Main, Symbol(“##42#48”)))() at /tmpdir/sysinst/julia/julia-1.0.2-full/test/runtests.jl:237  
> [3] cd(::getfield(Main, Symbol(“##42#48”)), ::String) at ./file.jl:96  
> [4] top-level scope at none:0  
> [5] include at ./boot.jl:317 [inlined]  
> [6] include\_relative(::Module, ::String) at ./loading.jl:1044  
> [7] include(::Module, ::String) at ./sysimg.jl:29  
> [8] exec\_options(::Base.JLOptions) at ./client.jl:231  
> [9] \_start() at ./client.jl:425  
> cmdlineargs: Test Failed at /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425  
> Expression: success(#= /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425 =# @cmd(“$exename -e "exit(!(Base.load\_path() == ))"”))  
> Stacktrace:  
> [1] record(::Test.DefaultTestSet, ::Test.Fail) at /tmpdir/sysinst/julia/julia-1.0.2-full/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:745  
> [2] (::getfield(Main, Symbol(“##42#48”)))() at /tmpdir/sysinst/julia/julia-1.0.2-full/test/runtests.jl:237  
> [3] cd(::getfield(Main, Symbol(“##42#48”)), ::String) at ./file.jl:96  
> [4] top-level scope at none:0  
> [5] include at ./boot.jl:317 [inlined]  
> [6] include\_relative(::Module, ::String) at ./loading.jl:1044  
> [7] include(::Module, ::String) at ./sysimg.jl:29  
> [8] exec\_options(::Base.JLOptions) at ./client.jl:231  
> [9] \_start() at ./client.jl:425  
> cmdlineargs: Test Failed at /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425  
> Expression: success(#= /tmpdir/sysinst/julia/julia-1.0.2-full/test/cmdlineargs.jl:425 =# @cmd(“$exename -e "exit(!(Base.load\_path() == ))"”))  
> Stacktrace:  
> [1] record(::Test.DefaultTestSet, ::Test.Fail) at /tmpdir/sysinst/julia/julia-1.0.2-full/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:745  
> [2] (::getfield(Main, Symbol(“##42#48”)))() at /tmpdir/sysinst/julia/julia-1.0.2-full/test/runtests.jl:237  
> [3] cd(::getfield(Main, Symbol(“##42#48”)), ::String) at ./file.jl:96  
> [4] top-level scope at none:0  
> [5] include at ./boot.jl:317 [inlined]  
> [6] include\_relative(::Module, ::String) at ./loading.jl:1044  
> [7] include(::Module, ::String) at ./sysimg.jl:29  
> [8] exec\_options(::Base.JLOptions) at ./client.jl:231  
> [9] \_start() at ./client.jl:425

Looks like this issue: [make testall fails with undefined symbol error · Issue #27940 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/27940)

Sincerely,  
Emmanuel

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [November 24, 2018, 12:09am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/13 "2018-11-24T00:09:06Z")

</div>

My `Make.user` simply says:

```julia
MARCH = native
USE_INTEL_MKL = 1
USE_INTEL_LIBM = 1

```

also, be sure to source Intel’s script `compilervars.sh`. I’ve never had an issue building from source while using anything from gcc-5.4 through gcc 8.2.1.  
Watch out though, that ARPACK will not work when you build with MKL, and many packages depend on it, including Distributions and LightGraphs.

EDIT:  
I’m trying `make testall` now. I never had a problem before.  
I can confirm that I have the same test failures.

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://discourse.julialang.org/u/manu)\
**Post date:** [November 26, 2018, 9:26am UTC](https://discourse.julialang.org/t/cannot-succeed-in-compiling-julia/17873/14 "2018-11-26T09:26:12Z")

</div>

Thank you Elrod for testing again

So now it is clear: no way installing Julia 1.0.2 (with successful tests) with the MKL. I installed a release “nomkl”.

About benchmarks, did you refer to the micro-benchmarks [https://github.com/JuliaLang/Microbenchmarks](https://github.com/JuliaLang/Microbenchmarks) ?

Sincerely,  
Emmanuel
