New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type #50249
Comments
cc +DD64 -Ae -D_REENTRANT +Z -c -DNDEBUG -O -I. -IInclude -I./Include ! When I get time, I need to create a patch to fix this.. but if somebody |
Adding Martin to the nosy list as this is related to his change: |
I have two questions:
Also, please confirm a few things: |
Hello Martin, My apologies for responding so late. [Martin] Also, please confirm a few things: a. configure has detected # Yes, as can be seen in the attached config.log [Martin] (...) b. configure's analysis is correct, i.e. your system has Yes,
|
I can't infer that from the copy of wchar.h that you provided. I I see that sys/_mbstate_t.h is included. This inclusion is conditional
It's best to focus on this example. Produce preprocessor output for This is standard C, AFAICT, so if the compiler fails to compile As a wild guess, try defining _XOPEN_SOURCE to 500, i.e.
I don't think this is relevant. Somehow, they managed to #define |
I've attached the files you requested.
Yes, this works .. the file compiles. I tried modifying the value of |
That's an HPUX bug then, please report it to HP. They should assume
Well, we absolutely need mbstate_t, so we need to resolve all these Please be prepared for this becoming a many-months project. I don't |
Sridhar, is there still a problem with current 3.2/3? If you are no longer working on this, I think we should close as languishing/postponed. |
On 2011-06-26, at 2:04 PM, Terry J. Reedy wrote:
I am not working on this yet (its low prio), but will try building 3.2 on HP-UX once 3.2 final is released. |
« Python 3.2 was released on February 20th, 2011. » (from python.org) |
On 2011-06-27, at 9:11 AM, Éric Araujo wrote:
My mistake; I meant to say 3.2.1 final. |
Martin - <sys/_mbstate_t.h> provides a definition for mbstate_t only (at least on HP/UX 11i V2.0). I can verify that the problem still exists for Python 3.2.1. I am working on a workaround for this issue, and I will attach a patch once I get it to build. |
I got it to build on HP-UX 11. However, there are a lot of compiler warnings about type mismatches, the _ctypes, _multiprocessing and termios modules failed to build, and "make test" died after not finding a usable "binascii" module. To get it to build, I did the following:
At this point, make ran to completion, and produced a python binary. However, "make test" dies within seconds of starting up. |
Jim, the question remains why it fails to compile then. If the type is defined, why does it give an error message "but has not been defined as a type"??? |
Martin - sys/mbstate.h is only included if _INCLUDE__STDC_A1_SOURCE is defined. The only way this gets defined in the vendor-provided include files is if _XOPEN_SOURCE is defined and is equal to 500, or __STDC_VERSION_ is defined and is greater than or equal to 199901. I've attached a patch to broaden the _XOPEN_SOURCE case (as the test should clearly have been >=, not ==). Defining __STDC_VERSION__ to 199901 or greater will also do the job, but it feels more like a hack than just fixing what's broken in the vendor include files. |
That's a patch to HP-UX, right? Not one to Python. |
Yes, it is a patch to an HP-provided C compiler system header file. I cannot provide the actual file it patches, due to copyright limitations. |
I am collecting HP/UX compiler workarounds in bpo-12572. I will be adding patches to it as I produce them, including a patch to fix this on HP/UX. |
Should this be closed in favour of bpo-12572? |
I cannot reproduce this with HP-UX 11.31 and master + 3.7. I opt to close this one. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: