Configure: error: cannot compute sizeof (int)

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the Troubleshooting collection.

Contents

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.

Dependencies

If you are compiling from source, you may experience this type of issue if a dependency isn't found in the path you specify. For example, if you specify --with-krb5-security when configuring for compilation, and the krb5 libraries are not found, it will throw this error. The paths should be corrected or specified.

Personal tools