cling icon indicating copy to clipboard operation
cling copied to clipboard

CPT Crashes on MacOS

Open milo-trujillo opened this issue 5 years ago • 5 comments

Attempting to install from source, but when I run ./cpt.py --check-requirements I get the following crash:

+-----------------------------------------------------------------------------+
| Check availability of required softwares                                    |
+-----------------------------------------------------------------------------+
git                 [OK]                          
Traceback (most recent call last):
  File "tools/packaging/cpt.py", line 1916, in <module>
    check_mac('cmake')
  File "tools/packaging/cpt.py", line 1501, in check_mac
    if not check_version_string_ge(exec_subprocess_check_output('{cmake} --version'.format(cmake=CMAKE), '/').strip().split('\n')[0].split()[-1], '3.4.3'):
IndexError: list index out of range

I've tried running from both the top level and the packaging folder, with Python 2 and 3. I am running MacOS 10.13. Any ideas?

milo-trujillo avatar Nov 16 '18 19:11 milo-trujillo

Traceback (most recent call last): File "./cpt.py", line 1842, in <module> check_ubuntu('cmake') File "./cpt.py", line 719, in check_ubuntu if not check_version_string_ge(exec_subprocess_check_output('{cmake} --version'.format(cmake=CMAKE), '/').strip().split('\n')[0].split()[-1], '3.4.3'): IndexError: list index out of range

reeshabhranjan avatar Jul 10 '19 15:07 reeshabhranjan

Thanks for reporting. Can you tell the output of cmake --version?

vgvassilev avatar Jul 10 '19 18:07 vgvassilev

I did not have cmake installed, which is no doubt the problem. Better error reporting around this dependency would be great!

Now that I've installed cmake version 3.15.0-rc4, I have a new error:

+-----------------------------------------------------------------------------+
| Check availability of required softwares                                    |
+-----------------------------------------------------------------------------+
git                 [OK]                          
Traceback (most recent call last):
  File "./cpt.py", line 1916, in <module>
    check_mac('cmake')
  File "./cpt.py", line 1501, in check_mac
    if not check_version_string_ge(exec_subprocess_check_output('{cmake} --version'.format(cmake=CMAKE), '/').strip().split('\n')[0].split()[-1], '3.4.3'):
  File "./cpt.py", line 691, in check_version_string_ge
    version_fields = [int(x) for x in vstring.split('.')]
ValueError: invalid literal for int() with base 10: '0-rc4'

So it looks like the dependency script doesn't like the latest release off the cmake site. Installing the latest stable release (3.14.5) works as intended.

milo-trujillo avatar Jul 10 '19 23:07 milo-trujillo

Thanks for reporting. Can you tell the output of cmake --version?

I installed cmake and then tried. I get another error:

Traceback (most recent call last): File "./cpt.py", line 1844, in <module> check_ubuntu('g++') File "./cpt.py", line 745, in check_ubuntu if float(exec_subprocess_check_output('g++ -dumpversion', '/')[:3].strip()) <= 4.7: ValueError: could not convert string to float:

reeshabhranjan avatar Jul 12 '19 14:07 reeshabhranjan

Could you tell me what's the output of g++ -dumpversion?

vgvassilev avatar Jul 14 '19 20:07 vgvassilev