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: compile errors on _codecs_iso2022.c
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: hyeshik.chang Nosy List: dharma_roadkill, hyeshik.chang, rptownsend
Priority: high Keywords:

Created on 2004-08-09 02:36 by dharma_roadkill, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_codecs_iso2022.c.diff hyeshik.chang, 2004-08-11 22:14 patch rev 1
_codecs_iso2022.c.diff hyeshik.chang, 2004-08-12 13:03 patch rev 2
Messages (11)
msg22013 - (view) Author: roadkill (dharma_roadkill) Date: 2004-08-09 02:36
Building
Python-2.4a2
on uname -a
OSF1 ***.tnzi.com V5.1 2650 alpha
(HP Tru64 5.1B on alpha server)
One of the modules won't compile correctly.
I note with interest that another submitter to Bug 
Tracker had an intermittant core dump in the iso2022 
area.  Maybe this is related to that other problem.  The 
Tru64 cc compiler is fairly sensitive and gives 
warnings/errors when other compilers would be silent but 
those warnings/errors are usually worth looking at!

cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1053: 
In the initializer for iso2022_kr_config, an array's element 
type
is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1058: 
In the initializer for iso2022_jp_config, an array's element 
type
is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1064: 
In the initializer for iso2022_jp_1_config, an array's 
element typ
e is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1070: 
In the initializer for iso2022_jp_2_config, an array's 
element typ
e is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1077: 
In the initializer for iso2022_jp_2004_config, an array's 
element
type is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1084: 
In the initializer for iso2022_jp_3_config, an array's 
element typ
e is incomplete, which precludes its initialization. 
(incompelinit)
cc: Error: /u13/home/doug/python/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c, line 1091: 
In the initializer for iso2022_jp_ext_config, an array's 
element t
ype is incomplete, which precludes its initialization. 
(incompelinit)
msg22014 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-08-09 05:10
Logged In: YES 
user_id=55188

It seems that I used C99 grammar in that lines.  Sorry.
I'll fix it for C89 compilers soon.  Thank you for the report!
msg22015 - (view) Author: Richard Townsend (rptownsend) Date: 2004-08-09 08:15
Logged In: YES 
user_id=200117

I am getting slightly different errors on HP-UX 11i using the 
native C compiler 'cc'.

building '_codecs_iso2022' extension
cc -Ae -DNDEBUG +O2 -z +Onofltacc +ESlit +Oentrysched 
+Odataprefetch +Onolimit +DA2.0 +Z -I. -
I/home/richardt/python-24/Python-2.4a2/./Include -
I/opt/python/include -I/usr/local/include -
I/home/richardt/python-24/Python-2.4a2/Include -
I/home/richardt/python-24/Python-2.4a2 -
c /home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c -o 
build/temp.hp-ux-B.11.11-9000/785-2.4/_codecs_iso2022.o
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 120: error 
1578: Size of struct or union member is unknown.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1058: 
error 1523: Too many initializers.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1064: 
error 1523: Too many initializers.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1070: 
error 1523: Too many initializers.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1078: 
error 1523: Too many initializers.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1085: 
error 1523: Too many initializers.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 1091: 
error 1523: Too many initializers.

uname -a
HP-UX capulet B.11.11 U 9000/785 2002932658 unlimited-user 
license

msg22016 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-08-11 22:14
Logged In: YES 
user_id=55188

The attached patch converts C99 usages to plain legacy C.
Can you please test it on HP-UX whether the problem is resolved?
msg22017 - (view) Author: Richard Townsend (rptownsend) Date: 2004-08-12 07:37
Logged In: YES 
user_id=200117

After applying the patch I am still getting two comple errors 
on HP-UX 11i

building '_codecs_iso2022' extension
cc -Ae -DNDEBUG +O2 -z +Onofltacc +ESlit +Oentrysched 
+Odataprefetch +Onolimit +DA2.0 +Z -I. -
I/home/richardt/python-24/Python-2.4a2/./Include -
I/opt/python/include -I/usr/local/include -
I/home/richardt/python-24/Python-2.4a2/Include -
I/home/richardt/python-24/Python-2.4a2 -
c /home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c -o 
build/temp.hp-ux-B.11.11-9000/785-2.4/_codecs_iso2022.o
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.
msg22018 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-08-12 13:03
Logged In: YES 
user_id=55188

Thanks for testing!
I uploaded new patch fixed the problem.
Can you both test the patch whether it compiles?
msg22019 - (view) Author: Richard Townsend (rptownsend) Date: 2004-08-12 15:55
Logged In: YES 
user_id=200117

I did a fresh install of Python-2.2a2 and applied your new 
patch, but I'm still getting compile errors for line 200:

building '_codecs_iso2022' extension
cc -Ae -DNDEBUG +O2 -z +Onofltacc +ESlit +Oentrysched 
+Odataprefetch +Onolimit +DA2.0 +Z -I. -
I/home/richardt/python-24/Python-2.4a2/./Include -
I/opt/python/include -I/usr/local/include -
I/home/richardt/python-24/Python-2.4a2/Include -
I/home/richardt/python-24/Python-2.4a2 -
c /home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c -o 
build/temp.hp-ux-B.11.11-9000/785-2.4/_codecs_iso2022.o
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.
cc: "/home/richardt/python-24/Python-
2.4a2/Modules/cjkcodecs/_codecs_iso2022.c", line 200: error 
1521: Incorrect initialization.

Here are lines 198-203 after applying the patch

#if Py_UNICODE_SIZE == 2
				if (length == 2) {
					ucs4_t u4in
[2] = {(ucs4_t)IN1, (ucs4_t)IN2};
					encoded = 
dsg->encoder(u4in, &length);
				} else
					encoded = 
dsg->encoder(&c, &length);

One of my collegues says that you can't initialise one variable 
with another variable, when using the cc compiler.
msg22020 - (view) Author: Richard Townsend (rptownsend) Date: 2004-08-12 15:57
Logged In: YES 
user_id=200117

Oops! that was a fresh install of Python-2.4a2...
msg22021 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-08-18 13:52
Logged In: YES 
user_id=55188

Thanks for testing. Do you mean that it compiles on HP-UX
with the current patch?
msg22022 - (view) Author: Richard Townsend (rptownsend) Date: 2004-08-18 14:56
Logged In: YES 
user_id=200117

Sorry for the confusion, but it doesn't compile on HP-UX with 
the last patch.

My post of 2004-08-12 16:57 was just correcting a typo in 
the previous post.
msg22023 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-08-19 17:55
Logged In: YES 
user_id=55188

Fixed in CVS. Thanks for the tests and reporting!

Modules/cjkcodecs/README 1.3
Modules/cjkcodecs/_codecs_hk.c 1.2
Modules/cjkcodecs/_codecs_iso2022.c 1.3
Modules/cjkcodecs/cjkcodecs.h 1.5
Modules/cjkcodecs/multibytecodec.c 1.3
Misc/NEWS 1.1106
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40720
2004-08-09 02:36:31dharma_roadkillcreate