Hello, The attached script searches for differences between C/C++ header files in RPM sets for different architectures, in order to examine one group of issues arising when attempting to compile software for i386 on x86_64. In the ideal world it would be possible to just install i386 *-devel packages on x86_64 and compile using gcc -m32 or whatever the correct command is. This can only work if the devel packages do not conflict in their header files. The full results for today's rawhide are available at http://people.redhat.com/mitr/diffincludes/diff-20040806.bz2 They are quite large because of some false positives; you can get a much smaller diff by s/diff -urN/diff -ur/ in the script, but watching file list differences has already helped find one incompatibility. Therefore I have left it this way, which means that the most common reason of large diffs is a package already prepared for cross-arch compilation :) A summary report (without the false positives and differences created by build timestamps entered in header files) is attached. The good news is that 271 out of the 345 packages containing header files contain no header file differences. Generally the most common reason of differences is including a "config.h" file generated by autoconf or something similar; in cases where the config values are architecture specific, the following are common among several packages: - duplicating the functionality of <stdint.h> or <inttypes.h> (definitions of "int64", printf/scanf formats, ...) - SIZEOF_type, ALIGNOF_type - VA_LIST_IS_ARRAY - _FILE_OFFSET_BITS, _LARGEFILE_SOURCE I have not examined the packages to find out whether the values are used in other header files at all. Even if they are not, they might unfortunately be used in applications: #include <libart.h> #if ART_SIZEOF_LONG ... Another thing I currently don't know anything about is how does pkg-config fit into this picture; when compiling for i386, it should point to the 32-bit libdir (which will automatically cause the correct glib config file to be included, for instance). Similar issues arise with QTDIR and the mechanism perl or xemacs plugins use for finding libraries and header files. The summary contains affected files for each package and in some cases notes about differences I have found curious or somehow special; such note does not imply this is the only difference in the header files; when in doubt, look at the complete output. Mirek
Description: Bourne shell script
apr-devel-0.9.4-21: /usr/include/apr-0/apr.h * Differs in APR_HAS_POSIXSEM_SERIALIZE arts-devel-1.2.92-1.1: /usr/include/kde/arts/gsl/gslconfig.h beecrypt-devel-3.1.0-4: /usr/include/beecrypt/beecrypt.gnu.h binutils-188.8.131.52.2-1: /usr/include/bfd.h cdrecord-devel-2.01.0.a34-1: /usr/include/schily/xconfig.h * HOST_SUB ("output from config.sub (modified)") is empty on x86_64 cyrus-sasl-devel-2.1.18-5: /usr/include/md5global.h /usr/include/sasl/md5global.h dbh-1.0.18-4: /usr/include/dbh_config.h dbh-devel-1.0.18-4: /usr/include/dbh_config.h * Note that the file is shipped in both packages e2fsprogs-devel-1.35-8: /usr/include/blkid/blkid_types.h /usr/include/ext2fs/ext2_types.h /usr/include/uuid/uuid_types.h flac-devel-1.1.0-6: /usr/include/FLAC/ordinals.h freetype-devel-2.1.9-1: /usr/include/freetype2/freetype/config/ftconfig.h gaim-0.80-3: /usr/include/gaim/config.h * Just arguments to configure glibc-headers-2.3.3-39: * Differences usually protected by testing __WORDSIZE, further mentioned differences are not /usr/include/bits/fenv.h * fenv_h has an added member in x86_64 /usr/include/bits/mathdef.h * float_t, double_t differ /usr/include/bits/wchar.h /usr/include/gnu/lib-names.h /usr/include/gnu/stubs.h /usr/include/sys/elf.h /usr/include/sys/epoll.h /usr/include/sys/procfs.h /usr/include/sys/vm86.h gmp-devel-4.1.3-2: /usr/include/gmp-mparam.h /usr/include/gmp.h gnome-libs-devel-184.108.40.206.90-41: /usr/include/gnome-1.0/libart_lgpl/art_config.h gnome-vfs2-devel-2.7.90-1: /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs-file-size.h gnome-vfs-devel-1.0.5-18: /usr/include/gnome-vfs-1.0/libgnomevfs/gnome-vfs-file-size.h guile-devel-1.6.4-13: /usr/include/libguile/scmconfig.h * Differs in USE_THREADS httpd-devel-2.0.50-3: /usr/include/httpd/ap_config_layout.h ImageMagick-devel-220.127.116.11-1.3: /usr/include/magick/magick_config.h krb5-devel-1.3.4-2: /usr/include/gssapi/gssapi.h /usr/include/krb5.h lam-7.0.6-3: /usr/include/lam_config.h libart_lgpl-devel-2.3.16-3: /usr/include/libart-2.0/libart_lgpl/art_config.h libwvstreams-devel-3.75.0-2: /usr/include/wvstreams/wvautoconf.h * Differs in HAVE_VALGRIND_MEMCHECK_H mozilla-devel-1.7-0.3.2: /usr/include/mozilla-1.7/js/jsautocfg.h /usr/include/mozilla-1.7/mozilla-config.h mysql-devel-3.23.58-10: /usr/include/mysql/my_config.h net-snmp-devel-5.1.1-4: /usr/include/net-snmp/agent/mib_module_config.h * Differs in USING_HOST_HR_SENSOR_MODULE /usr/include/net-snmp/agent/mib_module_includes.h /usr/include/net-snmp/net-snmp-config.h octave-2.1.57-3: /usr/include/octave-2.1.57/octave/config.h /usr/include/octave-2.1.57/octave/defaults.h /usr/include/octave-2.1.57/octave/oct-conf.h openjade-devel-1.3.2-12: /usr/include/OpenSP/config.h ORBit2-devel-2.11.1-1: /usr/include/orbit-2.0/orbit/orbit-config.h pciutils-devel-2.1.99.test7-1: /usr/include/pci/config.h php-devel-4.3.8-3: /usr/include/php/main/build-defs.h /usr/include/php/main/php_config.h * Differs in HAVE_PREAD, HAVE_PWRITE postgresql-devel-7.4.3-3: /usr/include/pg_config.h /usr/include/pgsql/server/pg_config.h * Differs in ACCEPT_TYPE_ARG3 pwlib-devel-1.6.5-4: /usr/include/ptbuildopts.h python-devel-2.3.4-7: /usr/include/python2.3/pyconfig.h tn5250-devel-0.16.5-2: /usr/include/tn5250/config.h w3c-libwww-devel-5.4.0-10: /usr/include/w3c-libwww/wwwconf.h xfsprogs-devel-2.6.13-2: /usr/include/xfs/platform_defs.h commons-collections-devel-2.1-12: /usr/include/org/apache/commons/collections/SequencedHashMap.h ecj-devel-2.1.3-4: /usr/include/org/eclipse/jdt/internal/compiler/ast/AstNode.h xalan-j-devel-2.4.1-16: /usr/include/org/apache/xpath/axes/WalkerFactory.h * All three packages: "-2147483647L - 1" vs. "-2147483648L"