I had a teeny pet project using GNU assembly that was going to target two platforms.

Instead of keeping my handwritten worst-practices Makefile I decided to try GNU Autotools for the educated reasons of:

  • Text scrolling by looks pretty
  • Vague memories of ./configure make make install tarballs

I got hit with mysterious macro errors, recompile with -fPIE errors (didn’t need this before?), autotools trying to run gcc on a .o file w/ the same options as an .s file, “no rule for all:”, and other things a noob would run into. (I don’t need a bugfix, since my handspun Makefile is “working on my machine” with uname -m.) So there’s a bit of a learning curve here, inhibited by old documentation and more quietly, genAI being shittier than normal in this department

With this I ask:

Do people still use Autotools for non-legacy stuff? If not, what do people choose for a new project’s build system and why?

edit: trimmed an aside

  • Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    23
    arrow-down
    3
    ·
    2 months ago

    It’s nicknamed the autohell tools for a reason.

    It’s neat but most of its functionality is completely useless to most people. The autotools are so old I think they even predate Linux itself, so it’s designed for portability between UNIXes of the time, so it checks the compiler’s capabilities and supported features and tries to find paths. That also wildly predate package managers, so they were the official way to install things so there was also a need to make sure to check for dependencies, find dependencies, and all that stuff. Nowadays you might as well just want to write a PKGBUILD if you want to install it, or a Dockerfile. Just no need to check for 99% of the stuff the autotools check. Everything it checks for has probably been standard compiler features for at least the last decade, and the package manager can ensure you have the build dependencies present.

    Ultimately you eventually end up generating a Makefile via M4 macros through that whole process, so the Makefiles that get generated look as good as any other generated Makefiles from the likes of CMake and Meson. So you might as well just go for your hand written Makefile, and use a better tool when it’s time to generate a Makefile.

    (If only c++ build systems caught up to Golang lol)

    At least it’s not node_modules

    • fool@programming.devOP
      link
      fedilink
      arrow-up
      10
      ·
      2 months ago

      Wow, you’re right, autotools dev work started a decade prior to Linux 0.01’s release. And looking deeper into ./configure, there looks to be checks running here that only matter on old Solaris systems…

      At least it’s not node_modules

      They call it a polyfill because it polyfills your disk

      • ReversalHatchery@beehaw.org
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 months ago

        They call it a polyfill because it polyfills your disk

        nah, but storage is cheap bro, you really should just buy another hard drive! don’t even think about going below 4 TB, of course!

        /s