During Build - Could not find a 32-bit integer variable
I have tried building rsync versions 3.4.1, 3.4.0 and 3.3.0 on Centos 7. On all 3 recent versions, I run into the following problem when running make install. My configure script is passing fine.
In file included from ./rounding.c:20:0:
./rsync.h:613:3: error: #error Could not find a 32-bit integer variable
# error Could not find a 32-bit integer variable
^
./rsync.h:682:2: error: unknown type name ‘int32’
int32 size, entries;
^
./rsync.h:683:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘node_size’
uint32 node_size;
^
./rsync.h:689:2: error: unknown type name ‘int32’
int32 key;
^
./rsync.h:773:3: error: #error Character pointers are not 4 or 8 bytes.
# error Character pointers are not 4 or 8 bytes.
^
./rsync.h:786:2: error: unknown type name ‘int32’
int32 num;
^
./rsync.h:787:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘unum’
uint32 unum;
^
./rsync.h:803:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘len32’
uint32 len32; /* Lowest 32 bits of the file's length */
^
./rsync.h:957:2: error: unknown type name ‘int32’
int32 len; /**< length of chunk of file */
^
./rsync.h:958:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘sum1’
uint32 sum1; /**< simple checksum */
^
./rsync.h:967:2: error: unknown type name ‘int32’
int32 count; /**< how many chunks */
^
./rsync.h:968:2: error: unknown type name ‘int32’
int32 blength; /**< block_length */
^
./rsync.h:969:2: error: unknown type name ‘int32’
int32 remainder; /**< flength % block_length */
^
./rsync.h:978:2: error: unknown type name ‘int32’
int32 p_size; /* Largest window size we allocated */
^
./rsync.h:979:2: error: unknown type name ‘int32’
int32 p_len; /* Latest (rounded) window size */
^
./rsync.h:980:2: error: unknown type name ‘int32’
int32 def_window_size; /* Default window size */
^
./rsync.h:1016:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘rflags’
uint32 rflags;
^
In file included from ./rsync.h:1114:0,
from ./rounding.c:20:
./byteorder.h:76:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVALu’
IVALu(const uchar *buf, int pos)
^
./byteorder.h:87:36: error: expected ‘;’, ‘,’ or ‘)’ before ‘val’
SIVALu(uchar *buf, int pos, uint32 val)
^
./byteorder.h:122:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVAL’
IVAL(const char *buf, int pos)
^
./byteorder.h:128:34: error: expected ‘;’, ‘,’ or ‘)’ before ‘val’
SIVAL(char *buf, int pos, uint32 val)
^
In file included from ./rsync.h:1115:0,
from ./rounding.c:20:
./lib/mdigest.h:10:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘A’
uint32 A, B, C, D;
^
./lib/mdigest.h:17:60: error: expected ‘;’, ‘,’ or ‘)’ before ‘length’
void mdfour_update(md_context *md, const uchar *in, uint32 length);
^
./lib/mdigest.h:21:61: error: expected ‘;’, ‘,’ or ‘)’ before ‘length’
void md5_update(md_context *ctx, const uchar *input, uint32 length);
^
In file included from ./rsync.h:1179:0,
from ./rounding.c:20:
./proto.h:28:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_checksum1’
uint32 get_checksum1(char *buf1, int32 len);
^
./proto.h:29:31: error: unknown type name ‘int32’
void get_checksum2(char *buf, int32 len, char *sum);
^
./proto.h:32:32: error: unknown type name ‘int32’
void sum_update(const char *p, int32 len);
^
./proto.h:80:41: error: expected ‘;’, ‘,’ or ‘)’ before ‘rflags’
const filter_rule *rule_template(uint32 rflags);
^
./proto.h:92:48: error: unknown type name ‘int32’
struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
^
./proto.h:92:65: error: unknown type name ‘int32’
struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
^
./proto.h:93:53: error: unknown type name ‘int32’
char *map_ptr(struct map_struct *map, OFF_T offset, int32 len);
^
./proto.h:119:20: error: unknown type name ‘int32’
stat_x *sxp, int32 iflags, uchar fnamecmp_type,
^
./proto.h:169:1: error: unknown type name ‘int32’
int32 read_int(int f);
^
./proto.h:170:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘read_uint’
uint32 read_uint(int f);
^
./proto.h:171:1: error: unknown type name ‘int32’
int32 read_varint(int f);
^
./proto.h:182:23: error: unknown type name ‘int32’
void write_int(int f, int32 x);
^
./proto.h:183:26: error: unknown type name ‘int32’
void write_varint(int f, int32 x);
^
./proto.h:191:23: error: unknown type name ‘int32’
void write_ndx(int f, int32 ndx);
^
./proto.h:192:1: error: unknown type name ‘int32’
int32 read_ndx(int f);
^
./proto.h:311:24: error: unknown type name ‘int32’
void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
^
./proto.h:312:3: error: unknown type name ‘int32’
int32 n, int32 toklen);
^
./proto.h:312:12: error: unknown type name ‘int32’
int32 n, int32 toklen);
^
./proto.h:313:1: error: unknown type name ‘int32’
int32 recv_token(int f, char **data);
^
./proto.h:314:28: error: unknown type name ‘int32’
void see_token(char *data, int32 toklen);
^
./proto.h:367:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fuzzy_distance’
uint32 fuzzy_distance(const char *s1, unsigned len1, const char *s2, unsigned len2, uint32 upperlimit);
^
./rounding.c: In function ‘main’:
./rounding.c:35:13: warning: variable ‘test_array’ set but not used [-Wunused-but-set-variable]
static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
^
Failed to create rounding.h!
make: *** [rounding.h] Error 1
Can you follow the advice in #441 and report back?
This worked, thank you so much. I had the same issue as qqliuxiaoran where the relevant config values were set to 0.
Does this indicate an issue with the configure script that should be followed up with?
I'll try to reproduce - Can you add your host details? release, arch, compiler, kernel etc?
I tried to reproduce on a clean centos install and was not able to reproduce
[centos@centos8 rsync]$ git rev-parse HEAD
9994933c8ccf7ead27c81fe4ce2eb4e08af20c7f
[centos@centos8 rsync]$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
This passed to build and run
[centos@centos8 rsync]$ ./rsync --version
rsync version 3.4.1-8-g9994933c protocol version 32
Copyright (C) 1996-2025 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
no SIMD-roll, no asm-roll, no openssl-crypto, asm-MD5
Checksum list:
md5 md4 none
Compress list:
zlibx zlib none
Daemon auth list:
md5 md4
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
Chiming in in case anyone else runs into the same issue. I was configuring with:
./configure --prefix=/usr --without-included-zlib --disable-md2man
And encountered the same problem where SIZEOF_* were zeroed out. Fortunately, config.log pointed me in the right direction:
configure.sh:8330: checking size of int
configure.sh:8336: gcc -o conftest -g -O2 -DHAVE_CONFIG_H -Wall -W conftest.c -llz4 -lzstd -lxxhash -lcrypto -lz >&5
configure.sh:8336: $? = 0
configure.sh:8336: ./conftest
./conftest: error while loading shared libraries: libxxhash.so.0: cannot open shared object file: No such file or directory
configure.sh:8336: $? = 127
configure.sh: program exited with status 127
In my case, libxxhash.so.0 existed at /usr/local/lib/libxxhash.so.0, but the dynamic linker cache was outdated. Running ldconfig fixed it.
If you're not sure whether the library path is in the linker search path, check /etc/ld.so.conf or the files under /etc/ld.so.conf.d/. If the path is missing, add the directory where the libraries are being installed and run ldconfig to refresh the cache.