conan-io / conan

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

Getting boost with conan don't work #2087

Closed BlueSolei closed 6 years ago

BlueSolei commented 6 years ago

I installed Conan on windows 10 machine. I run: conan install Boost/1.64.0@conan/stable, and it fails. Output:

C:\temp>conan install Boost/1.64.0@conan/stable
Boost/1.64.0@conan/stable: Not found in local cache, looking in remotes...
Boost/1.64.0@conan/stable: Trying with 'bintray'...
Boost/1.64.0@conan/stable: Trying with 'conan.io'...
ERROR: Unable to find 'Boost/1.64.0@conan/stable' in remotes

Trying other package, works:

C:\temp>conan install fmt/4.0.0@bincrafters/stable
fmt/4.0.0@bincrafters/stable: Not found in local cache, looking in remotes...
fmt/4.0.0@bincrafters/stable: Trying with 'bintray'...
fmt/4.0.0@bincrafters/stable: Trying with 'conan.io'...
Downloading conanmanifest.txt
[==================================================] 121B/121B
Downloading conanfile.py
[==================================================] 1.8KB/1.8KB
fmt/4.0.0@bincrafters/stable: Installing package
Requirements
    fmt/4.0.0@bincrafters/stable from conan.io
Packages
    fmt/4.0.0@bincrafters/stable:63da998e3642b50bee33f4449826b2d623661505

fmt/4.0.0@bincrafters/stable: Retrieving package 63da998e3642b50bee33f4449826b2d623661505
fmt/4.0.0@bincrafters/stable: Looking for package 63da998e3642b50bee33f4449826b2d623661505 in remote 'conan.io'
Downloading conanmanifest.txt
[==================================================] 938B/938B
Downloading conaninfo.txt
[==================================================] 491B/491B
Downloading conan_package.tgz
[==================================================] 159.8KB/159.8KB
fmt/4.0.0@bincrafters/stable: Package installed 63da998e3642b50bee33f4449826b2d623661505

I install it using pip, using the installer, any way I know, and nothing works. Any idea?

memsharded commented 6 years ago

I would say that you are using some old version, or at least you have your remotes with an old definition. It is not important because they are a redirect, but please check your remotes:

$ conan --version
$ conan remote list

You can completely remove your <userhome>/.conan folder, and next conan invocation you will get the default remotes.

Then, of course the problem is that such package doesn't exist in your remotes. You can check them with:

$ conan search Boost* -r=conan-center
$ conan search Boost* -r=conan-transit

Note that conan-transit is a read-only copy of the old conan.io repository, which will have many different Boost recipes for many different authors, so it is difficult to know which ones are good and work and which ones might fail

On the other hand, conan-center still doesn't have an official package for Boost (monolith). There is a great team of OSS package creators, called "bincrafters", that they are created many packages for OSS libraries, including a modularized version of Boost. You can check it in their site: https://bincrafters.github.io/, (it has a link to their Bintray repo where you can navigate packages). This packages will eventually be accepted into conan-center

BlueSolei commented 6 years ago

Thank you very much.

c:\temp>conan --version
Conan version 0.29.1

c:\temp>conan remote list
conan-center: https://conan.bintray.com [Verify SSL: True]
conan-transit: https://conan-transit.bintray.com [Verify SSL: True]

c:\temp>conan search Boost* -r=conan-center
There are no packages matching the Boost* pattern

c:\temp>conan search Boost* -r=conan-transit
Existing package recipes:

Boost/devel@barcharcraz/testing
Boost/1.57.0@lasote/stable
Boost/1.58.0@lasote/stable
Boost/1.59.0@jslee02/stable
Boost/1.59.0@lasote/stable
Boost/1.60.0@TyRoXx/stable
Boost/1.60.0@dwerner/testing
Boost/1.60.0@gasuketsu/stable
Boost/1.60.0@lasote/ci
Boost/1.60.0@lasote/stable
Boost/1.60.0@lasote/testing
Boost/1.60.0@lucteo/stable
Boost/1.60.0@marcodiiga/stable
Boost/1.60.0@memsharded/testing
Boost/1.60.0@piponazo/testing
Boost/1.60.0@uriahl/stable
Boost/1.61.0@eliaskousk/stable
Boost/1.61.0@opilarium/stable
Boost/1.61.0@opilarium/testing
Boost/1.62.0@dvd/testing
Boost/1.62.0@lasote/stable
Boost/1.62.0@lasote/testing
Boost/1.62.0.beta.1@dvd/testing
Boost/1.62.0.beta.1@erikzenker/testing
Boost/1.63.0@cjwddtc/boost
Boost/1.63.0@cjwddtc/stable
Boost/1.63.0@cjwddtc/testing
Boost/1.63.0@eliaskousk/stable
Boost/1.63.0@kbinani/develop
Boost/1.63.0@windoze/stable
Boost/1.63.0@windoze/testing
Boost/1.64.0b1@barcharcraz/testing
Boost/1.64.0b2@barcharcraz/testing
Boost/1.64.0@barcharcraz/testing
Boost/1.64.0@cjwddtc/stable
Boost/1.64.0@eliaskousk/stable
Boost/1.64.0@inexorgame/stable
Boost/1.64.0-old@inexorgame/stable
Boost.DI/cpp03@oslh/stable
Boost.DI/cpp14@signal9/stable
Boost.DI/latest@signal9/stable
BoostBuildGen/0.1@arvidn/testing
BoostHttp/0.3@fmiguelgarcia/stable

