The m4 error noted in the title and again below is another error I received quite awhile back with very little detail in the notes. I had mentioned that I resolved the error by uninstalling the x86_64 version of m4 and installing the i386 version. After further investigation I am sure the issue was not related to being 32-bit versus 64-bit but instead related to the m4 version instead. Below I describe note the error and how to resolve the error.
GNU m4 Error: /usr/bin/m4: unrecognized option –debugfile
GNU m4 is an implementation of the traditional UNIX macro processor. Again I initially thought that maybe it was something with the 64-bit m4 package I had installed because once I removed it and installed the 32-bit GNU m4 version I did not receive the above error any longer. Instead I now believe it was simply coincidence that one of the i386 repositories I had installed was a newer version of GNU m4 that included the –debugfile switch. If you do receive the above m4 error then chances are that the version you have of GNU m4 is 1.4.6 or below. Simply upgrade the GNU m4 version to 1.4.7 or greater and you will no longer receive the “unrecognized command” error.
Current CentOS 5.X GNU m4 Version:
- [root@cent1 ~]# yum list *M4*
- Loaded plugins: fastestmirror
- Loading mirror speeds from cached hostfile
- * base: pubmirrors.reflected.net
- * epel: mirror.umoss.org
- Installed Packages
- m4.i386 1.4.5-3.el5.1 installed
- [root@cent1 ~]#
If you need to install a newer version of m4 the 1.4.11 version of GNU m4 is available from the elastix repository. You can view the packages list for both i386 and x86_64 by clicking here. Install the elastix repository on an i386 CentOS Linux server by issuing the below command.
Install Elastix Repo On CentOS Linux 5.x:
- rpm -Uhv http://repo.elastix.org/elastix/1/base/i386/RPMS/elastix-1.6-11.noarch.rpm
After installing the elastix repo you can upgrade m4 via yum by issuing the “yum update m4” command.