dealing with java opened SSL errors

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

dealing with java opened SSL errors

Christopher Jones
Hi All,

I am trying to update a couple of ports, bazel and py-tensorflow, that require recent Java JDKs (10+) to build using macports provided openjdk ports.

I am running into the issue below

ERROR: /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/tensorflow-1.11.0/tensorflow/contrib/specs/BUILD:12:1: no such package '@six_archive//': java.io.IOException: Error downloading [<a href="https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz" class="">https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz] to /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/2a63a80994b2caa0df6e7bb7e2acb780/external/six_archive/six-1.10.0.tar.gz: All mirrors are down: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target] and referenced by '//tensorflow/contrib/specs:specs'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@six_archive//': java.io.IOException: Error downloading [<a href="https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz" class="">https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz] to /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/2a63a80994b2caa0df6e7bb7e2acb780/external/six_archive/six-1.10.0.tar.gz: All mirrors are down: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]

which appears to be that discussed in


I am unsure how best to proceed, not being that familiar with java. Is this something other ports have run into ?

any advice gratefully received.

cheers Chris

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: dealing with java opened SSL errors

Ryan Schmidt-24


On Nov 4, 2018, at 05:53, Christopher Jones wrote:

> Hi All,
>
> I am trying to update a couple of ports, bazel and py-tensorflow, that require recent Java JDKs (10+) to build using macports provided openjdk ports.
>
> I am running into the issue below
>
> ERROR: /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/tensorflow-1.11.0/tensorflow/contrib/specs/BUILD:12:1: no such package '@six_archive//': java.io.IOException: Error downloading [https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz] to /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/2a63a80994b2caa0df6e7bb7e2acb780/external/six_archive/six-1.10.0.tar.gz: All mirrors are down: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target] and referenced by '//tensorflow/contrib/specs:specs'
> ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@six_archive//': java.io.IOException: Error downloading [https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz, https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz] to /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_python_py-tensorflow/py36-tensorflow/work/2a63a80994b2caa0df6e7bb7e2acb780/external/six_archive/six-1.10.0.tar.gz: All mirrors are down: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
>
> which appears to be that discussed in
>
> https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html
>
> I am unsure how best to proceed, not being that familiar with java. Is this something other ports have run into ?
>
> any advice gratefully received.
>
> cheers Chris


I don't know about java, but the python portgroup deliberately disables the ability to download dependencies. We don't want ports to download things except during the fetch phase. And if a port has dependencies on other ports, it should declare them. It looks like py-tensorflow already declares a dependency on py-six, so there should be no reason for it to need to download six again. If its build system is hardcoded to do so anyway, you could patch it to stop it from doing that.


Reply | Threaded
Open this post in threaded view
|

Re: dealing with java opened SSL errors

Christopher Jones

I don't know about java, but the python portgroup deliberately disables the ability to download dependencies. We don't want ports to download things except during the fetch phase. And if a port has dependencies on other ports, it should declare them. It looks like py-tensorflow already declares a dependency on py-six, so there should be no reason for it to need to download six again. If its build system is hardcoded to do so anyway, you could patch it to stop it from doing that.

I would like to be able to do this but the bazel build system that py-tensorflow uses is not designed to allow it easily. It positively insists on controlling all aspects of the build, including dependencies. It was enough of a battle to get it to use macports provided compilers, when needed….

I am not saying it is impossible, I just do not know how. See for instance


Its just really really complicated and frankly I don’t have the enthusiasm to work out how to do it…

bazel and py-tensorflow currently build fine, albeit with their own dependencies, when Oracle’s JDK 10+ is installed. I am just looking at the moment to allow OpenJDK to be used as well.

Chris

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: dealing with java opened SSL errors

Ryan Schmidt-24


On Nov 4, 2018, at 08:14, Christopher Jones wrote:

>> I don't know about java, but the python portgroup deliberately disables the ability to download dependencies. We don't want ports to download things except during the fetch phase. And if a port has dependencies on other ports, it should declare them. It looks like py-tensorflow already declares a dependency on py-six, so there should be no reason for it to need to download six again. If its build system is hardcoded to do so anyway, you could patch it to stop it from doing that.
>
> I would like to be able to do this but the bazel build system that py-tensorflow uses is not designed to allow it easily. It positively insists on controlling all aspects of the build, including dependencies. It was enough of a battle to get it to use macports provided compilers, when needed….
>
> I am not saying it is impossible, I just do not know how. See for instance
>
> https://docs.bazel.build/versions/master/external.html
>
> Its just really really complicated and frankly I don’t have the enthusiasm to work out how to do it…
>
> bazel and py-tensorflow currently build fine, albeit with their own dependencies, when Oracle’s JDK 10+ is installed. I am just looking at the moment to allow OpenJDK to be used as well.

Ah, ok. I'm not familiar with bazel. Here's how downloading dependencies was disabled in the python portgroup:

https://github.com/macports/macports-ports/commit/a0833320f5342a0876a8a5c59320feedc8d87411

What you're seeing is probably unrelated then, but you could try reverting that change to make sure.

Reply | Threaded
Open this post in threaded view
|

Re: dealing with java opened SSL errors

Christopher Jones

>>> I don't know about java, but the python portgroup deliberately disables the ability to download dependencies. We don't want ports to download things except during the fetch phase. And if a port has dependencies on other ports, it should declare them. It looks like py-tensorflow already declares a dependency on py-six, so there should be no reason for it to need to download six again. If its build system is hardcoded to do so anyway, you could patch it to stop it from doing that.
>>
>> I would like to be able to do this but the bazel build system that py-tensorflow uses is not designed to allow it easily. It positively insists on controlling all aspects of the build, including dependencies. It was enough of a battle to get it to use macports provided compilers, when needed….
>>
>> I am not saying it is impossible, I just do not know how. See for instance
>>
>> https://docs.bazel.build/versions/master/external.html
>>
>> Its just really really complicated and frankly I don’t have the enthusiasm to work out how to do it…
>>
>> bazel and py-tensorflow currently build fine, albeit with their own dependencies, when Oracle’s JDK 10+ is installed. I am just looking at the moment to allow OpenJDK to be used as well.
>
> Ah, ok. I'm not familiar with bazel. Here's how downloading dependencies was disabled in the python portgroup:
>
> https://github.com/macports/macports-ports/commit/a0833320f5342a0876a8a5c59320feedc8d87411
>
> What you're seeing is probably unrelated then, but you could try reverting that change to make sure.
>

As it turns out I think the issue is specific to OpenJDK 10. Using
OpenJDK 11 this issue goes away..

Chris