rpm source package from cosmic does not build on xenial

Bug #1800411 reported by Jason Gross
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rpm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi,

I am trying to backport the rpm package with backportpackage, but the source package does not build; it fails with

rpmio.c:1059:5: error: unknown type name ‘ZSTD_inBuffer’
     ZSTD_inBuffer zib; /*!< ZSTD_inBuffer */
     ^
rpmio.c:1060:5: error: unknown type name ‘ZSTD_outBuffer’
     ZSTD_outBuffer zob; /*!< ZSTD_outBuffer */
     ^
rpmio.c: In function ‘rpmzstdNew’:
rpmio.c:1128:26: warning: implicit declaration of function ‘ZSTD_createDStream’ [-Wimplicit-function-declaration]
  if ((_stream = (void *) ZSTD_createDStream()) == NULL
                          ^
rpmio.c:1128:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  if ((_stream = (void *) ZSTD_createDStream()) == NULL
                 ^
rpmio.c:1129:19: warning: implicit declaration of function ‘ZSTD_initDStream’ [-Wimplicit-function-declaration]
   || ZSTD_isError(ZSTD_initDStream(_stream))) {
                   ^
rpmio.c:1132:7: warning: implicit declaration of function ‘ZSTD_DStreamInSize’ [-Wimplicit-function-declaration]
  nb = ZSTD_DStreamInSize();
       ^
rpmio.c:1134:26: warning: implicit declaration of function ‘ZSTD_createCStream’ [-Wimplicit-function-declaration]
  if ((_stream = (void *) ZSTD_createCStream()) == NULL
                          ^
rpmio.c:1134:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  if ((_stream = (void *) ZSTD_createCStream()) == NULL
                 ^
rpmio.c:1135:19: warning: implicit declaration of function ‘ZSTD_initCStream’ [-Wimplicit-function-declaration]
   || ZSTD_isError(ZSTD_initCStream(_stream, level))) {
                   ^
rpmio.c:1138:7: warning: implicit declaration of function ‘ZSTD_CStreamOutSize’ [-Wimplicit-function-declaration]
  nb = ZSTD_CStreamOutSize();
       ^
rpmio.c: In function ‘zstdFlush’:
rpmio.c:1175:11: error: request for member ‘dst’ in something not a structure or union
  zstd->zob.dst = zstd->b;
           ^
rpmio.c:1176:11: error: request for member ‘size’ in something not a structure or union
  zstd->zob.size = zstd->nb;
           ^
rpmio.c:1177:11: error: request for member ‘pos’ in something not a structure or union
  zstd->zob.pos = 0;
           ^
rpmio.c:1178:11: warning: implicit declaration of function ‘ZSTD_flushStream’ [-Wimplicit-function-declaration]
  int xx = ZSTD_flushStream(zstd->_stream, &zstd->zob);
           ^
rpmio.c:1181:20: error: request for member ‘pos’ in something not a structure or union
  else if (zstd->zob.pos != fwrite(zstd->b, 1, zstd->zob.pos, zstd->fp))
                    ^
rpmio.c:1181:56: error: request for member ‘pos’ in something not a structure or union
  else if (zstd->zob.pos != fwrite(zstd->b, 1, zstd->zob.pos, zstd->fp))
                                                        ^
rpmio.c: In function ‘zstdRead’:
rpmio.c:1193:5: error: unknown type name ‘ZSTD_outBuffer’
     ZSTD_outBuffer zob = { buf, count, 0 };
     ^
rpmio.c:1193:28: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     ZSTD_outBuffer zob = { buf, count, 0 };
                            ^
rpmio.c:1193:28: note: (near initialization for ‘zob’)
rpmio.c:1193:33: warning: excess elements in scalar initializer
     ZSTD_outBuffer zob = { buf, count, 0 };
                                 ^
rpmio.c:1193:33: note: (near initialization for ‘zob’)
rpmio.c:1193:40: warning: excess elements in scalar initializer
     ZSTD_outBuffer zob = { buf, count, 0 };
                                        ^
rpmio.c:1193:40: note: (near initialization for ‘zob’)
rpmio.c:1195:15: error: request for member ‘pos’ in something not a structure or union
     while (zob.pos < zob.size) {
               ^
rpmio.c:1195:25: error: request for member ‘size’ in something not a structure or union
     while (zob.pos < zob.size) {
                         ^
rpmio.c:1197:15: error: request for member ‘pos’ in something not a structure or union
  if (zstd->zib.pos >= zstd->zib.size) {
               ^
rpmio.c:1197:32: error: request for member ‘size’ in something not a structure or union
  if (zstd->zib.pos >= zstd->zib.size) {
                                ^
rpmio.c:1198:15: error: request for member ‘size’ in something not a structure or union
      zstd->zib.size = fread(zstd->b, 1, zstd->nb, zstd->fp);
               ^
rpmio.c:1199:19: error: request for member ‘size’ in something not a structure or union
      if (zstd->zib.size == 0)
                   ^
rpmio.c:1201:15: error: request for member ‘src’ in something not a structure or union
      zstd->zib.src = zstd->b;
               ^
rpmio.c:1202:15: error: request for member ‘pos’ in something not a structure or union
      zstd->zib.pos = 0;
               ^
rpmio.c:1206:11: warning: implicit declaration of function ‘ZSTD_decompressStream’ [-Wimplicit-function-declaration]
  int xx = ZSTD_decompressStream(zstd->_stream, &zob, &zstd->zib);
           ^
rpmio.c:1212:15: error: request for member ‘pos’ in something not a structure or union
     return zob.pos;
               ^
rpmio.c: In function ‘zstdWrite’:
rpmio.c:1219:5: error: unknown type name ‘ZSTD_inBuffer’
     ZSTD_inBuffer zib = { buf, count, 0 };
     ^
rpmio.c:1219:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     ZSTD_inBuffer zib = { buf, count, 0 };
                           ^
rpmio.c:1219:27: note: (near initialization for ‘zib’)
rpmio.c:1219:32: warning: excess elements in scalar initializer
     ZSTD_inBuffer zib = { buf, count, 0 };
                                ^
rpmio.c:1219:32: note: (near initialization for ‘zib’)
rpmio.c:1219:39: warning: excess elements in scalar initializer
     ZSTD_inBuffer zib = { buf, count, 0 };
                                       ^
rpmio.c:1219:39: note: (near initialization for ‘zib’)
rpmio.c:1221:15: error: request for member ‘pos’ in something not a structure or union
     while (zib.pos < zib.size) {
               ^
rpmio.c:1221:25: error: request for member ‘size’ in something not a structure or union
     while (zib.pos < zib.size) {
                         ^
rpmio.c:1224:11: error: request for member ‘dst’ in something not a structure or union
  zstd->zob.dst = zstd->b;
           ^
rpmio.c:1225:11: error: request for member ‘size’ in something not a structure or union
  zstd->zob.size = zstd->nb;
           ^
rpmio.c:1226:11: error: request for member ‘pos’ in something not a structure or union
  zstd->zob.pos = 0;
           ^
rpmio.c:1229:18: warning: implicit declaration of function ‘ZSTD_compressStream’ [-Wimplicit-function-declaration]
         int xx = ZSTD_compressStream(zstd->_stream, &zstd->zob, &zib);
                  ^
rpmio.c:1236:22: error: request for member ‘pos’ in something not a structure or union
         if (zstd->zob.pos > 0) {
                      ^
rpmio.c:1237:46: error: request for member ‘pos’ in something not a structure or union
      size_t nw = fwrite(zstd->b, 1, zstd->zob.pos, zstd->fp);
                                              ^
rpmio.c:1238:25: error: request for member ‘pos’ in something not a structure or union
      if (nw != zstd->zob.pos) {
                         ^
rpmio.c:1244:15: error: request for member ‘pos’ in something not a structure or union
     return zib.pos;
               ^
rpmio.c: In function ‘zstdClose’:
rpmio.c:1255:2: warning: implicit declaration of function ‘ZSTD_freeDStream’ [-Wimplicit-function-declaration]
  ZSTD_freeDStream(zstd->_stream);
  ^
rpmio.c:1258:11: error: request for member ‘dst’ in something not a structure or union
  zstd->zob.dst = zstd->b;
           ^
rpmio.c:1259:11: error: request for member ‘size’ in something not a structure or union
  zstd->zob.size = zstd->nb;
           ^
rpmio.c:1260:11: error: request for member ‘pos’ in something not a structure or union
  zstd->zob.pos = 0;
           ^
rpmio.c:1261:11: warning: implicit declaration of function ‘ZSTD_endStream’ [-Wimplicit-function-declaration]
  int xx = ZSTD_endStream(zstd->_stream, &zstd->zob);
           ^
rpmio.c:1264:20: error: request for member ‘pos’ in something not a structure or union
  else if (zstd->zob.pos != fwrite(zstd->b, 1, zstd->zob.pos, zstd->fp))
                    ^
rpmio.c:1264:56: error: request for member ‘pos’ in something not a structure or union
  else if (zstd->zob.pos != fwrite(zstd->b, 1, zstd->zob.pos, zstd->fp))
                                                        ^
rpmio.c:1268:2: warning: implicit declaration of function ‘ZSTD_freeCStream’ [-Wimplicit-function-declaration]
  ZSTD_freeCStream(zstd->_stream);
  ^
rpmio.c: In function ‘zstdWrite’:
rpmio.c:1245:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
rpmio.c: In function ‘zstdRead’:
rpmio.c:1213:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:659: recipe for target 'rpmio.lo' failed
make[4]: *** [rpmio.lo] Error 1
make[4]: Leaving directory '/<<BUILDDIR>>/rpm-4.14.1+dfsg1/rpmio'
Makefile:1333: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/<<BUILDDIR>>/rpm-4.14.1+dfsg1'
Makefile:768: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/<<BUILDDIR>>/rpm-4.14.1+dfsg1'
dh_auto_build: make -j1 returned exit code 2
debian/rules:30: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<BUILDDIR>>/rpm-4.14.1+dfsg1'
debian/rules:51: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

See https://launchpadlibrarian.net/395161308/buildlog_ubuntu-xenial-amd64.rpm_4.14.1+dfsg1-4~ubuntu16.04.1~ppa4_BUILDING.txt.gz for the full log.

I created this package via

   backportpackage -y -u ppa:jgross-h/coq-master-daily rpm -d xenial -S "~ppa4" -s cosmic

Revision history for this message
Jason Gross (jgross-h) wrote :

And on Trusty, with a slightly modified package (editing out the debhelper version dependency by hand), I get

Writing /<<BUILDDIR>>/rpm-4.14.1+dfsg1/python/debian/tmp/usr/lib/python3.4/dist-packages/rpm-4.14.1.egg-info
# Kill all the junk this installs.
rm -f debian/tmp/usr/lib/rpm/config.guess \
  debian/tmp/usr/lib/rpm/config.sub \
  debian/tmp/usr/lib/*/*.la \
  debian/tmp/usr/lib/*/rpm-plugins/*.la \
  debian/tmp/usr/lib/rpm/rpm.log
# Fix permissions
chmod +x debian/tmp/usr/lib/rpm/rpm.daily
make[1]: Leaving directory `/<<BUILDDIR>>/rpm-4.14.1+dfsg1'
   dh_install -a -O--fail-missing
cp: cannot stat ‘debian/tmp/usr/lib/rpm/debugedit’: No such file or directory
dh_install: cp -a debian/tmp/usr/lib/rpm/debugedit debian/debugedit//usr/lib/rpm/ returned exit code 1
make: *** [binary-arch] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-arch gave error exit status 2

See https://launchpadlibrarian.net/395167969/buildlog_ubuntu-trusty-amd64.rpm_4.14.1+dfsg1-4.1~trusty~ppa5_BUILDING.txt.gz for the full log

Juhani Numminen (jsonic)
summary: - rpm source package does not build
+ rpm source package from cosmic does not build on xenial
Revision history for this message
Juhani Numminen (jsonic) wrote :

Hi,

Some backporting trouble might or might not indicate a bug in the package, so preferably you should ask help with backporting through some other communication channel. Nevertheless, here's my thoughts on the issue.

(Looks like the compilation error is related to libzstd. You tried to build with 0.5.1-1 while cosmic's libzstd version number starts with 1.3.5.[1] A different major version might quite possibly have a different C API. Xenial-updates has a 1.3.1 version available though.)

Ah, please disregard the previous paragraph. I now found another buildlog where I can see that there is the newer version of libzstd-dev is picked up and the compilation succeeds.[2]

[1] https://launchpad.net/ubuntu/+source/libzstd
[2] https://launchpadlibrarian.net/395168383/buildlog_ubuntu-xenial-amd64.rpm_4.14.1+dfsg1-4.1~xenial~ppa5_BUILDING.txt.gz

--
Juhani

Changed in rpm (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.