The package really doesn't exist. I am new to conan, can you explain then, what the meaning of the package page in bintray?

memsharded commented 6 years ago

It doesn't exist in conan-transit or in conan-center, as I commented above. The package you are seeing is in another repository, called "conan-community" (https://bintray.com/conan-community/conan), which is maintained by the conan team, but some packages are still not mature enough to be in conan-center (like this Boost one)

You can use that repository adding it to your remotes (click in the setMeUp button for the URL):

$ conan remote add community https://api.bintray.com/conan/conan-community/conan
$ conan search Boost* -r=community

Does this clarify your question? Thanks!

BlueSolei commented 6 years ago

Thank a lot for the detailed explanation of "packages repos and where to find them" :-) Question: why the command "conan search Boost*" don't search all the registered repos? Why do we have to ask for a specific repo? For the my starting question, you can close this thread, as you answered it completely :-)

lasote commented 6 years ago

If you don't specify a -r it looks in the local cache. Why not in all remotes? It might be a feature to study now that the remotes have proliferated with Bintray. So far the use case has been to specify the remote to search within.

How that search should be? Showing all the matches in all the remotes? Only the first looking in order?

memsharded commented 6 years ago

"packages repos and where to find them" :-)

If this is a reference to the movie/book, I like it :)

Regarding the question, some performance reasons: search is an expensive operation for servers, and slow in the clients, that is why so far it hasn't been implemented that way. Also because so far it hasn't been a common use case, because the remotes where very limited, now with Bintray there can be more. So I'd say a -r=ALL argument could be a possibility to opt-in for that behavior, and I think you want to know from all remotes, not the first one, so I would output info for every defined remote.

BlueSolei commented 6 years ago

IIRC in every package manager I know(brew, pip, apt-get) there is no notion of 'remote׳. There is a local repo and you upgrade it from time to time. Why conan should be any different? Shouldn't it just be: conan search package ? (I am always get confused if the default behavior, here to search in all repos, is opt-in or opt-out) And yes, it is a reference :-)

memsharded commented 6 years ago

That is not totally accurate, in all of them there are notions of remotes, and different names for them:

Why conan should be any different?

Well, the truth is that C and C++ ecosystems are indeed different. They have been without a package managers for decades. Now its default usage is NOT using the default public repos, (quite the opposite of pip, or brew), but rather using self-hosted in-house repos. This is why the notion of tracking where the packages come from is much more evident than those other cases, and in our opinion, a decentralized approach (like git style) made more sense.

solvingj commented 6 years ago

@BlueSolei there is now a Boost 1.66.0 package in conan center. You can give it a try if you're still interested.

https://bintray.com/conan-community/conan/boost%3Aconan

If it works for you, perhaps this ticket can be closed?

memsharded commented 6 years ago

Hi @BlueSolei

I think conan 1.0 did a large effort in improving the docs, I hope they are now better and clarify some of the above questions.

Also, as @solvingj said, there is a https://bintray.com/conan/conan-center?filterByPkgName=boost%3Aconan package now in conan-center, you might check. The bincrafters modular boost will eventually be in conan-center too, it is just we are prioritizing other packages at the moment in the review queue.

So yes, I think this issue can be closed, but please @BlueSolei comment or re-open if necessary. Thanks!

BlueSolei commented 6 years ago

thank you all :-) You can close it.

On 25 February 2018 at 23:17, James notifications@github.com wrote:

Hi @BlueSolei https://github.com/bluesolei

I think conan 1.0 did a large effort in improving the docs, I hope they are now better and clarify some of the above questions.

Also, as @solvingj https://github.com/solvingj said, there is a https://bintray.com/conan/conan-center?filterByPkgName=boost%3Aconan package now in conan-center, you might check. The bincrafters modular boost will eventually be in conan-center too, it is just we are prioritizing other packages at the moment in the review queue.

So yes, I think this issue can be closed, but please @BlueSolei https://github.com/bluesolei comment or re-open if necessary. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/conan-io/conan/issues/2087#issuecomment-368345443, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUYPQ-jo-Igo7cWODE7d_2hStoc-lxEks5tYc3WgaJpZM4Qscui .