I need to update m4 to 1.4.19
on Ubuntu 18.04
, but how to do this ? This is a follow up from https://stackoverflow.com/a/69195008/1079990
I did:
wget ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz
tar -xvzf m4-1.4.19.tar.gz
cd m4-1.4.19/
./configure --prefix=/usr/local/m4
make
sudo make install # <-- suggested by @git-bruh
export PATH=/usr/local/m4/bin:$PATH
export PATH=/usr/local/m4:$PATH
But Ubuntu 18.04 still uses 1.4.18
Update after accept answer
But I still run into follow up error
| ERROR: Function failed: do_compile (log file is located at /home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-22/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.86882)
ERROR: Task (/home/hannes/git/oe-core/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'
It would be better to go for a distro package as manually overwriting files managed by the package manager is not a good idea, but if you still want to overwrite them you need to build it like this:
./configure --prefix=/usr # Install to /usr/bin as that path has precedence over /usr/local
make
sudo make install
Instead of this you could just install to /usr/local and export PATH=/usr/local/bin:$PATH
to use the new m4 without overwriting files. Note that the PATH must be set in every shell where the new m4
needs to be used.