Skip to content
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

Libraries do not compile on Ubuntu:14.04 #913

Closed
coryan opened this issue Jul 21, 2018 · 4 comments
Closed

Libraries do not compile on Ubuntu:14.04 #913

coryan opened this issue Jul 21, 2018 · 4 comments
Assignees
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@coryan
Copy link
Contributor

coryan commented Jul 21, 2018

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 coryan added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jul 21, 2018
@coryan
Copy link
Contributor Author

coryan commented Jul 21, 2018

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
Copy link
Contributor Author

coryan commented Jul 21, 2018

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 added a commit to coryan/google-cloud-cpp that referenced this issue Jul 21, 2018
Reduce the number of dependencies to install, use Dockerfiles to
test the steps. Add documentation for OpenSuSE, clarify that the
steps for Ubuntu Bionic also work for Ubuntu Xenial. Sadly the
steps for Ubuntu Trusty are quite convoluted, created googleapis#913 to
improve that. Add the steps for Debian Stretch.
coryan added a commit that referenced this issue Jul 25, 2018
* Improve README steps to build the system [skip ci].

Reduce the number of dependencies to install, use Dockerfiles to
test the steps. Add documentation for OpenSuSE, clarify that the
steps for Ubuntu Bionic also work for Ubuntu Xenial. Sadly the
steps for Ubuntu Trusty are quite convoluted, created #913 to
improve that. Add the steps for Debian Stretch.

* Address review comments [skip ci].

* Addressed review comments. [skip ci]

* Address review comments and typos [skip ci].
coryan added a commit to coryan/google-cloud-cpp that referenced this issue Jul 25, 2018
* Improve README steps to build the system [skip ci].

Reduce the number of dependencies to install, use Dockerfiles to
test the steps. Add documentation for OpenSuSE, clarify that the
steps for Ubuntu Bionic also work for Ubuntu Xenial. Sadly the
steps for Ubuntu Trusty are quite convoluted, created googleapis#913 to
improve that. Add the steps for Debian Stretch.

* Address review comments [skip ci].

* Addressed review comments. [skip ci]

* Address review comments and typos [skip ci].
@mbrukman mbrukman added the docs label Aug 1, 2018
@mbrukman
Copy link
Contributor

mbrukman commented Aug 1, 2018

@coryan — given that PR #914 was merged, can this issue be closed?

@coryan
Copy link
Contributor Author

coryan commented Aug 1, 2018

Yes. I cannot think of a better fix for this problem given what gRPC needs.

@coryan coryan closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants