pfultz2/cget-recipes

Failed to install boost

Yevgnen opened this issue · 10 comments

Hi, the boost link seems no long reachable. Should I report it here?

 $ cget install boost
Downloading https://github.com/boost/boost/archive/HEAD.tar.gz
  [----------------------------------------------------------------------]    0%
Unexpected error: <class 'ZeroDivisionError'>
division by zero
Failed to build package boost

May I ask one more question? Should I request a different version of package here? For example I'd like to use the armadillo 8.3 while cget has an older version 7.8. Thank you very much!


Updated: It seems that I should run cget install pfultz2/cget-recipes before cget install boost. However, the previous command gives the same error but I can access it in a browser.

Hi, the boost link seems no long reachable. Should I report it here?

A error like that means it failed to find a recipe for boost(as it is falling back on calling to github).

Updated: It seems that I should run cget install pfultz2/cget-recipes before cget install boost. However, the previous command gives the same error but I can access it in a browser.

Which command gives the same error? And what is the output of the command? It could be that sourceforge is down(as it does go down every now and then).

May I ask one more question? Should I request a different version of package here?

Do you have the url for the source package? I think that is all that is needed to support a newer version. I can then update the recipe file. Also, you can also just manually update it, when installing with:

cget install pfultz2/cget-recipes armadillo
cget install -U armadillo,http://sourceforge.net/projects/arma/files/armadillo-8.300.1.tar.xz

I dont know if that is the correct url, so you will need to double check.

Hi, thanks for you reply. The cget install pfultz2/cget-recipes give the same error as cget install boost

 $ cget install pfultz2/cget-recipes
Downloading https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
  [----------------------------------------------------------------------]    0%
Unexpected error: <class 'ZeroDivisionError'>
division by zero
Failed to build package pfultz2/cget-recipes

 $ cget install boost
Downloading https://github.com/boost/boost/archive/HEAD.tar.gz
  [----------------------------------------------------------------------]    0%
Unexpected error: <class 'ZeroDivisionError'>
division by zero
Failed to build package boost

I don't use a proxy and cget 0.1.4 is installed under python3.6.3.

About the multiple versions of a package, should one always need to provide urls for them rather than something like pip install numpy==0.12.0/pip install numpy>=0.13.1?

Can you show the output using verbose: cget install pfultz2/cget-recipes --verbose? I wonder why the division by zero is happening.

Sure. I didn't know about the --verbose before...

 $ cget install pfultz2/cget-recipes --verbose
parse_pkg_src: None pfultz2/cget-recipes pfultz2/cget-recipes
parse_src_file actual_path: None /Users/user/Downloads/pfultz2/cget-recipes
fetch: https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
Downloading https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
  [----------------------------------------------------------------------]    0%
Unexpected error: <class 'ZeroDivisionError'>
division by zero
Failed to build package pfultz2/cget-recipes
Unlink: /Users/user/Downloads/cget/cget/pkg/pfultz2__cget-recipes
Traceback (most recent call last):
  File "/usr/local/bin/cget", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/cget/cli.py", line 42, in w
    f(p, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/cget/cli.py", line 95, in install_command
    click.echo(prefix.install(pb, test=test, test_all=test_all, update=update, generator=generator, insecure=insecure))
  File "/usr/local/lib/python3.6/site-packages/cget/prefix.py", line 290, in install
    src_dir = builder.fetch(pb.pkg_src.url, pb.hash, (pb.cmake != None), insecure=insecure)
  File "/usr/local/lib/python3.6/site-packages/cget/builder.py", line 37, in fetch
    f = util.retrieve_url(url, self.top_dir, copy=copy, insecure=insecure, hash=hash)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 216, in retrieve_url
    f = download_to(url, dst, insecure=insecure) if remote else transfer_to(url[7:], dst, copy=copy)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 202, in download_to
    request.FancyURLopener(context=context).retrieve(url, filename=file, reporthook=hook, data=None)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1817, in retrieve
    reporthook(blocknum, bs, size)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 195, in hook
    percent = int(count*block_size*bar_len/total_size)
ZeroDivisionError: division by zero

So, this happens because the total_size is zero, which is most likely because there was an error reported in http. On the master branch, I have change this to report the http error. Let me setup a release for this.

It may be the case that ssl is not setup properly with python. As a workaround, you can use --insecure flag to disable https.

The --insecure flag just gives the same error...

Try to install cget from master with pip install git+https://github.com/pfultz2/cget.git@master, this should give the http error.

And it now becomes

$ cget install pfultz2/cget-recipes --verbose
parse_pkg_src: None pfultz2/cget-recipes pfultz2/cget-recipes
parse_src_file actual_path: None /Users/user/pfultz2/cget-recipes
fetch: https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
Downloading https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
  [----------------------------------------------------------------------]    0%
Download failed with error 500 for: //github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz
Failed to build package pfultz2/cget-recipes
Unlink: /Users/user/cget/cget/pkg/pfultz2__cget-recipes
Traceback (most recent call last):
  File "/usr/local/bin/cget", line 11, in <module>
    load_entry_point('cget==0.1.5', 'console_scripts', 'cget')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/cget/cli.py", line 44, in w
    f(p, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/cget/cli.py", line 97, in install_command
    click.echo(prefix.install(pb, test=test, test_all=test_all, update=update, generator=generator, insecure=insecure))
  File "/usr/local/lib/python3.6/site-packages/cget/prefix.py", line 291, in install
    src_dir = builder.fetch(pb.pkg_src.url, pb.hash, (pb.cmake != None), insecure=insecure)
  File "/usr/local/lib/python3.6/site-packages/cget/builder.py", line 37, in fetch
    f = util.retrieve_url(url, self.top_dir, copy=copy, insecure=insecure, hash=hash)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 225, in retrieve_url
    f = download_to(url, dst, insecure=insecure) if remote else transfer_to(url[7:], dst, copy=copy)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 209, in download_to
    CGetURLOpener(context=context).retrieve(url, filename=file, reporthook=hook, data=None)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1791, in retrieve
    fp = self.open(url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2136, in http_error_302
    headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2167, in redirect_internal
    return self.open(newurl)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1757, in open
    return getattr(self, name)(url)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1936, in open_http
    return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http
    response.status, response.reason, response.msg, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1948, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2171, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2134, in http_error_302
    headers)
  File "/usr/local/lib/python3.6/site-packages/cget/util.py", line 192, in http_error_default
    raise BuildError("Download failed with error {0} for: {1}".format(errcode, url))
cget.util.BuildError: Download failed with error 500 for: //github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz

Looks missing http somewhere?

Looks missing http somewhere?

No, thats expected. Python strips the protocol at this point, but the first url list does contain the https. What happens when using curl https://github.com/pfultz2/cget-recipes/archive/HEAD.tar.gz?

Just fine...
screen shot 2017-12-14 at 12 23 26 pm