# Failed to precompile CUDA

**URL:** https://discourse.julialang.org/t/failed-to-precompile-cuda/134255
**Category:** GPU
**Tags:** question, gpu, cuda
**Created:** [December 1, 2025, 1:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255 "2025-12-01T13:09:55Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 1, 2025, 1:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/1 "2025-12-01T13:09:55Z")

</div>

```julia
julia> using CUDA
┌ Warning: Circular dependency detected. Precompilation will be skipped for:
│ SparseArraysExt [85068d23-b5fb-53f1-8204-05c2aba6942f]
│ AtomixCUDAExt [13011619-4c7c-5ef0-948f-5fc81565cd05]
│ LinearAlgebraExt [66d79d19-2cc4-5b0b-ac7a-b340256d1ecd]
│ GPUArrays [0c68f7d7-f131-5f86-a1c3-88cf8149b2d7]
│ KernelAbstractions [63c18a36-062a-441e-b654-da1e3ab1ce7c]
│ CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
└ @ Pkg.API /somepath/Software/julia-1.10.3/share/julia/stdlib/v1.10/Pkg/src/API.jl:1239

[Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
ERROR: LoadError: ArgumentError: Platform `riscv64-linux-gnu-cxx03-llvm_version+20.asserts` is not an officially supported platform
...
ERROR: LoadError: Failed to precompile LLVMExtra_jll [dad2f222-ce93-54a1-a47d-0025e8a3acab] to "/home/name/.julia/compiled/v1.10/LLVMExtra_jll/jl_q7V02j".
...
ERROR: LoadError: Failed to precompile LLVM [929cbde3-209d-540e-8aea-75f648917ca0] to "/home/name/.julia/compiled/v1.10/LLVM/jl_vLDbEp".
...
ERROR: LoadError: Failed to precompile GPUCompiler [61eb1bfa-7361-4325-ad38-22787b887f55] to "/home/name/.julia/compiled/v1.10/GPUCompiler/jl_nmJKIc".
...
ERROR: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "/home/name/.julia/compiled/v1.10/CUDA/jl_b9MMFH".
...

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 1, 2025, 1:17pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/2 "2025-12-01T13:17:53Z")

</div>

Can you share the output of:

```julia-auto
using Pkg
Pkg.status()

```

?  
And the output of

```julia-auto
versioninfo()

```

?

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 1, 2025, 1:37pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/3 "2025-12-01T13:37:19Z")

</div>

```julia
(test) pkg> status
Status `/somepath/test/Project.toml`
  [052768ef] CUDA v5.9.5

```

```julia
julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 56 × Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake-avx512)
Threads: 1 default, 0 interactive, 1 GC (on 56 virtual cores)
Environment:
  LD_LIBRARY_PATH = ...
  JULIA_PKG_SERVER = ...

```

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 1, 2025, 2:13pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/4 "2025-12-01T14:13:54Z")

</div>

Now I might have figured out what the problem is. It could be because I used a portable version of Julia 1.10. When I used another installation version of 1.11, everything worked fine.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 1, 2025, 2:24pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/5 "2025-12-01T14:24:30Z")

</div>

You deleted the LD\_LIBRARY\_PATH in your reply, but it could also be the reason for your failure. You could try to set it to an empty string.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 1, 2025, 2:27pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/6 "2025-12-01T14:27:47Z")

</div>

Ah, I think it’s too lengthy. What is this for? I see that it involves many paths. If it is set to be empty, will it cause any bad consequences?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 1, 2025, 2:34pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/7 "2025-12-01T14:34:52Z")

</div>

When loading shared libraries, the OS looks in the folders in this path first. The libraries Julia needs are, for example, in this directory:

```julia-auto
/.julia/juliaup/julia-1.10.10+0.x64.linux.gnu/lib/julia

