Red Hat Bugzilla – Bug 105679
makedepend not compatible with /usr/lib/assert.h
Last modified: 2007-04-18 12:57:51 EDT
Description of problem:
When attempting to compile the 'fetchmail' program from its sources, I received
an error message. Searching on the web suggested that there is an
incompatibility between makedepend and assert.h. The web page gave a suggested
patch to assert.h that seems to eliminate the problem.
(This problem is also discussed in a Debian bug report:
Version-Release number of selected component (if applicable):
/usr/include/assert.h from glibc-devel-2.3.2-4.80.6 in RedHat Linux 8.0, as updated.
/usr/X11R6/bin/makedepend from XFree86-devel-4.2.1-21 in RedHat Linux 8.0, as
fetchmail-6.2.4 from http://catb.org/~esr/fetchmail and
Steps to Reproduce:
1. Download fetchmail-6.2.4.tar.gz and un-tar it. It will construct a directory
named fetchmail-6.2.4. cd into this directory.
2. Per the instructions in the file INSTALL and run "./configure".
3. The following output is produced:
[247 lines of apparently correct auto-configure output deleted here -- see
You can ignore any makedepend error messages:
"/usr/include/assert.h":104: defined __cplusplus ? __GNUC_PREREQ (2, 6) :
__GNUC_PREREQ (2, 4)
^--- expecting :
The final message "expecting :" is an error and causes makedepend to halt, which
Error message as detailed immediately above.
Execution of makedepend and ./configure should finish.
See the above URL for a filing of this issue in the Debian bug system. That
filing also includes a suggested fix, to edit assert.h to change the definition
of a particular macro:
I usually deal with this by patching /usr/include/assert.h with the
following patch, which is equivalent to the functionality that
makedepend can't grok:
--- assert.h.orig Fri Oct 13 11:04:54 2000
+++ assert.h Fri Oct 13 11:02:28 2000
@@ -94,7 +94,11 @@
This is broken in G++ before version 2.6.
C9x has a similar variable called __func__, but prefer the GCC one since
it demangles C++ function names. */
-# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
+# if defined __cplusplus
+# if __GNUC_PREREQ (2, 6)
+# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
+# elif __GNUC_PREREQ (2, 4)
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
Applying this patch to my system appears to eliminate the problem.
Created attachment 94759 [details]
Shell output from attempting to execute ./configure
Cannot reproduce that with XFree86 4.3.0 makedepend.
It would be easier on the users to say that the problem is resolved in RHL 9,
since RH is not providing an XFree86-4.3.0 update for RHL 8.0.