How far do you have to go to "Support Linux"?



  • Say you wanted to make a certain project portable, in the hope of extracting revenue from poorly served markets where there's less competition, such as people that use Linux systems. Hopefully as a springboard for supporting Mac, where people will actually pay for things, when you get around to getting a Mac to test on.

    So, what would you have to do to be able to say that you support Linux, without attracting pendantic complaints that you missed some toy distribution and so you don't really support Linux?

    The problem I'm faced with, at this time, is package managers. I'd like to offer a sane installation experience that plays nice with the environment. In Windows you build an MSI that registers your program with the "Add/Remove programs" dialog (I think they renamed it "Program Features" now?), stick all your dependencies in your install directory, and then your user's files in the user's Documents folder. But there are a bunch of different package managers in Linux land.

    Would it be "bad" to package your dependencies with you, rather than rely on them being installed already? What happens if my program needs a certain version of a library that a particular distribution doesn't yet support? Would it be safe to sidestep the manager entirely and pretend I'm in a Windows machine that has no drive letters and uses / instead of , and ask the user in the installer where they want the files installed to instead?

    In case you are wondering why I'm asking here and not in a linuxy forum, it's because I want to avoid unhelpful abuse. The abuse here tends to be of the more helpful (or less unhelpful) kind, if only to not breed more WTFs.



  • What build system are you using, and what language is your project written in? Also, are you distributing binary-only, or releasing source code distributions as well?


  • FoxDev

    @Kian said:

    In case you are wondering why I'm asking here and not in a linuxy forum, it's because I want to avoid unhelpful abuse.

    You've come to the wrong place 😛

    Seriously though, just make a deb package and a yum package; that should cover about 80-90% of distros out there ;)



  • Project written in C++. I'm aiming for a binary distribution, ideally. I don't think open sourcing would be problematic, but I'd rather not unless that makes things easier for me.

    Not sure what you mean by build system? I use mingw64 on Windows (except for Windows specific things that would not go into the Linux build, the compatibility lib essentially), and the make from MSYS.


  • Winner of the 2016 Presidential Election

    @Kian said:

    Would it be "bad" to package your dependencies with you, rather than rely on them being installed already?

    Not if you install your Software in /opt. Make a Debian package and a RPM package that does exactly that.



  • @Kian said:

    Not sure what you mean by build system? I use mingw64 on Windows (except for Windows specific things that would not go into the Linux build, the compatibility lib essentially), and the make from MSYS.

    That's going to make things much more annoying, compared to say, using CMake. I'd build a deb and a rpm (AIUI -- yum digests RPMs just fine) myself, and perhaps have a binary tarball as well for those who want/need to roll their own installation process.

    @asdf said:

    Not if you install your Software in /opt. Make a Debian package and a RPM package that does exactly that.

    It's only reasonable to do that if you expect that sysadmins will be the only thing who have to update it -- not that's not a reasonable expectation in many cases, but it can catch you out when it isn't.


  • ♿ (Parody)

    @Kian said:

    Project written in C++. I'm aiming for a binary distribution, ideally.

    This makes things more difficult, to be sure, because now you're dependent on the version of the compiler for that version of the distro, not just library versions.



  • Why would a binary distribution be reliant on the compiler version?


  • Discourse touched me in a no-no place

    @RaceProUK said:

    Seriously though, just make a deb package and a yum package

    1. git clone https://.... ./configure; make; su -c "make install"...

  • Winner of the 2016 Presidential Election

    So… you think it's okay to tell users that they have to compile your program themselves?


    Filed Under: Things that are wrong with the Ruby ecosystem


  • We use platform-independent libraries (Boost and Qt) and support Windows and various Linuxes. Because binaries are not necessarily compatible between distributions and even different versions of the same Linux, here are all the platforms I personally have to compile for and test:

    Windows 32-bit
    Windows 64-bit
    CentOS 6.4 32-bit
    CentOS 6.4 64-bit
    CentOS 7.0 64-bit
    Ubuntu 12.04 32-bit
    Ubuntu 12.04 64-bit
    Ubuntu 14.04 32-bit
    Ubuntu 14.04 64-bit

    And it looks like Debian is getting added to the mix, but I'm hoping the Ubuntu binaries "just work" on Debian. If not, that's yet another set of configurations to my build matrix.

    This also leaves out several real-time operating systems which are pretty Linux-y but a coworker handles those, not me.



  • From linux user's perspective, there are two types of installs:

    • Those who are trying to play the linux way. Usually come with source code and the ability to make the thing on your own system. Then if your thing becomes popular, various maintainers might take it and make a deb or rpm package or whatever. And if you don't want to give away source code... then I guess you need to make a bunch of bins for different versions of popular distros and offer your own repositories. Pain in the ass.

    • Bin deploy. Package everything up. Have people unpack it in /opt/ and run the thing. The end. You still need to make the thing for each distro, but it feels easier in terms of what goes where and such.

    You can also look into the few vendors who are actually trying to deploy using a real-like installer for linux. Eg. netbeans.


  • Discourse touched me in a no-no place

    @asdf said:

    So… you think it's okay to tell users that they have to compile your program themselves?

    As an option, no.

    As the only option, depends on what the program is, but for most I'd assume (as you have) no.



  • @PJH said:

    3) git clone https://.... ./configure; make; su -c "make install"...

    1. error: ld returned 1 exit status

    Filed under: seriously, compiling from source just never works


  • Winner of the 2016 Presidential Election

    @PJH said:

    As an option, no.

    As the only option, depends on what the program is, but for most I'd assume (as you have) no.

    😄


  • ♿ (Parody)

    @Kian said:

    Why would a binary distribution be reliant on the compiler version?

    The C++ ABI changes with compiler version. If you're supplying all of your dependencies, then you're probably OK.


  • FoxDev

    @asdf said:

    So… you think it's okay to tell users that they have to compile your program themselves?

    why not? that's what Gentoo does.

    that's still around right?



  • @Kian said:

    Why would a binary distribution be reliant on the compiler version?

    Same reason you have to distribute the MSVC++ Redistributables with your C++ program on Windows...
    There's a MSVC++ Redistributable for every Visual C++ version, 32 and 64 bit and they aren't always installed on an end-users computer. The C++ magic is inside.

    Or at least I hope you realize that.


  • BINNED

    @asdf said:

    So… you think it's okay to tell users that they have to compile your program themselves?

    If they're using Slackware, it's not only okay, it's expected.

    Filed under: slackbuilds FTW



  • @delfinom said:

    Same reason you have to distribute the MSVC++ Redistributables with your C++ program on Windows...There's a MSVC++ Redistributable for every Visual C++ version, 32 and 64 bit and they aren't always installed on an end-users computer.

    And if you install that broken one from Visual Studio 2008 that shits files all over the root level of the HD, we're all allowed to punch you in the face.


  • FoxDev

    hu-uh.. so thats what clutters up my C and D drives after i install those Origin games...... I knew i should have stuck with Steam...



  • Release for Ubuntu. Let the community do the hard work. Profit.



  • @blakeyrat said:

    And if you install that broken one from Visual Studio 2008 that shits files all over the root level of the HD, we're all allowed to punch you in the face.

    What ? Something made by Microsoft is broken ? That's impossible !



  • Well, binary releases are a bit more work than I expected, but at least it's just a one time, up-front cost that I can eventually automate and maintain as more get added to the mix.

    Not convinced about distributing sources, however, unless compilation can be done in a "one click" deal that is reliable on each target.



  • This mentions RPATH and $ORIGIN, which can make packaging your own libs easier. There's also some other stuff that may or may not be relevant.


  • kills Dumbledore

    You don't support Linux, you release the source and say "stupid linux, can't even compile this code". Within a day it will be all over the Web



  • You don't support Linux; Linux supports you!


  • kills Dumbledore

    In soviet Russia, source code compiles you


Log in to reply