lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

Make fails in standard Xenial environment #492

Closed waciuma4pivotal closed 5 years ago

waciuma4pivotal commented 5 years ago

A recent commit introduced a version check. But this version check relies on the argument version_greater_equal, which was introduced in CMake 3.7. Xenial apt-get installs CMake 3.5. The make command therefore fails, and users cannot install the CLI using the README instructions.

waciuma4pivotal commented 5 years ago

For users looking for a workaround, this script will allow you to install a recent CMake release on Ubuntu:

cd /tmp
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4.tar.gz
tar xzf cmake-3.13.4.tar.gz
cd cmake-3.13.4

./bootstrap
make -j2
sudo make install

Users can then run make in the lastpass-cli directory.

waterkip commented 5 years ago

Hi, I made a fix and tested it with a Docker build on Ubuntu 14.04

$ docker run --rm -ti lpass-ubuntu:latest bash
root@ccfbe7bd0cf6:/tmp/build# uname -a
Linux ccfbe7bd0cf6 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 x86_64 x86_64 GNU/Linux
root@ccfbe7bd0cf6:/tmp/build# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.6 LTS
Release:        14.04
Codename:       trusty
root@ccfbe7bd0cf6:/tmp/build# lpass --version
LastPass CLI v1.3.2.GIT
root@ccfbe7bd0cf6:/tmp/build# exit
waterkip commented 5 years ago

It seems that Travis has a different version of CMake of their Trusty image which make the test for older CMake's void. It doesn't seem to use the cmake shipped with Ubuntu Trusty. So the previous build succeeding was a false positive. Build https://travis-ci.org/lastpass/lastpass-cli/jobs/510090532 shows that cmake 2.8 isn't installed yet the compilation of lastpass succeeds.