# PackageCompiler can't load library - wrong ELFCLASS32

**URL:** <https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825>\
**Category:** New to Julia\
**Tags:** package-compiler\
**Created:** [March 23, 2021, 9:47pm UTC](https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825 "2021-03-23T21:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschmidhuber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sschmidhuber/32/13349_2.png) [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Post date:** [March 23, 2021, 9:47pm UTC](https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825/1 "2021-03-23T21:47:18Z")

</div>

Hello,

I would like to compile a little test application, which is just using Gkt package. It runs in general, but if I try to compile it with PackageCompiler I get the following error message:

```julia
julia> create_app("CompilerTest", "bin", force=true)
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
ERROR: LoadError: LoadError: InitError: could not load library "/home/stefan/.julia/artifacts/29096e59ce220ab1664c8b174bc1be5d28eb8794/lib/libcharset.so"
/home/stefan/.julia/artifacts/29096e59ce220ab1664c8b174bc1be5d28eb8794/lib/libcharset.so: falsche ELF-Klasse: ELFCLASS32

```

If I understand correctly the charset library is a 32 bit version, but why? Julia is installed as 64 bit version, the two packages Gtk and PackageCompiler are up to date.

What am I doing wrong? Thank you for your feedback.

Cheers,  
Stefan

---

<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:** [March 23, 2021, 10:40pm UTC](https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825/2 "2021-03-23T22:40:01Z")

</div>

> [@sschmidhuber](#):
>
> If I understand correctly the charset library is a 32 bit version

Yes, `29096e59ce220ab1664c8b174bc1be5d28eb8794` is the 32-bit version of libiconv:

> <https://github.com/JuliaBinaryWrappers/Libiconv_jll.jl/blob/5335fc9772c03500063addbeb66f036cf8464853/Artifacts.toml#L37-L45>

> [@sschmidhuber](#):
>
> but why?

No idea. What version of Julia is it? With Julia v1.5 you can check what platform Julia thinks you’re using with

```julia
julia> using Pkg.BinaryPlatforms

julia> platform_key_abi()
Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"4.0.0", cxxstring_abi=:cxx11))

```

---

<div class="post-metadata">

**Author:** ![sschmidhuber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sschmidhuber/32/13349_2.png) [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Post date:** [March 23, 2021, 11:27pm UTC](https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825/3 "2021-03-23T23:27:41Z")

</div>

Hmmm, I’m running Julia 1.5 on Fedora and Julia seems to be aware of the correct architecture:

```julia
julia> platform_key_abi()
Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"5.0.0", libstdcxx_version=v"3.4.26", cxxstring_abi=:cxx11))

julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1* (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)

```

🙄

---

<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:** [March 23, 2021, 11:44pm UTC](https://discourse.julialang.org/t/packagecompiler-cant-load-library-wrong-elfclass32/57825/4 "2021-03-23T23:44:57Z")

</div>

Sorry, I’m not familiar with PkgCompiler internals, no idea where it’s drawing the wrong platform from 😞
