Closed thehcma closed 5 years ago
to copy lib we use https://github.com/google/or-tools/blob/76dd97b5272d7e90fd95dc774ac3e2152749683d/makefiles/Makefile.python.mk#L1016-L1022 to list lib in setup.py https://github.com/google/or-tools/blob/76dd97b5272d7e90fd95dc774ac3e2152749683d/makefiles/Makefile.python.mk#L880-L903
I agree, we could remove them from the python package, but it need extra works, not sure it worth it...
Also notice, to build the manylinux package we use the manylinux1
docker and auditwheel repair on the wheel package...
AFAIK it seems it's auditwheel repair
which is reponsible for breaking .so,
if locally, I build a linux package
for my debian like distro, symlink are replaced by hard copy but they are not broken...:
$ cd <OR_ROOT>
$ make python # using python3.5
...
$ make pypi_archive
...
$ ls -l temp_python3.5/ortools/ortools/.libs/libCoinUtils.so
lrwxrwxrwx 1 corentinl primarygroup 23 Dec 20 08:40 temp_python3.5/ortools/ortools/.libs/libCoinUtils.so -> libCoinUtils.so.3.10.14
$ cd temp_python3.5/ortools/dist
$ unzip ortools-7.0b6136-cp35-cp35m-linux_x86_64.whl
$ ls -lh ortools/.libs/libCoinUtils.so
-rwxr-xr-x 1 corentinl primarygroup 1.5M Dec 20 07:40 ortools/.libs/libCoinUtils.so
$ ldd ortools/.libs/libCoinUtils.so
linux-vdso.so.1 (0x00007ffc73f9c000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1724cfb000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1724976000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1724672000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f17242d3000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f17240bb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1725268000)
So won't fix, especially since Python2.7 will be soon obsolete.
After downloading
ortools-6.10.6025-cp27-cp27m-manylinux1_x86_64.whl
I noticed that two libraries that are being distributed are both broken (as well as, unnecessary in that form, in my personal view) since they are not being used anywhere (unless, of course, they will be symlinked as is tradition in unixworld - more on that below):How come this is failing? Well,
readelf
shows us that they are actually broken:As can be seen above, neither can be correctly read by ELF-processing tools.
Upon further inspection, the native Python modules using
libCoinUtils
point directly tolibCbc.so.3
(which is sane). See below:It seems to me, after looking at the source code distribution (e.g.,
or-tools_ubuntu-18.04_v6.10.6025.tar.gz
on github):that the intention was to distribute the versioned
.so
files as symlinks in the wheel, but that's not what we have.