Title: libffi build failure on HP-UX 11/PA
Type: compile error Stage:
Components: ctypes Versions: Python 3.1, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: theller Nosy List: BreamoreBoy, Oren_Held,, haypo, theller
Priority: normal Keywords:

Created on 2010-12-31 07:35 by, last changed 2014-09-30 22:40 by haypo. This issue is now closed.

Messages (5)
msg124956 - (view) Author: The Written Word ( Date: 2010-12-31 07:35
Python 3.1.3 fails to build on HP-UX/PA:
In file included from /opt/build/Python-3.1.3/Modules/_ctypes/libffi/src/dlmalloc.c:1156:
/opt/TWWfsw/gcc42/lib/gcc/hppa2.0-hp-hpux11.31/4.2/include/stdlib.h:577: error: redefinition of 'struct mallinfo'

Failed to build these modules:

<stdlib.h> on HP-UX has a conflicting definition for struct mallinfo:

  /* structure filled by mallinfo */
  struct mallinfo  {
        int32_t arena;          /* total number of bytes in arena */
        int32_t ordblks;        /* number of ordinary blocks */
        int32_t smblks;         /* number of small blocks */
        int32_t hblks;          /* number of holding blocks */
        int32_t hblkhd;         /* number of bytes in holding block headers */
        int32_t usmblks;        /* number of bytes in small blocks in use */
        int32_t fsmblks;        /* number of bytes in free small blocks */
        int32_t uordblks;       /* number of bytes in ordinary blocks in use */
        int32_t fordblks;       /* number of bytes in free ordinary blocks */
        int32_t keepcost;       /* cost of enabling keep option */
#endif /* _STRUCT_MALLINFO */
msg125102 - (view) Author: Oren Held (Oren_Held) Date: 2011-01-02 21:20
I confirm that on Python 2.7.1, on HP-UX 11.31, ia64 architecture).

dlmalloc.c is the problematic file, a part of libffi.

I reported the same problem and solution + patch in here:
msg128192 - (view) Author: Oren Held (Oren_Held) Date: 2011-02-08 22:13
quick update: libffi (upstream) has this fixed now in git commit dc411e8f991 .
msg228014 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-30 22:26
Surely this can't be a problem nearly four years on?
msg228019 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-09-30 22:40
> quick update: libffi (upstream) has this fixed now in git commit dc411e8f991 .

This commit was in Python since at least Python 3.3. It also part of the development branch of Python 2.7. I'm too lazy to check was exact version included the fix, but the issue was closed.

(See maybe also issue #18178 and #3526.)
Date User Action Args
2014-09-30 22:40:44hayposetstatus: open -> closed

nosy: + haypo
messages: + msg228019

resolution: fixed
2014-09-30 22:26:10BreamoreBoysetnosy: + BreamoreBoy
messages: + msg228014
2011-02-08 22:13:03Oren_Heldsetnosy: theller, Oren_Held,
messages: + msg128192
2011-01-02 21:20:54Oren_Heldsetnosy: + Oren_Held

messages: + msg125102
versions: + Python 2.7
2010-12-31 07:35:47bugs-python@vendor.thewrittenword.comcreate