25
AleCx04
5y

The year is 2019.

C++ is still one of the most powerful programming languages around..............with no centralized package manager that is widely adopted by the community that allows one to sandbox libraries from conflicts with one another.

I ain't hating, just find this funny and I love cpp

Apt get/git submodules it is!!

Comments
  • 4
    A centralized package manager doesn't help. Look at Python:

    PIP, Setuptools, wheel, OS package manager on most Linux distros. It's a mess.

    And all may fail in some combination cases of OS, network connection and local installation variation.

    Manual installation may work for simple packages, but is a PITA for packages with dependencies.

    The best solution would be to just put the packages in given directory and there you go. Then it doesn't matter from where and in which format you get the package. It just has to be dropped in the directory, no compilation or configuration or other complex stuff at installation, and there you go.

    But that's not complex enough, I think...
  • 1
    What about NuGet?
  • 1
    @FrodoSwaggins reason why I said apt_get/git submodules it is at the end
  • 2
    @FrodoSwaggins didn't really have a point. I just find it strange. Mind you, If I have to use c++ at work is for very minimal stuff. I am not by any means a cpp dev, i just have to deal with certain things from time to time. And in such cases I need to install a lib or two. I normally resort to git subms or my system's package manager. I am fine with the idea, but I find it strange that there is not actual centralized repo like in some other places.

    Not really a bitching point or anything, more like a "oh i would have thought this exists, oh well I'll keep doing it this way"

    🤷‍♂️
  • 1
    @ddephor that is basically when I have to do when I need to, i just find it funny
  • 1
    @FrodoSwaggins we can add that to the "Things Microsoft got wrong with Windows" folder. Systems development on windows just sounds painful.
  • 1
    @ddephor You know about virtualenv?
    I rarely had to touch the internals (wheel, setuptools, etc.) and just used pip with virtualenv. Rarely needed to work with OS' package manager for python again.
    The development headers might still be missing, but that is hardly python's fault.

    You last approach is describing wheels - but just "dropping" a not compiled C extension will probably fail, its up to the maintainer of the package to provide the wheels for your platform.
  • 2
    *the TS devil emerges*

    NPM can be used for anything.

    Anything.
  • 1
    Also, this seems promising although I haven't done more than check the Github after being redirected from SO. It's also written in python.

    https://conan.io

    https://stackoverflow.com/a/...
  • 1
    i did have issues with python, pip etc., but it's much better than having to search together your dependencies. i recently wanted to run autogen on windows, and it was horrible! after spending about an hour collecting & compiling libraries, i came across one that i couldn't compile. yay, that's one hour of my life i won't get back.

    If you want an example of a working package manager, look at cargo. Not only is it universally accepted, rust also brings working toolchains for most major platforms, so you don't get issues like "dependency X doesn't work under <OS>, guess you're fucked".
  • 0
    @Kandelborg you know what Satan....you are not wrong! And I had not thought of this.
  • 1
    @sbiewald I've read about virtualenv, but not used it.

    It's not only python, it's just a good example where I had many issues. I also wrestled with Lua and Perl, especially on windows. It's a bit better on Debian based systems, as you get most well known modules for the big languages through the main repository (may be true for other linux distros, but I mainly use debian and debian derivates).
Add Comment