Libraries do not compile on Ubuntu:14.04
coryan opened this issue · 4 comments
coryan commented
Checking out the code and trying to compile does not work. My initial diagnostic:
- gRPC depends on either BoringSSL (as a submodule), or OpenSSL-1.0.2g.
- Ubuntu:14.04 installs OpenSSL-1.0.1 by default.
- Compiling OpenSSL-1.0.2 from source does not work because libcurl (which we use) on that platform cannot link against the 1.0.2 version.
- We can compile both OpenSSL and libcurl from source, but then things start to get silly, we probably should turn these libraries to external projects at this point.
coryan commented
Testing within Docker shows that it is possible to compile both OpenSSL and libcurl from source and then compile google-cloud-cpp. However, if OpenSSL or libcurl are already installed then the build breaks or generates many warnings.
coryan commented
These steps seems to workaround the problems:
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install -y cmake3 git gcc-4.9 g++-4.9 make wget zlib1g-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 100
cd /var/tmp/
sudo wget -q https://www.openssl.org/source/openssl-1.0.2n.tar.gz
sudo tar xf openssl-1.0.2n.tar.gz
cd /var/tmp/openssl-1.0.2n
sudo ./Configure --prefix=/usr/local --openssldir=/usr/local linux-x86_64 shared
sudo make -j $(nproc)
sudo make install
cd /var/tmp/
sudo wget -q https://curl.haxx.se/download/curl-7.61.0.tar.gz
sudo tar xf curl-7.61.0.tar.gz
cd /var/tmp/curl-7.61.0
sudo ./configure
sudo make -j $(nproc)
sudo make install
coryan commented
Yes. I cannot think of a better fix for this problem given what gRPC needs.