conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.18k stars 976 forks source link

Configure firewall proxy to Conan build system #10242

Closed alexaagithuber closed 3 days ago

alexaagithuber commented 2 years ago

I am trying to compile a SDK released on GitHub to integrate Alexa skills. GitHub link of the SDK is: https://github.com/alexa/alexa-auto-sdk

Readme says that SDK can be compiled using their builder tool which is based on Conan build system. Since my system works under a firewall, I will have to provide proxy config to bypass it for the builder tool to work.

I tried adding in ~/.conan/.conan.conf, but it does not work. I also did not find any documentation on how to configure proxy so that dependencies are downloaded by the package manager. Can someone please help me where do I add the proxy configuration for Conan build system.

lasote commented 2 years ago

Hi, yes, the way to configure the proxies is at the conan.conf at ~/.conan

Could you paste here some traces to see at which point is the Alexa build failing?

alexaagithuber commented 2 years ago

Following is the error thrown:

ERROR: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

alexaagithuber commented 2 years ago

And I have specified the proxy config under [proxies] in ~/.conan/conan.conf. One interesting thing is, conan inspect poco/1.9.4 works and prints the inspection log. Since conan inspect works, I am sure my proxy config is correct.

lasote commented 2 years ago

I would need more lines to see the context of the build process:

ERROR: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

alexaagithuber commented 2 years ago

There are no much logs printed other than the above. I'm not quite sure on the information that might help you to further triage this issue. This issue is easily reproducible where you can git clone the Alexa SDK from https://github.com/alexa/alexa-auto-sdk and run the below command: .builder/build.py -p linux --arch=x86_64

Note: Your system must have proxy enabled for Conan to hit this issue.

memsharded commented 3 days ago

Sorry this was not followed up back then.

I am closing this ticket as outdated now, as Conan 2 defines new global.conf mechanism to defines things like proxies. So please create an updated ticket for this against Conan 2.X if necessary with the following details:

Many thanks for your feedback.