[Bug 1265604] [NEW] #include <zlib.h> doesn't work on x64 without first including <stdarg.h>

Daniel Holth dholth at fastmail.fm
Thu Jan 2 19:19:04 UTC 2014


Public bug reported:

While attempting to compile pypy I noticed zlib.h doesn't compile on x64
when it's included by itself. If stdarg.h is included before including
zlib.h then the problem goes away.

Instead, the #idfef that guards the offending declaration in zlib.h
should be tweaked to evaluate as false when va_list isn't available.


// #include <stdarg.h>
#include <zlib.h>

int main(int argc, char **argv) {
    return 0;
}

...

$ gcc test.c
In file included from /usr/include/zlib.h:34:0,
                 from test.c:2:
/usr/include/zlib.h:1758:44: error: unknown type name \u2018va_list\u2019
 ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: zlib1g-dev 1:1.2.8.dfsg-1ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-14.21-generic 3.11.7
Uname: Linux 3.11.0-14-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Thu Jan  2 13:55:33 2014
InstallationDate: Installed on 2013-12-28 (4 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 XDG_RUNTIME_DIR=<set>
SourcePackage: zlib
UpgradeStatus: Upgraded to saucy on 2012-11-21 (406 days ago)

** Affects: zlib (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug saucy

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zlib in Ubuntu.
https://bugs.launchpad.net/bugs/1265604

Title:
  #include <zlib.h> doesn't work on x64 without first including
  <stdarg.h>

Status in “zlib” package in Ubuntu:
  New

Bug description:
  While attempting to compile pypy I noticed zlib.h doesn't compile on
  x64 when it's included by itself. If stdarg.h is included before
  including zlib.h then the problem goes away.

  Instead, the #idfef that guards the offending declaration in zlib.h
  should be tweaked to evaluate as false when va_list isn't available.

  
  // #include <stdarg.h>
  #include <zlib.h>

  int main(int argc, char **argv) {
      return 0;
  }

  ...

  $ gcc test.c
  In file included from /usr/include/zlib.h:34:0,
                   from test.c:2:
  /usr/include/zlib.h:1758:44: error: unknown type name \u2018va_list\u2019
   ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: zlib1g-dev 1:1.2.8.dfsg-1ubuntu1
  ProcVersionSignature: Ubuntu 3.11.0-14.21-generic 3.11.7
  Uname: Linux 3.11.0-14-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.12.5-0ubuntu2.2
  Architecture: amd64
  Date: Thu Jan  2 13:55:33 2014
  InstallationDate: Installed on 2013-12-28 (4 days ago)
  InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   SHELL=/bin/bash
   PATH=(custom, user)
   LANG=en_US.UTF-8
   XDG_RUNTIME_DIR=<set>
  SourcePackage: zlib
  UpgradeStatus: Upgraded to saucy on 2012-11-21 (406 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/1265604/+subscriptions



More information about the foundations-bugs mailing list