```

If the same libraries are - in a slightly different version - in any of the folders in  
LD\_LIBRARY\_PATH, those are loaded instead of the official Julia libraries. This usually results in a crash.

This variable may be required for other command-line applications you are using. If so, you should set it only for these applications and delete it before starting Julia.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 1, 2025, 2:58pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/8 "2025-12-01T14:58:33Z")

</div>

It makes sense. Thank you very much.

But I checked the paths in `LD_LIBRARY_PATH` carefully and didn’t find any julia related path.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 1, 2025, 5:31pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/9 "2025-12-01T17:31:33Z")

</div>

> [@WuSiren](#):
>
> didn’t find any julia related path.

Not only Julia related paths can cause problems, but any folder that contains any of these libraries:

```julia-auto
ufechner@ufryzen:~/.julia/juliaup/julia-1.10.10+0.x64.linux.gnu/lib/julia$ ls
libamd.so libgcc_s.so.1 libLLVM.so librbio.so.4.2.1
libamd.so.3 libgfortran.so libmbedcrypto.so libspqr.so
libamd.so.3.2.1 libgfortran.so.5 libmbedcrypto.so.2.28.2 libspqr.so.4
libatomic.so libgfortran.so.5.0.0 libmbedcrypto.so.7 libspqr.so.4.2.1
libatomic.so.1 libgit2.so libmbedtls.so libssh2.so
libatomic.so.1.2.0 libgit2.so.1.6 libmbedtls.so.14 libssh2.so.1
libblastrampoline.so libgit2.so.1.6.4 libmbedtls.so.2.28.2 libssh2.so.1.0.1
libblastrampoline.so.5 libgmp.so libmbedx509.so libssp.so
libblastrampoline.so.5.11.0 libgmp.so.10 libmbedx509.so.1 libssp.so.0
libbtf.so libgmp.so.10.4.1 libmbedx509.so.2.28.2 libssp.so.0.0.0
libbtf.so.2 libgmpxx.so libmpfr.so libstdc++.so
libbtf.so.2.2.1 libgmpxx.so.4 libmpfr.so.6 libstdc++.so.6
libcamd.so libgmpxx.so.4.6.1 libmpfr.so.6.2.0 libstdc++.so.6.0.32
libcamd.so.3 libgomp.so libnghttp2.so libsuitesparseconfig.so
libcamd.so.3.2.1 libgomp.so.1 libnghttp2.so.14 libsuitesparseconfig.so.7
libccalltest.so libgomp.so.1.0.0 libnghttp2.so.14.24.1 libsuitesparseconfig.so.7.2.1
libccalltest.so.debug libjulia-codegen.so libopenblas64_.0.3.23.so libumfpack.so
libccolamd.so libjulia-codegen.so.1.10 libopenblas64_.so libumfpack.so.6
libccolamd.so.3 libjulia-codegen.so.1.10.10 libopenblas64_.so.0 libumfpack.so.6.2.1
libccolamd.so.3.2.1 libjulia-internal.so libopenlibm.so libunwind.so
libcholmod.so libjulia-internal.so.1.10 libopenlibm.so.4 libunwind.so.8
libcholmod.so.4 libjulia-internal.so.1.10.10 libopenlibm.so.4.0 libunwind.so.8.0.1
libcholmod.so.4.2.1 libklu.so libpcre2-8.so libuv.so
libcolamd.so libklu.so.2 libpcre2-8.so.0 libuv.so.2
libcolamd.so.3 libklu.so.2.2.1 libpcre2-8.so.0.11.2 libuv.so.2.0.0
libcolamd.so.3.2.1 libldl.so libquadmath.so libz.so
libcurl.so libldl.so.3 libquadmath.so.0 libz.so.1
libcurl.so.4 libldl.so.3.2.1 libquadmath.so.0.0.0 libz.so.1.2.13
libcurl.so.4.8.0 libLLVM-15jl.so librbio.so sys.so
libdSFMT.so libllvmcalltest.so librbio.so.4

```

The library that most often causes problems is ` libstdc++.so`.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 2, 2025, 2:44am UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/10 "2025-12-02T02:44:11Z")

</div>

It seems you are right, @ufechner7 . Thank you very much! 🤝

But, after I typed `ENV["LD_LIBRARY_PATH"]=""`, I `add CUDA` and `using CUDA` again, and the same error also occurred.

And, do I have to execute `ENV["LD_LIBRARY_PATH"]=""` every time I restart Julia?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 2, 2025, 5:24am UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/11 "2025-12-02T05:24:07Z")

</div>

> [@WuSiren](#):
>
> And, do I have to execute `ENV["LD_LIBRARY_PATH"]=""` every time I restart Julia?

I would add

```julia-auto
export LD_LIBRARY_PATH=""

```

to `.bashrc` if you have this file in your home folder. This might break other tools you use, though. Or you add

```julia-auto
alias jl='export LD_LIBRARY_PATH=""; julia'

```

to `.bashrc` and launch Julia by typing `jl`.

I think that setting this variable within Julia is too late and has no effect.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 2, 2025, 8:45am UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/12 "2025-12-02T08:45:30Z")

</div>

Given various issues, I have decided to abandon using a portable version of Julia while an installation version of Juliaup is in existence. I found that if there are two Julia versions with the same version number, even if one is installed via Juliaup and the other is a binary file, the latter’s packages cannot be installed and used properly.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 2, 2025, 10:43am UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/13 "2025-12-02T10:43:41Z")

</div>

I would not use a portable version with CUDA, because CUDA is specific to a graphics card, which is usually different for each computer.

Can you mark one of the answers as a resolution of the initial question?

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [December 2, 2025, 10:51am UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/14 "2025-12-02T10:51:00Z")

</div>

Sure. Thank you @ufechner7 ! 🤝

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [December 16, 2025, 10:59pm UTC](https://discourse.julialang.org/t/failed-to-precompile-cuda/134255/15 "2025-12-16T22:59:21Z")

</div>

> [@Trouble with installing AlphaShapes package](https://discourse.julialang.org/t/trouble-with-installing-alphashapes-package/134599/3):
>
> TLDR you have an old version of the package JLLWrappers in your environment (\<v1.7.0) and you’re using an old version of Julia (\<v1.10.8 for the 1.10 series, or \<v1.11.3 in the 1.11 series). Update either JLLWrappers or your Julia version, ideally both of them.
