Building out of the box
Building using docker/*.Dockerfile doesn't work out of the box. Not for me at least. Here is a list of some bugs and some annoyances. I am using the dockerfiles in the baseline but not the actual build scripts.
docker/centos8.Dockerfile:
-
Need to rename PowerTools -> powertools (upstream change in CentOS 8)
-
Building C++ "Release" causes several unit tests to crash. Need to use RelWithDebug, and copy the results to where a Release build would have put them.
-
Note that boost 1.6.9 is installed in the docker image but not used, unless BOOST_INCLUDEDIR and BOOST_LIBRARYDIR is manually set.
-
Note that Release libraries are installed to lib/ while Debug libraries are below lib64. Long live consistency.
-
Need to edit the dockerfile to also install python3-devel to get the wheel built. I used "python3 setup.py --build-type RelWithDebug bdist_wheel" to do the actual build. Later attempts also disabled AWS, AZURE, etc.
-
The Python wheel still didn't work for CentOS 8, even after fixing things so Python was found. Reason: Since I had to use "RelWithDebug" for the C++ API I assumed the same applied to Python. Not so. In fact, "RelWithDebug" silently fails in that case. The wheel, while created, is still incomplete.
docker/centos7.Dockerfile:
- The dockerfile installs devtoolset-8 while the build script tries to use devtoolset-7.
docker/ubuntu-20.04.Dockerfile:
-
dlopen() and dlclose missing. Add the following to src/OpenVDS/CMakeLists.txt. Only needed for Ubuntu, but it appears to be harmless to do it for all.
target_link_libraries(openvds_objects PRIVATE ${CMAKE_DL_LIBS})
-
Python is not found, need to edit CMakeLists.txt look for Python3 and replace Development.Module with just Development. Note, I applied this to CentOS as well but I have not verified that it was needed there.
All:
-
When building sdapi (dms) on Linux, the library ends up as libsdapi.so.0.0 instead of the version (3.14 currently) found in src/src/core/SDVersion.h. Either the OpenVDS build is not using the devops/scripts/build-linux64.sh script (which does sound likely) or there is some problem with some of the other rules. The "0.0" version causes problems if an application uses both OpenVDS and some other module using sdapi.
-
When something goes wrong building the Python wheel it is not obvious that there is a problem. I use "python3 setup.py bdist_wheel". Later attempts also disabled AWS, AZURE, etc. The wheel gets created but it is missing key files. Trying to install the wheel and import it gives an error about openvds core not available. Buried somewhere in the build logs I see a message about "Cannot find Python3, found version 3.6.8. Which is itself pretty confusing. It sounds like, "I found it, but I didn't find it". What to do with such errors is not obvious.