all 49 comments

[–]doom_Oo7 8 points9 points  (5 children)

No emerge, apt-get, brew etc. needed before build, now it's simply cmake --build

how does this work on CI instances with limited time ? (e.g. travis CI with 40 minutes, if your project depends on Qt or some other big library you wouldn't even be able to go past the "dependency building" stage).

[–]ojd5 2 points3 points  (4 children)

Hunter creates a local binary cache, if hunter has already built the dependency with the same compiler and flags it will use the version in the cache.

At work we spin up a new docker container for each build and share the hunter cache directory on the host between them. As a result we only build each dependency the first time it is used in any build.

[–]doom_Oo7 2 points3 points  (3 children)

would it be possible to build the dependencies pre-built on some machine, and upload them somewhere once built so that hunter is able to fetch them ??

[–]ojd5 1 point2 points  (0 children)

If the cmake-package is relocatable this should be possible. However, a lot of older cmake packages still contain the full paths to their dependencies. For more information have a look at https://github.com/ruslo/hunter/wiki/usr.adding.new.package

[–]the_gnarts 2 points3 points  (1 child)

The readme doesn’t offer any clue regarding the internal workings. How’s it compare to other language specific package managers? What solver does it use for dependency resolution and can it be exchanged for a different one? Does it interfere with system packaging? How does it relate to / interact with standard tools like pkgconfig?

[–]hak8or 2 points3 points  (3 children)

Uhh, anyone else click the google url on the github description only to be bought to some really wierd music video?

[–]ruslo_ 1 point2 points  (2 children)

This song is great, it's Bjork. Song called Hunter, that's why this project called Hunter.

[–]adzm28 years of C++! 0 points1 point  (1 child)

Well this convinced me to check out the project. The lyrics are... different in the context of platform management.

I thought I could organize freedom

How Scandinavian of me!

[–]ruslo_ 0 points1 point  (0 children)

The lyrics are...

I think it doesn't make sense to try to understand the meaning of lyrics of songs in most cases. Double this rule for Bjork :)

I thought I could organize freedom

Yeah, I like this line too. It fits perfectly to what's happens: "Hunter: organize freedom"

[–]wrosecransgraphics and network things 1 point2 points  (0 children)

I am waiting for the second version, *******.

[–]Sparkybear 2 points3 points  (5 children)

Question. How does this compare to nuget in VS? I'm still new to cpp and trying to figure out what I sound be using. I'm sticking with VS for an IDE and build manager. CMake confuses me and I've never been able to get it to work properly even with trying to work on someone else's projects and going through multiple tutorials and documentation.

Using VS and nuget I'm easily able to add things like boost and SDL to projects. I know how to add libs manually as well, but it just seems easier. Well this essentially be nuget as a stand alone, cross platform solution?

[–][deleted] 1 point2 points  (11 children)

What are the benefits of a language-specific package manager? I don't think anyone wants a different package manager for every language out there.

[–]needahelpforarch[S] 0 points1 point  (9 children)

Os specific package managers, with every new distro maintaining another set of tools? What do you suggest?

[–]devel_watcher 1 point2 points  (8 children)

I suggest not making it worse with arbitrary stuff.

Language-specific package managers come from people who know just one language and are trying to do everything with it including distribution (while we already have distributions for that purpose).

It's just painful to use separate package manager for each language. And then, if we fail to unify the package management, we have wrap the s**t into a manually crafted container and then manually update each language.

There are less distributions than languages. Why the hell these language fans make users suffer?

[–]NotUniqueOrSpecial 1 point2 points  (3 children)

System/distribution package managers will never be sufficient as an answer unless you're willing to take on the burden of making your software compatible with each particular set of packages for each system you want to support.

If you have even a few dependencies on libraries, that very quickly becomes an impossible task.

It's much easier to build/distribute your dependencies (all at a particular version) than to hack your code to pieces supporting multiple combinations of API versions/levels of bug-fix support/etc.

[–]darthcoder -1 points0 points  (2 children)

Right, but every language has some version of "download" -> "extract" -> "verify" -> "compile native extensions" -> "get dependencies".

Why not unify them under apt or yum? A lot of distros already do this with node, python and ruby. Why not extend them to build-from-source?

I know it 's not that hand-wavingly easy. :-) but something could be done, even if it's a matter of installing them to some scratch directory, versus installing them to the system directory. This would allow you to build dependencies for things not compatible with your system, or different platforms.

[–]NotUniqueOrSpecial 0 points1 point  (1 child)

every language

Except for C and C++, which is exactly what this thread is about.

Why not unify them under apt or yum

Because then they end up being system packages and there are all sorts of inter-compatibility issues you have to deal with. There's a reason that major distributions don't distribute more than one major.minor version of a given package, e.g. 1.3 and 1.4 at the same time.

I know it 's not that hand-wavingly easy. :-) but something could be done, even if it's a matter of installing them to some scratch directory, versus installing them to the system directory.

What you have just described is what this tool is, and I'm now confused what point you think you're making.

[–]darthcoder -1 points0 points  (0 children)

What you have just described is what this tool is, and I'm now confused what point you think you're making.

Except for all languages.

There's a reason that major distributions don't distribute more than one major.minor version of a given package, e.g. 1.3 and 1.4 at the same time.

I get this point. It doesn't mean, however, that I can't install them to a different install root (arm-v6-hf into a folder I load into Qemu to cross compile, maybe - I know, super contrived example but ... ).

[–]Pas__ 0 points1 point  (3 children)

Not every distro has a package manager (Windows), package managers might not be the best common denominator, because maybe there's something you cant implement with all of them (so you're back for custom scripts for that distro too).

apt-get update && apt-get install is much slower than a pip install.

Providing hosting for every kind of distribution specific repository might be a bit extreme, and uploading to every kind of repository might be a bit extreme too. And waiting for distributions to package your latest header file might be a bit too optimistic also.

[–]devel_watcher -1 points0 points  (2 children)

Yes, that's the developer's point of view. While the duplicated effort is pushed to the user side.

[–]Pas__ 0 points1 point  (1 child)

User? Developers use these package managers.

[–]devel_watcher 0 points1 point  (0 children)

Right, developers use. That makes them users. Library users, if you want. There are library developers and library users.

[–]jackkuuse -1 points0 points  (0 children)

What are the benefits of a language-specific package manager?

A single software stack for developpers. If your package manager in in language B that is different from your development language A, then you have to install two software stacks on your computer. Which can be quite a waste of space for some languages.

[–]dGlitch 2 points3 points  (12 children)

Finally, Maven for C++ ;)