RPM 4.4.2.3 : This is the RH EL5 / CentOS 5.5 default rpm version.
The
SRC RPM source code includes 37 patches. Some are for bug fixing.
The error, you show, is the first of the many errors.
'export CC=gcc-4.1' before configuring (./configure) will fix it.
Will not fix all the other errors. Compiling is not possible on Ubuntu, AFAIK.
If you really think, you need an old 'rpm-4.4.2', you can do :
1) Remove all rpm, librm with Synaptic.
2) sudo dpkg -r libbeecrypt-dev
3) sudo dpkg -r libbeecrypt7
.... Those cannot be removed with apt : Will then install rpm-4.7.
4) sudo dpkg -i libbeecrypt6_4.1.2-6build1_<arch>.deb
5) sudo dpkg -i librpm4.4_4.4.2.1-1ubuntu6_<arch>.deb
6) sudo dpkg -i rpm_4.4.2.1-1ubuntu6_<arch>.deb
.... Where <arch> is i386 or amd64.
The packages are from Ubuntu Hardy
http://packages.ubuntu.com/hardy/rpm
....