FluxML / Torch.jl

Sensible extensions for exposing torch in Julia.
Other
211 stars 14 forks source link

Required version of glibc? #17

Open DilumAluthge opened 4 years ago

DilumAluthge commented 4 years ago

Does Torch.jl require that my system has a particular version of glibc? If so, what are the compatible versions of glibc?

DhairyaLGandhi commented 4 years ago

That shouldn't be necessary. We just used the glibc as provided by the build environment, which shouldn't be hard linked.

DilumAluthge commented 4 years ago

On Slack, @maleadt suggested that this might be due to the fact that we use the official binaries.

Here's the error that I got on a RHEL 7.3 system with glibc 2.17:

ERROR: LoadError: InitError: could not load library "/users/daluthge/.julia/artifacts/d6ce2ca09ab00964151aaeae71179deb8f9800d1/lib/libdoeye_caml.so"
/lib64/libm.so.6: version `GLIBC_2.23' not found (required by /users/daluthge/.julia/artifacts/d6ce2ca09ab00964151aaeae71179deb8f9800d1/lib/libtorch.so)
DilumAluthge commented 4 years ago

Whoops @dhairyagandhi96 just saw your reply on Slack.

LeeLizuoLiu commented 3 years ago

@DilumAluthge Hi, could you please share how to handle this issue? I met the same error when precompiling Torch.jl.

DilumAluthge commented 3 years ago

It's been so long, that I don't remember now. @maleadt or @staticfloat will probably know.

LeeLizuoLiu commented 3 years ago

@DilumAluthge Thanks for your reply, could you please tell me which channel it is on Slack you mention above?

DilumAluthge commented 3 years ago

Hmmm. Probably I asked in either #gpu or #binarybuilder. I doubt the conversation is still there though; it has almost certainly been lost to the "Slack memory hole".

LeeLizuoLiu commented 3 years ago

Yeah, I tried to search on slack, there is nothing. Thanks.

DilumAluthge commented 3 years ago

Tim or Elliot will be able to help. We can ping them again if they don't reply within a couple weeks.

staticfloat commented 3 years ago

The problem

libtorch.so is looking for symbols in libm.so that are from a newer version of glibc than your system has installed. This is because the recipe doesn't actually build torch, it just re-bundles prebuilt binaries from elsewhere.

The workaround

If you download a newer libm.so, you can probably LD_PRELOAD that and get this to work, but that's kind of a poor workaround. I think a better fix would be for us to actually build libtorch instead of repackaging binaries built elsewhere that don't conform to our stringent platform specifications (such as not requiring such recent versions of glibc)

LeeLizuoLiu commented 3 years ago

Thanks for your advice, will this problem be fixed in the future version of Torch.jl?