Configure: error: cannot compute sizeof (int): Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(this is almost a FAQ now)
 
(different compilers will cause this)
Line 11: Line 11:


= Solution =
= Solution =
Check <tt>config.log</tt>. The file ends with three long sections of variables, before which is regular log output of compiler commands run. The last compiler invocation in this log section will show, in detail, what errors configure encountered.
Check <tt>config.log</tt> (see [[Reading config.log]]) The last compiler invocation in the "Core tests" section will show, in detail, what errors configure encountered.


How to fix those errors on your particular platform is an entirely different troubleshooting problem!
How to fix those errors on your particular platform is an entirely different troubleshooting problem! Here are some possibilities:
 
== Different Compilers ==
Amanda gets a set of compiler flags directly from glib (well, via <tt>pkg-config --cflags glib-2.0</tt>).  These are the flags that worked for Glib when it was being compiled.  If you're using a different compiler than was used to build glib, however, this will not work and will often cause this problem.
 
The solution is to use the same compiler as was used to build glib, thereby avoiding any compatibility gotchas between glib and Amanda.  If this is not possible, then another option is to adjust the pkg-config input file to give flags appropriate to the compiler with which you're building Amanda.

Revision as of 13:30, 27 May 2009

This article is a part of the Troubleshooting collection.

Problem

[root@box]# ./configure --with-user=amandabackup --with-group=disk
     [...]
checking size of int... configure: error: cannot compute sizeof (int)

Explanation

This is a follow-on error to problems with glib. Configure is trying to use the compiler to determine a simple system parameter (sizeof(int)), but the compiler flags added by the preceding glib detection are causing a failure.

This tends to happen on Solaris and AIX systems.

Solution

Check config.log (see Reading config.log) The last compiler invocation in the "Core tests" section will show, in detail, what errors configure encountered.

How to fix those errors on your particular platform is an entirely different troubleshooting problem! Here are some possibilities:

Different Compilers

Amanda gets a set of compiler flags directly from glib (well, via pkg-config --cflags glib-2.0). These are the flags that worked for Glib when it was being compiled. If you're using a different compiler than was used to build glib, however, this will not work and will often cause this problem.

The solution is to use the same compiler as was used to build glib, thereby avoiding any compatibility gotchas between glib and Amanda. If this is not possible, then another option is to adjust the pkg-config input file to give flags appropriate to the compiler with which you're building Amanda.