question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AIX 7.2 Failed to build psutil - "incomplete type 'struct procinfo'" when running gcc

See original GitHub issue

Platform

  • OS: AIX 7.2
  • Python version: 3.6.6
  • psutil version: 5.6.3
  • gcc version: 7.2.0
  • wheel version (installed in venv): 0.29.0

Bug description Newest release of Psutil - 5.6.3 - doesn’t compile on AIX 7.2. Version 5.6.2 was building properly.

psutil/_psutil_aix.c: In function 'psutil_proc_args':
psutil/_psutil_aix.c:183:36: error: invalid application of 'sizeof' to incomplete type 'struct procinfo'
     ret = getargs(&procbuf, sizeof(struct procinfo), argbuf, ARG_MAX);
                                    ^~~~~~
psutil/_psutil_aix.c: In function 'psutil_proc_environ':
psutil/_psutil_aix.c:244:37: error: invalid application of 'sizeof' to incomplete type 'struct procinfo'
     ret = getevars(&procbuf, sizeof(struct procinfo), envbuf, ARG_MAX);
                                     ^~~~~~
error: command 'gcc' failed with exit status 1

Way to reproduce /path/to/python_venv/bin/python3 /path/to/psutil-5.6.3/setup.py clean --all bdist_wheel -b /path/to/psutil-5.6.3_tmp -d /path/to/psutil-5.6.3_wheel

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wiggin15commented, Jun 11, 2019

That’s strange. I can’t reproduce this behavior. The only thing that may be relevant that changed from 5.6.2 to 5.6.3 in AIX is the order of the include files, but I don’t think it matters. Can you please try to compile a test file?

#include <procinfo.h>
void main(void)
{
	struct procinfo test;
}

Put it in test.c and run gcc test.c. Please let us know if it compiles successfully.

0reactions
wiggin15commented, Jun 12, 2019

Opened PR #1533.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GCC struct sigset_t conflicts with AIX sys/time.h
Hello, this pretty much seem a new problem affecting all releases of GCC under 7.2 latest TL.The following code is unable to compile...
Read more >
Package List — Spack 0.20.0.dev0 documentation
This is a list of things you can install using Spack. It is automatically generated based on the packages in this Spack version....
Read more >
failed C extension compilation for python - Stack Overflow
you are trying to build with using python2.7 and some of the definitions (PyModuleDef_HEAD_INIT) belongs to >= python3. And there may be a...
Read more >
Compiling problem - AIX 7.2 - The UNIX and Linux Forums
Hi We meet errors while running configuration scripts to prepare compiling source code on AIX 7.2. This error does not happen on AIX5.3...
Read more >
98390 – AIX: exceptions in threads: IOT/Abort trap(coredump)
When repeated often enough, it terminates with: IOT/Abort trap(coredump) Confirmed with g++ (GCC) 7.2.0 and g++ (GCC) 10.2.0 on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found