Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to conancenter #49

Open
AbhishankarBM opened this issue Nov 28, 2023 · 4 comments
Open

Unable to connect to conancenter #49

AbhishankarBM opened this issue Nov 28, 2023 · 4 comments
Assignees

Comments

@AbhishankarBM
Copy link

AbhishankarBM commented Nov 28, 2023

I am using meta-conan with my yocto sdk and when I try to do the below in in yocto recipe,
conan install --requires=mosquitto/1.4.15@bincrafters/stable --profile default -of /home/user

I am getting an error which says,

| ======== Computing dependency graph ========
| mosquitto/1.4.15@bincrafters/stable: Not found in local cache, looking in remotes...
| mosquitto/1.4.15@bincrafters/stable: Checking remote: conancenter
| Graph root
| cli
| ERROR: Package 'mosquitto/1.4.15@bincrafters/stable' not resolved: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fb5a7f33d30>, 'Connection to center.conan.io timed out. (connect timeout=30)'))

@memsharded memsharded self-assigned this Nov 28, 2023
@memsharded
Copy link
Member

There are 2 issues there:

  • mosquitto/1.4.15@bincrafters/stable is a very old, legacy package from years ago that it is not in ConanCenter at all. That is from the bincrafters community. You should be looking for the modern alternatives in ConanCenter https://conan.io/center
  • A different story is the lack of connection. That could be related to company proxies, vpn, zscaler or network issue. Please let us know about this.

@AbhishankarBM
Copy link
Author

AbhishankarBM commented Nov 28, 2023

  • I tried to use the latest versions from ConanCenter aswell but I was getting the same error. I also tried to pull the packages which I created from JFrog, even then I had the same error.
  • Regarding the Network settings, I can do 'conan install' of any package when using conan normally in a project with conanfile.txt or conanfile.py, but I am facing this error only when I am doing 'conan install' from my yocto recipe.
  • I am using my own do_install() method to select desired profile using the command mentioned in the previous comment.

@memsharded
Copy link
Member

Ok, this might be related to the yocto setup, and Conan Python interpreter picking some libraries, openssl or something from yocto instead of the correct one, and then failing because of that. I'd suggest reporting how you installed Conan, and then maybe trying to use the self-contained Conan executable that can be downloaded from https://conan.io/downloads, and try with it.

@AbhishankarBM
Copy link
Author

AbhishankarBM commented Nov 29, 2023

  • In my local machine I used,
    pip install conan
  • In my yocto, I followed the steps from here, https://docs.conan.io/1/integrations/cross_platform/yocto.html
  • I added the meta-conan layer by adding the 'url', and 'refspec' in my main.yml files and then when i run kas shell, meta-conan will be cloned to my build folder and automatically appended to build/conf/bblayers.conf.
  • After this I added a conan-mosquitto_1.4.15.bb in one of the folders and then I added 'IMAGE_INSTALL:append = " conan-mosquitto"' in my main.yml file.
  • After this I am doing bitbake <image>
  • NOTE: I am not adding the CONAN_REMOTE_URL or CONAN_USER or CONAN_PASSWORD in my local.conf as I am trying to fetch from ConanCenter. But I run conan remote enable conancenter in my do_install().

-This is my .bb file

inherit conan

DESCRIPTION = "An open source MQTT broker"
LICENSE = "EPL-2.0"

CONAN_PKG = "mosquitto/2.0.15"

do_install() {
    conan remote enable conancenter
    conan install --requires=mosquitto/2.0.15 --profile default -of /home/user/
}
  • I think CONAN_PKG is redundant here because of the conan install command I am doing inside do_install()
  • You mentioned using the self contained conan executable, can that be used in my yocto layer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants