Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load libsuitesparse_wrapper.so (i686 CHOLMOD initialization error) #34936

Closed
ghost opened this issue Feb 29, 2020 · 22 comments
Closed

load libsuitesparse_wrapper.so (i686 CHOLMOD initialization error) #34936

ghost opened this issue Feb 29, 2020 · 22 comments
Labels
building Build system, or building Julia or its dependencies system:linux Affects only Linux

Comments

@ghost
Copy link

ghost commented Feb 29, 2020

Improper alignment here.

bash-4.3$ julia
┌ Error: Error during initialization of module CHOLMOD
│   exception =
│    could not load library "libsuitesparse_wrapper"
│    libsuitesparse_wrapper.so: ELF-indlæsningskommandos adresse/tillæg er ikke tilpasset ordentligt
└ @ SuiteSparse.CHOLMOD /buildworker/worker/package_linux32/build/usr/share/julia/stdlib/v1.3/SuiteSparse/src/cholmod.jl:176
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.1 (2019-12-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> exit()
bash-4.3$  
@ViralBShah ViralBShah added building Build system, or building Julia or its dependencies system:linux Affects only Linux labels Mar 1, 2020
@ViralBShah
Copy link
Member

How was this built? Can you point to the build script?

@ghost
Copy link
Author

ghost commented Mar 1, 2020

https://julialang.org/downloads/
julia-1.3.1-linux-i686.tar.gz

link deleted Nov 10, 2020
julia.SlackBuild

@ViralBShah
Copy link
Member

What version of gcc? Perhaps @staticfloat knows what might be going on.

@staticfloat
Copy link
Member

@apparluk translating that error message, it looks like it's saying ELF load command address/offset not properly aligned; does that seem right?

If that is the case, this seems likely to be a patchelf issue where your linux is (for some reason) unhappy with the alignment of something in that image. What version of glibc are you using?

@ghost
Copy link
Author

ghost commented Mar 5, 2020

What version of gcc?

output is from running gcc-5.5.0 / slackware-current would be gcc-9.2.0

What version of glibc are you using?

output is from running glibc-2.23 / slackware-current would be glibc-2.30

@staticfloat

I thought my improper alignment comment was sufficient, here's the English error message running in xterm, which also clarifies what I wrote about Julia messages assuming running in a UTF-8 LANG.

xterm

@ViralBShah
Copy link
Member

Could you try slackware-current?

@ghost
Copy link
Author

ghost commented Mar 6, 2020

Could you try slackware-current?

I've sent a query on the matter to a Slackware user community member.

@willysr
Copy link

willysr commented Mar 6, 2020

i tested on slackware64-current and it has the same results

@ViralBShah
Copy link
Member

How exactly are you building? What is the exact make incantation?

@willysr
Copy link

willysr commented Mar 6, 2020

I'm using the binary version and packaged using this script: https://slackbuilds.org/slackbuilds/14.2/development/julia/julia.SlackBuild (with some changes to build the latest one)

@ViralBShah
Copy link
Member

Can you try starting Julia from the downloaded tarball directly and see if it gives the same error?

@willysr
Copy link

willysr commented Mar 6, 2020

if i try to build it manually using make and run usr/bin/julia, it worked fine

i think the static version is the one have problems under slackware-current. probably a mismatch in some part

@ghost
Copy link
Author

ghost commented Mar 6, 2020

starting Julia from the downloaded tarball directly

uxterm

@ghost
Copy link
Author

ghost commented Mar 6, 2020

@willysr If on slackware64-current you move /usr/lib/julia/libsuitesparse_wrapper.so to libsuitesparse_wrapper.so.bak and copy from an extracted tarball the unstripped libsuitesparse_wrapper.so to /usr/lib/julia, do you get any load errors?

@staticfloat
Copy link
Member

Ah, yes, in the slack build instructions, it unconditionally strips all ELF objects:

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

This unfortunately sounds like a bad interaction between patchelf and strip, as documented here: NixOS/patchelf#10. Supposedly that should be fixed (and we do use patchelf 0.10 within BinaryBuilder, which should contain that fix) so either that patchelf fix is insufficient, or there's something else wrong with strip.

@ghost
Copy link
Author

ghost commented Mar 6, 2020

@staticfloat try ldd on the stripped and unstripped libsuitesparse_wrapper.so

@staticfloat
Copy link
Member

We historically don't strip our binaries for precisely this reason; if you download the latest Julia release, those libraries are unstripped. The only stripping is occuring on the Slackware side.

@willysr
Copy link

willysr commented Mar 7, 2020

let me try without stripping then

@ghost
Copy link
Author

ghost commented Mar 7, 2020

Which julia version began using patchelf?

A comment not to strip for julia >= version could be added in the .SlackBuild above the commented out strip lines.

@willysr
Copy link

willysr commented Mar 7, 2020

Yeah, removing stripping makes it work on slackware64-current here. Thanks

@ghost
Copy link
Author

ghost commented Mar 7, 2020

@staticfloat I'm inclined to close, with the possibility to reopen if the patchelf code changes.

@willysr I suppose the following would suffice in an eventual SlackBuilds.org update.

# Don't strip for julia >= 1.3.1.
# find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
#  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

@staticfloat
Copy link
Member

@staticfloat I'm inclined to close

Same.

Which julia version began using patchelf?

At the very least, since we started using precompiled binaries for most of our dependencies, which would be Julia 1.2+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:linux Affects only Linux
Projects
None yet
Development

No branches or pull requests

3 participants