This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: libffi build failure on HP-UX 11/PA
Type: compile error Stage:
Components: ctypes Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: theller Nosy List: BreamoreBoy, Oren_Held, bugs-python@vendor.thewrittenword.com, theller, vstinner
Priority: normal Keywords:

Created on 2010-12-31 07:35 by bugs-python@vendor.thewrittenword.com, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg124956 - (view) Author: The Written Word (bugs-python@vendor.thewrittenword.com) 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:
_ctypes

<stdlib.h> on HP-UX has a conflicting definition for struct mallinfo:
#ifndef _STRUCT_MALLINFO
#  define _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:
http://sourceware.org/ml/libffi-discuss/2010/msg00203.html
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 (vstinner) * (Python committer) Date: 2014-09-30 22:40
> quick update: libffi (upstream) has this fixed now in git commit dc411e8f991 .

https://github.com/atgreen/libffi/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.)
History
Date User Action Args
2022-04-11 14:57:10adminsetgithub: 55009
2014-09-30 22:40:44vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg228019

resolution: fixed
2014-09-30 22:26:10BreamoreBoysetnosy: + BreamoreBoy
messages: + msg228014
2011-02-08 22:13:03Oren_Heldsetnosy: theller, Oren_Held, bugs-python@vendor.thewrittenword.com
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