[Debian-astro-maintainers] Bug#746987: Inconsistent use of _XOPEN_SOURCE causing conflicting types

Michael Tautschnig mt at debian.org
Sun May 4 16:39:54 UTC 2014


Package: cpl
Version: 6.4.1-5
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
libtool: link: gcc -shared  -fPIC -DPIC  .libs/cpl_array.o .libs/cpl_bivector.o .libs/cpl_error.o .libs/cpl_errorstate.o .libs/cpl_fits.o .libs/cpl_io_fits.o .libs/cpl_cfitsio.o .libs/cpl_image_basic.o .libs/cpl_image_bpm.o .libs/cpl_image_filter.o .libs/cpl_image_io.o .libs/cpl_image_iqe.o .libs/cpl_image_resample.o .libs/cpl_image_stats.o .libs/cpl_imagelist_basic.o .libs/cpl_imagelist_io.o .libs/cpl_init.o .libs/cpl_mask.o .libs/cpl_matrix.o .libs/cpl_memory.o .libs/cpl_msg.o .libs/cpl_plot.o .libs/cpl_polynomial.o .libs/cpl_property.o .libs/cpl_propertylist.o .libs/cpl_stats.o .libs/cpl_table.o .libs/cpl_test.o .libs/cpl_tools.o .libs/cpl_type.o .libs/cpl_vector.o .libs/cpl_version.o .libs/cpl_xmemory.o .libs/cpl_image_gen.o .libs/cpl_column.o   -Wl,-rpath -Wl,/srv/jenkins-slave/workspace/sid-goto-cc-cpl/cpl-6.4.1/libcext/cext/.libs -L/usr/lib/x86_64-linux-gnu ../libcext/cext/.libs/libcext.so -lcfitsio -lfftw3 -lfftw3f -lm -lgomp -ldl -lnsl  -O2 -fopenmp -Wl,-z -Wl,relro -fopenmp   -fopenmp -Wl,-soname -Wl,libcplcore.so.20 -o .libs/libcplcore.so.20.4.1

error: conflicting function declarations "stat"
old definition in module cpl_fits file /usr/include/x86_64-linux-gnu/sys/stat.h line 453
signed int (const char *__path, struct stat *__statbuf)
new definition in module cxfileutils file /usr/include/x86_64-linux-gnu/sys/stat.h line 453
signed int (const char *__path, struct stat *__statbuf)

reason for conflict at __statbuf in types listed below (struct/struct):
composite type component counts differ (18/15)
struct stat {
  unsigned long int st_dev;
  unsigned long int st_ino;
  unsigned long int st_nlink;
  unsigned int st_mode;
  unsigned int st_uid;
  unsigned int st_gid;
  signed int __pad0;
  unsigned long int st_rdev;
  signed long int st_size;
  signed long int st_blksize;
  signed long int st_blocks;
  signed long int st_atime;
  unsigned long int st_atimensec;
  signed long int st_mtime;
  unsigned long int st_mtimensec;
  signed long int st_ctime;
  unsigned long int st_ctimensec;
  signed long int [3l] __unused;
}
struct stat {
  unsigned long int st_dev;
  unsigned long int st_ino;
  unsigned long int st_nlink;
  unsigned int st_mode;
  unsigned int st_uid;
  unsigned int st_gid;
  signed int __pad0;
  unsigned long int st_rdev;
  signed long int st_size;
  signed long int st_blksize;
  signed long int st_blocks;
  struct timespec st_atim;
  struct timespec st_mtim;
  struct timespec st_ctim;
  signed long int [3l] __unused;
}

This is caused by cpl_fits (and other files) being compiled with
-D_POSIX_C_SOURCE=200112L only, whereas cxfileutils is being compiled with
-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -- the difference in
_POSIX_C_SOURCE may be tolerable, but inconsistent use of _XOPEN_SOURCE is not.

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-astro-maintainers/attachments/20140504/b17286a3/attachment.sig>


More information about the Debian-astro-maintainers mailing list