Closed dsyme closed 3 years ago
We are now building on Ubuntu 18.04. I will leave this open as I expect there are problems with this and our build should likely pin down the libc and libc++ runtimes.
We still have this issue:
/root/.nuget/packages/torchsharp/0.91.52475/runtimes/linux-x64/native/libLibTorchSharp.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /root/.nuget/packages/torchsharp/0.91.52475/runtimes/linux-x64/native/libLibTorchSharp.so)
Looking at https://stackoverflow.com/questions/46809303/how-to-static-linking-to-glibc-in-cmake as a solution
From chat with @migueldeicaza
[22:22] Don Syme So libtorch is a single set of Linux binaries, and we want to add one binary to that using the same dependency assumptions they're using.
On the whole that's what we seem to be doing - we're picking up the Cmake settings from Libtorch distro and everything seems generally ok. However somehow the way we're compiling on Ubuntu 18.04 (with a few updated packages I think) seems to cause problems when running on other Ubuntu 18.04 PyTorch says this:
PyTorch is supported on Linux distributions that use glibc >= v2.17, which include the following:
Arch Linux, minimum version 2012-07-15
CentOS, minimum version 7.3-1611
Debian, minimum version 8.0
Fedora, minimum version 24
Mint, minimum version 14
OpenSUSE, minimum version 42.1
PCLinuxOS, minimum version 2014.7
Slackware, minimum version 14.2
Ubuntu, minimum version 13.04
My specific problem is that binaries built with Ubuntu 18.04 on Azure CI don't run on the Ubuntu 18.04 containers used by Google Colab.
I determined the approximate reason. The Ubuntu 18.04 CI machines in Azure must have some updated packages e.g. they have an updated /usr/lib/x86_64-linux-gnu/libstdc++.so.6 and using
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX
gives
...
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
Whereas the colab containers only report:
...
GLIBCXX_3.4.24
GLIBCXX_3.4.25
I guess I should be using a more controlled Ubuntu 18.04 container for the build
I have switched to using a 16.04 container from one of the Microsoft container registry containers, see the list available here:
This is a tracking issue for Linux binary comptibility issues for the native code component.
Currently we build this on Ubuntu 18.04
Original issue:
The
libLibTorchSharp.so
we create has a GLIBC_2.30 dependency. I don't fully understand why - it could be as simple as the fact that we build on an Ubunutu 20.04 machine, though it would be good to control the dependency betterUbuntu 18.04 only has GLIBC_2.27 by default or something like that.
On an Ubuntu 28.04 Colab machine: