Dear members of the Foldit team.
I'm trying to use the latest distribution of FolditStandalone in Ubuntu but the executable has problems in finding the required libraries to run, for instance I get this kind of problem that was not an issue on the previous version:
./FolditStandalone: error while loading shared libraries: libtorch_cpu.so: cannot open shared object file: No such file or directory
Even if I update the environment variable $LD_LIBRARY_PATH with the path to this specific library, others also are not found for some reason.
Would you have a YAML file with all dependencies necessary for it to run in a conda environment?
Thank you very much!
I have also encountered this problem on Linux Mint 19.1, which is based on Ubuntu, when I tried to run the linux_x64-20230110 version of FolditStandalone.
Symbolic link of the libraries (libtorch_cpu.so, libc10.so) to the directory that contains the standalone executable removed those errors. But there's still a problem with the missing glibc version (libstdc++.so.6: version GLIBCXX_3.4.26 not found).
For several reasons I can't update the glibc/gcc/libstdc++ of this computer at this moment nor setup a conda environment for the newer glibc version, so I cannot test if the symbolic links have actually solved the problem.
I assume a possible solution would be:
- symbolic link of libtorch_cpu.so and libc10.so if the LD library path is not working for some reasons
- (error message gone in my test after doing so)
- make sure the libstdc++ support version glibcxx 3.4.26
- (I think it means gcc 9 + libstdc++6, maybe can be installed with the corresponding libstdcxx version in a conda environment, can't test it at this moment)
For now I am switching between the latest FolditStandalone on Windows and Rosetta 3.12 on Linux if I want to prepare a small molecule design puzzle, or to test with neural mutate in a custom protein design puzzle.
But please let me know if you find what I assume could really solve the problem. Thanks in advance!
(Edit: typos in version numbers)
(Edit 2: additional notes for clarity)
Thanks a lot, rosie! Your suggestions solved the problem! I basically created symbolic links to all required libraries in the executable directory and now it works perfectly.
Cheers!
I'm still getting a single problem though:
./FolditStandalone: symbol lookup error: ./FolditStandalone: undefined symbol: _ZN5torch3jit4loadERKSsN3c108optionalINS3_6DeviceEEE
This happens when I try predicting sidechains with the neural network algorithm. If I find any solution I'll post it here.
That mangled string translates down to "torch::jit::load(std::basic_string<char, std::char_traits, std::allocator > const&, c10::optional)". Chances are your version of torch doesn't have that function. It looks like a pytorch commit 8 months ago (https://github.com/pytorch/pytorch/commit/b8ba4802feb67f97b6e918ecc7a0c0c5c52f3dda) broke the ABI by adding a default parameter -- try a version older than 2.0.0.
GLIBCXX_3.4.26 is a system dependency and requires a newer libstdc++. Commit history in the gcc tree indicates that GLIBCXX_3.4.26 was first introduced in 2018, but it is not unusual for Debian "st[a]ble" and Ubuntu LTS to fall that much behind.
And here I am getting real weirded out by what I'm seeing (sorry I use Windows daily, so what's in the tarball is all new to me). It looks like there actually is a bundled libtorch_cpu??? How come the bundled version does not match the version the program wants???
The two 200 MB libraries look fun, but it looks like they are just really full of symbols. I guess that's how it goes.
There's bundled libtorch in Windows version of folditstandalone but not linux version. (Folditstandalone is not the Foldit game)
The two libraries are provided in the game version in linux under the "binary-xxxxxx" directory.
Im not sure if linking to the library from the game version to standalone could help to solve the version conflict? I'm running simulation on my Linux workstation so dont wanna touch it at the moment.
Foldit should provide the copy of the torch library it wants. (It should not have a dependency on the system libtorch library.)
We'll have to take a look, but it may be that some versions of the Standalone client didn't get properly bundled with the libtorch library. If that's the case, "stealing" the game version of the library should likely work. (There's some potential version differences, but I don't think we're done much updating of the version of libtorch Foldit uses, and the game and standalone should use the same version.
FWIW, Foldit-linux_x64.tar.gz downloaded yesterday (when I posted that comment) has libtorch_cpu and libc10 bundled in cmp-binary-*. libstdc++ is left as a system dependency.
Both Windows and Linux versions seem to have a very oversized libtorch_cpu – debug symbols coming from non-foldit code? Well, that's more suitable for another topic.
Thanks rmoretti for the information! I'll try it later.
@Artoria2e5 FolditStandalone is the Academic version, offline, for research. It's downloaded from a separate website and require a license.
Foldit game download from this website indeed has the two libraries.