JuliaGPU / JuliaGPU/AMDGPU.jl

libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/rocm/lib/librocfft.so)

Open
#272 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug upstream
Dominant language
Julia
Stars
344
Forks
79
Avg merge
2d 23h
Merged PRs (30d)
27

Description

Hello,

I just got a new AMD RX 6700 XT and have been testing out some AMDGPU features with it. when using it for the first time, I got the following error(s):

julia> using AMDGPU
[ Info: Precompiling AMDGPU [21141c5a-9bdb-4563-92ae-f87d6854732e]
WARNING: using rocRAND_jll.librocrand in module AMDGPU conflicts with an existing identifier.
ERROR: LoadError: could not load library "/opt/rocm/lib/librocfft.so"
/home/leios/builds/julia-1.7.1/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/rocm/lib/librocfft.so)
Stacktrace:
  [1] macro expansion
    @ ~/.julia/packages/AMDGPU/Vq91r/src/fft/error.jl:40 [inlined]
  [2] rocfft_setup()
    @ AMDGPU.rocFFT ~/.julia/packages/AMDGPU/Vq91r/src/fft/librocfft.jl:9
  [3] top-level scope
    @ ~/.julia/packages/AMDGPU/Vq91r/src/fft/rocFFT.jl:16
  [4] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [5] include(x::String)
    @ AMDGPU ~/.julia/packages/AMDGPU/Vq91r/src/AMDGPU.jl:1
  [6] top-level scope
    @ ~/.julia/packages/AMDGPU/Vq91r/src/AMDGPU.jl:126
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/leios/.julia/packages/AMDGPU/Vq91r/src/fft/rocFFT.jl:1
in expression starting at /home/leios/.julia/packages/AMDGPU/Vq91r/src/AMDGPU.jl:1
ERROR: Failed to precompile AMDGPU [21141c5a-9bdb-4563-92ae-f87d6854732e] to /home/leios/.julia/compiled/v1.7/AMDGPU/jl_zjfXSd.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

The first part seems to be something wrong with ROCrand. @jpsamaroo asked me to output the following:

julia> AMDGPU.librocrand
"/home/leios/.julia/artifacts/3c565b6e353eb2ec9345ac55ba0f2d6be3444bea/rocrand/lib/librocrand.so"

The other issue seems to be a problem with my own GLibC++ version conflicting with Julia's. I really don't know exactly how to fix this, but setting LD_PRELOAD to my local libstdc++.so.6 seemed to work for me:

LD_PRELOAD=/usr/lib/libstdc++.so.6 julia 

Building from source also seems to work (more info: https://discourse.julialang.org/t/glibcxx-3-4-26-not-found-in-rcall/29113/17?u=laborg)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce using AMDGPU with Julia 1.7.1 and the reported ROCm setup, then inspect the stack locations named in src/fft/error.jl, src/fft/librocfft.jl, src/fft/rocFFT.jl, and src/AMDGPU.jl. Compare the failing load with the reported LD_PRELOAD=/usr/lib/libstdc++.so.6 workaround and source build; done means AMDGPU precompiles and rocFFT loads without the reported GLIBCXX error.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.