Package: r-cran-xts
Version: 0.9-7-1
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and 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.

[...]
gcc -std=gnu99 -shared -Wl,-z,relro -o xts.so add_class.o any.o attr.o 
binsearch.o coredata.o diff.o dimnames.o endpoints.o extract_col.o init.o 
isOrdered.o isXts.o leadingNA.o merge.o period.max.o period.min.o period.prod.o 
period.sum.o rbind.o rollfun.o runSum.o startofyear.o subset.o subset.old.o 
toperiod.o totalcols.o tryXts.o unique.time.o -lgfortran -lm -lquadmath 
-L/usr/lib/R/lib -lR

error: conflicting function declarations "endpoints"
old definition in module endpoints file endpoints.c line 5
struct SEXPREC * (struct SEXPREC *_x, struct SEXPREC *_on, struct SEXPREC *_k, 
struct SEXPREC *_addlast)
new definition in module init file xts.h line 80
struct SEXPREC * (struct SEXPREC *, struct SEXPREC *, struct SEXPREC *)
/usr/share/R/share/make/shlib.mk:6: recipe for target 'xts.so' failed
make[1]: *** [xts.so] Error 64
make[1]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-r-cran-xts/r-cran-xts-0.9-7/src'
make[1]: Entering directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-r-cran-xts/r-cran-xts-0.9-7/src'
make[1]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-r-cran-xts/r-cran-xts-0.9-7/src'
ERROR: compilation failed for package 'xts'
* removing 
'/srv/jenkins-slave/workspace/sid-goto-cc-r-cran-xts/r-cran-xts-0.9-7/debian/r-cran-xts/usr/lib/R/site-library/xts'
/usr/share/R/debian/r-cran.mk:76: recipe for target 'R_any_arch' failed
make: *** [R_any_arch] Error 1

It seems that the declaration here

http://sources.debian.net/src/r-cran-xts/0.9-7-1/src/xts.h?hl=80#L80

does not use the same number of parameters as the actual definition here

http://sources.debian.net/src/r-cran-xts/0.9-7-1/src/endpoints.c?hl=5#L5

and thus any uses passing in only 3 arguments will have undefined behaviour.
Doing a quick codesearch it seems a larger code review is required to establish
and fix all these cases.

Best,
Michael

Attachment: pgpFo6qjAWmq1.pgp
Description: PGP signature

Reply via email to