-
Notifications
You must be signed in to change notification settings - Fork 945
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
Cannot Compile with libtorch #966
Comments
Thanks for reporting. It was also mentioned here, a few days back: #872 (comment) Yeah, exactly.. my guess is the newest version of PyTorch uses a different abseil version than we download in our install script and the mismatch will cause naming/symbol problems. This problem has come up several times before and it's always the same fix: simply match the abseil versions with the one used by the external library. It occurs because abseil is a compile-only library. So when different projects use different versions of it, the compiler gets confused because of the conflicting signatures (or missing functions) between versions. Problem is I'm super overloaded in the next week.. so I might not get to it for a while. I think it will be as easy as just checking out the matching version or commit used by the PyTorch version in install.sh. So all we'd have to do is verify which one it is and change it in install.sh. However, I am slightly worried that it might conflict with OR-Tools (another optional dependency) which also requires a specific version -- that's the one OpenSpiel downloads :) Longer-term we'll have to build something in so we can pass the abseil version to the install script. So I'd appreciate help anybody is willing to give to help fix this. Otherwise, I'll take a look once I'm a bit less busy. |
Hi @mcc311,
|
Oh hold on a second... looking back, we updated our version of abseil on Jan 3rd of this year: ccd9ddc And the thread you replied to seem to a few days back seemed to have a problem installing it in June. I wonder if it's been broken since then, actually (yikes!). Maybe we needed to upgrade the version of LibTorch we were downloading. I see that our global variables script downloads 1.5.1 here, which is quite old actually. So I think it's probably as easy as upgrading to a version that was current on Jan 3rd, 2022. I found the previous versions here but no dates. Assuming they match the PyTorch versions, PyPI's release history is showing 1.10.1 was current in January. So my guess is changing the version of the LibTorch download URL (in |
Try changing the URL in the
|
hi @lanctot,
I use Ubuntu 22.04 LTS, and no, I didn't use Docker but only run on my local pc.
And yes, I try to use older version of pytorch, the previous linking error don't show anymore. But it came a new redefinition problem with pybind11 like:
I guess these pybind11s in both open_spiel/libtorch/libtorch/include/pybind11 and open_spiel/python/pybind11/ might conflict with each other, so I renamed the folder under libtorch to open_spiel/libtorch/libtorch/include/pybind11_ (uninclude it), and it can build and pass all the tests now. I don't think it's a good way with stability, but it can work currently. Hope this imformation would help. |
Wow, that's too bad, but I'm glad it works now. I'll refer back to your solution in the docs until we can fix this properly, so let's keep this issue open for now. |
Hi, I met few problems when I try to compile with librtorch.
I can use this Open Spiel without libtorch correctly, but when I:
And I met these errors: Full Version
And I think the problem might be related to linking with ABSL?
Please help me solving this problem, big thank you!
The text was updated successfully, but these errors were encountered: