Comments (16)
It could be that your IT uses different configuration for browser requests, and might be blocking other non-browser requests.
Can you try the same for example at home, and see if it works?
from conan.
It could be that your IT uses different configuration for browser requests, and might be blocking other non-browser requests.可能是您的 IT 部门对浏览器请求使用了不同的配置,可能会阻止其他非浏览器请求。
Can you try the same for example at home, and see if it works?例如,您可以在家里尝试同样的方法,看看是否有效?
Hi @memsharded, I had previously tried this example at home, and the error message is as shown above.
from conan.
Hi @memsharded, I had previously tried this example at home, and the error message is as shown above.
Sorry, just to make sure: did you try at home with the same computer, or with a different computer and outside of the corporate network? Because if you are at home with the same corporate laptop, probably connected to the office VPN, then, it would be identical to being in the office physically.
I am trying to isolate the possible issue, if it could be the VPN, the proxy, or it could be other thing.
from conan.
Hi @memsharded, I had previously tried this example at home, and the error message is as shown above.嗨 ,我之前在家里试过这个例子,错误信息如上图所示。
Sorry, just to make sure: did you try at home with the same computer, or with a different computer and outside of the corporate network? Because if you are at home with the same corporate laptop, probably connected to the office VPN, then, it would be identical to being in the office physically.对不起,我只是想确认一下:你是在家里用同一台电脑试的,还是在公司网络外用另一台电脑试的?因为如果你在家里使用的是公司的同一台笔记本电脑,可能还连接了办公室的 VPN,那么,这就和在办公室里的情况完全一样了。
I am trying to isolate the possible issue, if it could be the VPN, the proxy, or it could be other thing.我正试图找出可能的问题,是 VPN 的问题,还是代理的问题,或者是其他原因。
Hi @memsharded Thank you very much for your explanation and questions. I have been using my personal laptop at home to try it out, and my network environment is a non-corporate one. It is my home broadband, and I use a VPN to access GitHub (due to China's network policies that restrict access to GitHub without a VPN). The VPN I use is not a corporate VPN.
from conan.
If at home you have exactly the same issue, then I'd say that it seems the problem is the VPN might be filtering the Conan User-Agent
or something like that, and allowing only the browser user agents, that could explain the issue?
Can you please try doing a download of that url with the Python request
library?
import requests
url = 'https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz'
r = requests.get(url, allow_redirects=True)
open('myfile.tar.gz', 'wb').write(r.content)
from conan.
If at home you have exactly the same issue, then I'd say that it seems the problem is the VPN might be filtering the Conan
User-Agent
or something like that, and allowing only the browser user agents, that could explain the issue?如果您在家中遇到了完全相同的问题,那么我认为问题可能出在 VPN 上,VPN 可能过滤了柯南User-Agent
或类似的内容,只允许使用浏览器用户代理,这就能解释问题所在了吗?Can you please try doing a download of that url with the Python
request
library?您能否尝试使用 Pythonrequest
库下载该网址?import requests url = 'https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz' r = requests.get(url, allow_redirects=True) open('myfile.tar.gz', 'wb').write(r.content)
Sure, @memsharded
the python library works ok:
from conan.
Ok, that is at least a step forward.
To check if the user agent could be the issue:
import requests
import platform
url = 'https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz'
platform_info = "; ".join([" ".join([platform.system(), platform.release()]),
"Python "+platform.python_version(),
platform.machine()])
headers = {"User-Agent": f"Conan/2.3.1 ({platform_info})"}
r = requests.get(url, allow_redirects=True, headers=headers)
open('myfile.tar.gz', 'wb').write(r.content)
from conan.
Hi @memsharded
It also works ok
from conan.
I am really confused about this, I don't know what to think.
Have you tried to use Conan directly? I mean, it seems that you are calling it via xmake
from the traces above, but have you tried calling?:
conan version
conan install --requires=grpc/1.54.3 --build=missing
Just in case running from xmake could have some effect.
from conan.
I am really confused about this, I don't know what to think.我真的很困惑,不知道该怎么想。
Have you tried to use Conan directly? I mean, it seems that you are calling it via
xmake
from the traces above, but have you tried calling?:你试过直接使用柯南吗?我的意思是,从上面的痕迹来看,你是通过xmake
调用它的,但你有没有试过直接调用?conan version conan install --requires=grpc/1.54.3 --build=missing
Just in case running from xmake could have some effect.以防从 xmake 运行会产生影响。
Hi @memsharded
I Have tried
conan install --requires=grpc/1.54.3 --build=missing --profile:build=profile_build.txt --profile:host=profile_host.txt
or
conan install --requires=etcd-cpp-apiv3/0.15.4 --build=missing --profile:build=profile_build.txt --profile:host=profile_host.txt
But it still failed:
And more info about the profile_build.txt and profile_host.txt :
from conan.
I have just realized something, this doesn't seem to be a Conan download. It is not Conan that is downloading anything, it seems to be the CMakeLists.txt
that is downloading that file, here: https://github.com/grpc/grpc/blob/1309eb283c3e11c471191f286ceab01b75477ffc/CMakeLists.txt#L432
If it is CMake doing the download, not Conan, it doesn't matter what configuration (proxies, certs, etc) you pass to Conan, because it is not being used. To verify if CMake is the culprit, you might extract those lines to an independent CMakeLists.txt
and execute it with just cmake
and see what happens.
from conan.
I have just realized something, this doesn't seem to be a Conan download. It is not Conan that is downloading anything, it seems to be the
CMakeLists.txt
that is downloading that file, here: https://github.com/grpc/grpc/blob/1309eb283c3e11c471191f286ceab01b75477ffc/CMakeLists.txt#L432我刚刚意识到一件事,这似乎不是柯南的下载。下载文件的不是柯南,似乎是CMakeLists.txt
在下载该文件,网址是:https://github.com/grpc/grpc/blob/1309eb283c3e11c471191f286ceab01b75477ffc/CMakeLists.txt#L432。If it is CMake doing the download, not Conan, it doesn't matter what configuration (proxies, certs, etc) you pass to Conan, because it is not being used. To verify if CMake is the culprit, you might extract those lines to an independent
CMakeLists.txt
and execute it with justcmake
and see what happens.如果是 CMake 而不是 Conan 在进行下载,那么传给 Conan 的配置(代理、证书等)就无关紧要了,因为它并没有被使用。要验证 CMake 是否是罪魁祸首,你可以将这些行提取到一个独立的CMakeLists.txt
中,然后只用cmake
执行,看看会发生什么。
@memsharded
Thank you very much for your response. I just tried downloading using only the CMakeLists.txt:
cmake_minimum_required(VERSION 3.0.0)
# 定义下载 URL 和预期的 SHA256 校验和
# set(DOWNLOAD_URL "https://github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz")
# set(EXPECTED_SHA256 "dc305e20c9fa80822322271b50aa2ffa917bf4fd3973bcec52bfc28dc32c5927")
set(DOWNLOAD_URL "https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz")
set(EXPECTED_SHA256 "b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0")
# 创建一个临时文件用于下载
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/downloads")
# set(DOWNLOAD_FILE "${CMAKE_BINARY_DIR}/downloads/xds.tar.gz")
set(DOWNLOAD_FILE "${CMAKE_BINARY_DIR}/downloads/v0.3.0.tar.gz")
# 执行下载操作
file(DOWNLOAD "${DOWNLOAD_URL}" "${DOWNLOAD_FILE}"
SHOW_PROGRESS
EXPECTED_HASH SHA256=${EXPECTED_SHA256})
# 输出下载结果
if(EXISTS "${DOWNLOAD_FILE}")
message(STATUS "Download successful: ${DOWNLOAD_FILE}")
else()
message(FATAL_ERROR "Download failed")
endif()
and the result was:
cyq@DESKTOP-0LR5H32 MINGW64 /c/workspace/cmake_pratice/first_template/build (main)
$ cmake ..
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at CMakeLists.txt:16 (file):
file DOWNLOAD cannot compute hash on failed download
status: [35;"SSL connect error"]
-- Download successful: C:/workspace/cmake_pratice/first_template/build/downloads/v0.3.0.tar.gz
-- Configuring incomplete, errors occurred!
But I didn't have any idea about this error.
from conan.
I have try to download by the curl, and it failed either:
C:\Users\cyq>curl -L --verbose -o v0.3.0.tar.gz https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 142.251.42.251:443...
* Trying [2404:6800:4012:4::201b]:443...
* Connected to storage.googleapis.com (142.251.42.251) port 443
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Recv failure: Connection was reset
* schannel: failed to receive handshake, SSL/TLS connection failed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection
* schannel: shutting down SSL/TLS connection with storage.googleapis.com port 443
* Send failure: Connection was reset
* schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
curl: (35) Recv failure: Connection was reset
But I am still puzzled by the fact that the browser is able to download the file normally.
from conan.
The reasons why a browser might have access but other applications not, is because browsers might use different User-Agent
, might have different certificates installed, etc.
To summarize: This seems to confirm that it is not a Conan issue, but a network limitation issue on the user side, so this wouldn't be a Conan bug. I am afraid that we cannot do anything from the Conan side to solve it directly. What you can do is something like:
- Download the
tgz
files you want, put them in your own server (like ArtifactoryCE running in your network) - Fork
conan-center-index
, change theconandata.yml
to point them to your own copy of yourtgz
in your server - Create packages from
conan-center-index
fork.
from conan.
Can I manually download this tgz file and then copy it to a specific Conan directory, so that gRPC can be compiled successfully?
from conan.
Yes, the file:///
url is supported in the download()
and get()
methods, so it can be specified in conandata.yml
too.
The problem is that doing this packages will not be reproducible, this is why it is more recommended to put them in a server, for future reproducibility.
from conan.
Related Issues (20)
- [feature] Option to suppress generation of script files HOT 2
- [bug] Initial setup for Conan test suite is not automated or documented HOT 3
- [question] disable package revisions HOT 3
- [bug] `conan source` does not actually get `global.conf`'s `core.` confs HOT 1
- [question] Install a binary package without matching the compiler version HOT 3
- [question] preset name != profile name HOT 4
- [question] Include jinja profile template into another HOT 7
- [question] How to disable compatilibity? HOT 5
- [question] CMAKE_INSTALL_PREFIX in toolchain - local/cache build difference [conan 2] HOT 3
- [feature] Introduce os.version or os=Ubuntu in profiles HOT 2
- [question] PUBLIC compile definition not propagated HOT 3
- [question] How to access a value defined in the `[conf]` section of a profile? HOT 1
- [feature] Add properties to MakeDeps generator HOT 6
- [question] `conan create` complains about `settings.compiler.cppstd` HOT 7
- [question] Delete the Build Folder Beforehand if Exists HOT 5
- [bug] detect_api.detect_msvc_compiler() returns an incorrect version HOT 1
- [question] How to use source_buildenv HOT 5
- [question] Is it possible to check arguments passed in the CLI in the profiles? HOT 1
- [feature] Support source backups/fallback when a recipe uses Git tool HOT 2
- [question] How to use Ninja with `CMake` helper? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.