How to Update Make 3.81 Linux

how to update make 3.81 linux

Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.

The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.

This has been discussed many times on the GNU Make mailing list and elsewhere.

So to get a newer version, you must compile it from scratch.
This is easy:

  1. Install the required packages (gcc, make and such).
  2. Open up a shell (if you're using the GUI, a terminal window).
  3. Type the following commands (or something equivalent, e.g. you can use curl instead of wget):

    cd /tmp
    wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
    tar xvf make-4.1.tar.gz
    cd make-4.1/
    ./configure
    make
    sudo make install
    cd ..
    rm -rf make-4.1.tar.gz make-4.1

Now, make 4.1 is in /usr/local/bin/make.

You can verify it is there with whereis make.

You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.

Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

How to make terminal use newer version of GNU make(4.3) instead of default old(3.81) one?

Have a check what's up with:

brew info make

GNU "make" has been installed as "gmake".
If you need to use it as "make", you can add a "gnubin" directory
to your PATH from your bashrc like:

PATH="/usr/local/opt/make/libexec/gnubin:$PATH"

So, you can either do what is suggested above and change your PATH, or use gmake instead of make.

Install older version of gnu-make in Ubuntu 18.04

You can try modify the glob.c file:

# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION 

to

# if _GNU_GLOB_INTERFACE_VERSION >= GLOB_INTERFACE_VERSION

For me it's work and i can build make 3.82

(credit: http://gnu-make.2324884.n4.nabble.com/undefined-reference-to-alloca-td18308.html)

How to install and use make in Windows?

make is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Anyway, there are several options for getting that:

  1. The most simple choice is using Chocolatey. First you need to install this package manager. Once installed you simlpy need to install make (you may need to run it in an elevated/admin command prompt) :

    choco install make
  2. Other recommended option is installing a Windows Subsystem for Linux (WSL/WSL2), so you'll have a Linux distribution of your choice embedded in Windows 10 where you'll be able to install make, gccand all the tools you need to build C programs.

  3. For older Windows versions (MS Windows 2000 / XP / 2003 / Vista / 2008 / 7 with msvcrt.dll) you can use GnuWin32.

An outdated alternative was MinGw, but the project seems to be abandoned so it's better to go for one of the previous choices.



Related Topics



Leave a reply



Submit