9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] 5l problem on python276 compilation
@ 2020-07-12  0:22 kokamoto
  2020-07-12  5:29 ` kokamoto
  0 siblings, 1 reply; 9+ messages in thread
From: kokamoto @ 2020-07-12  0:22 UTC (permalink / raw)
  To: kokamoto, 9front

Ok, revised error message is as follows:

mkconfig config-$objtype >config-$objtype.c
pcc -TVwc -I.. -I../Include -DTarm -DPLAN9APE -DPy_BUILD_CORE -DNDEBUG config-arm.c
pcc  -o 5.out config-arm.5 python.5 libpython.a5 libz.a5 libbz2.a5 /arm/lib/ape/libmp.a /arm/lib/ape/libsec.a /arm/lib/ape/lib9.a
@{
	cd ..
	Plan9/5.out -E -S -m sysconfig --generate-posix-vars
}
5.out 7040: warning: emulated arm7500 fpa instr 0xee500110 at 0x22ae90
5.out 7040: suicide: illegal instruction: VFP opcode in emulated mode
mk: @{  cd ...  : exit status=rc 7037: rc 7039: 5.out 7040: illegal instruction: VFP opcode in emulated mode, deleting '../pybuilddir.txt'../pybuilddir.txt: '../pybuilddir.txt' directory entry not found

mk: @{  cd ...  : exit status=rc 719: rc 721: mk 6948: error
mk 714: error


Acid examination is as:

term% acid 7040
/proc/7040/text:arm plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/arm
acid: stk()
collect(generation=0x0)+0x28 /usr/sys/src/python276/cpython/Modules/gcmodule.c:882
collect_generations()+0x74 /usr/sys/src/python276/cpython/Modules/gcmodule.c:1050
_PyObject_GC_Malloc()+0xb8 /usr/sys/src/python276/cpython/Modules/gcmodule.c:1510
PyType_GenericAlloc(nitems=0x0,type=0x25a0cc)+0x3c /usr/sys/src/python276/cpython/Objects/typeobject.c:761
descr_new(name=0x389d59,type=0x320d00)+0x8 /usr/sys/src/python276/cpython/Objects/descrobject.c:614
PyDescr_NewWrapper(base=0x303d9c,wrapped=0x196840)+0x18 /usr/sys/src/python276/cpython/Objects/descrobject.c:680
add_operators(type=0x320d00)+0x10c /usr/sys/src/python276/cpython/Objects/typeobject.c:6412
PyType_Ready(type=0x320d00)+0xd0 /usr/sys/src/python276/cpython/Objects/typeobject.c:4041
_Py_ReadyTypes()+0x180 /usr/sys/src/python276/cpython/Objects/object.c:2131
Py_InitializeEx(install_sigs=0x1)+0x18c /usr/sys/src/python276/cpython/Python/pythonrun.c:189
Py_Initialize()+0x4 /usr/sys/src/python276/cpython/Python/pythonrun.c:382
Py_Main(argv=0x3fffff74,argc=0x6)+0x368 /usr/sys/src/python276/cpython/Modules/main.c:544
main(argc=0x6,argv=0x3fffff74)+0xb8 /usr/sys/src/python276/cpython/Plan9/python.c:55
_main+0x58 /sys/src/ape/lib/ap/arm/main9.s:37
acid: 

>emulated arm7500 fpa instr 0xee500110 at 0x22ae90
and
>illegal instruction: VFP opcode in emulated mode
error messages are from the kernel of arm machine at 9/bcm/vfp3.c.

What I should check for this?

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-12  0:22 [9front] 5l problem on python276 compilation kokamoto
@ 2020-07-12  5:29 ` kokamoto
  2020-07-12  5:38   ` ori
  0 siblings, 1 reply; 9+ messages in thread
From: kokamoto @ 2020-07-12  5:29 UTC (permalink / raw)
  To: 9front

By the way, /arm/include/ape/float.h has wrong definition?
/* define stuff needed for floating conversion */
#define IEEE_8087	1

The last lkine should be
#define IEEE_MC68k		1
?

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-12  5:29 ` kokamoto
@ 2020-07-12  5:38   ` ori
  2020-07-12 23:30     ` kokamoto
  0 siblings, 1 reply; 9+ messages in thread
From: ori @ 2020-07-12  5:38 UTC (permalink / raw)
  To: 9front

> By the way, /arm/include/ape/float.h has wrong definition?
> /* define stuff needed for floating conversion */
> #define IEEE_8087	1
> 
> The last lkine should be
> #define IEEE_MC68k		1
> ?
> 
> Kenji

I think the definition is right. The macro is just badly named. 

 From /sys/src/ape/lib/ap/stdio/fconv.h:20, here's the explanation:

/*
 * #define IEEE_8087 for IEEE-arithmetic machines where the least
 *	significant byte has the lowest address.
 * #define IEEE_MC68k for IEEE-arithmetic machines where the most
 *	significant byte has the lowest address.
 */

What hardware are you running this on?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-12  5:38   ` ori
@ 2020-07-12 23:30     ` kokamoto
  2020-07-13  2:42       ` kokamoto
  0 siblings, 1 reply; 9+ messages in thread
From: kokamoto @ 2020-07-12 23:30 UTC (permalink / raw)
  To: 9front

> What hardware are you running this on?

I'm running rpi3B (not B+) for arm machine.

>  From /sys/src/ape/lib/ap/stdio/fconv.h:20, here's the explanation:
> 
> /*
>  * #define IEEE_8087 for IEEE-arithmetic machines where the least
>  *	significant byte has the lowest address.
>  * #define IEEE_MC68k for IEEE-arithmetic machines where the most
>  *	significant byte has the lowest address.
>  */
> 

I think this is for interger type, however, arm has the nature like:

/* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
   mixed-endian order (byte order 45670123) */
#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-12 23:30     ` kokamoto
@ 2020-07-13  2:42       ` kokamoto
  2020-07-13  3:20         ` ori
  0 siblings, 1 reply; 9+ messages in thread
From: kokamoto @ 2020-07-13  2:42 UTC (permalink / raw)
  To: 9front

> /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
>    mixed-endian order (byte order 45670123) */
> #define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1

In addition, I can build python276 for 386, amd64 and arm64, but
only arm fails by the reason mentioned before.

Please remind the case of netsurf, it works fine for 386, amd64 and arm64,
but don't work as expected for arm. I suppoose this by the same reason...

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-13  2:42       ` kokamoto
@ 2020-07-13  3:20         ` ori
  2020-07-14  4:58           ` kokamoto
  0 siblings, 1 reply; 9+ messages in thread
From: ori @ 2020-07-13  3:20 UTC (permalink / raw)
  To: kokamoto, 9front

>> /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
>>    mixed-endian order (byte order 45670123) */
>> #define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
> 
> In addition, I can build python276 for 386, amd64 and arm64, but
> only arm fails by the reason mentioned before.
> 
> Please remind the case of netsurf, it works fine for 386, amd64 and arm64,
> but don't work as expected for arm. I suppoose this by the same reason...
> 
> Kenji

So, I'll try to figure out how to get an arm cpu server soon to test,
but:

	5.out 7040: warning: emulated arm7500 fpa instr 0xee500110 at 0x22ae90
	5.out 7040: suicide: illegal instruction: VFP opcode in emulated mode
	mk: @{  cd ...  : exit status=rc 7037: rc 7039: 5.out 7040: illegal instruction: VFP opcode in emulated mode, deletin

It sounds like we're somehow generating mixed VFP and arm7500 floating
point instructions, but we should only be generating one of them. I think
we should be defaulting to VFP.

For the sake of testing, can you try adding LDFLAGS=-F when building
for arm?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-13  3:20         ` ori
@ 2020-07-14  4:58           ` kokamoto
  0 siblings, 0 replies; 9+ messages in thread
From: kokamoto @ 2020-07-14  4:58 UTC (permalink / raw)
  To: 9front

> 	5.out 7040: warning: emulated arm7500 fpa instr 0xee500110 at 0x22ae90
> 	5.out 7040: suicide: illegal instruction: VFP opcode in emulated mode
> 	mk: @{  cd ...  : exit status=rc 7037: rc 7039: 5.out 7040: illegal instruction: VFP opcode in emulated mode, deletin
> 
> It sounds like we're somehow generating mixed VFP and arm7500 floating
> point instructions, but we should only be generating one of them. I think
> we should be defaulting to VFP.
> 
> For the sake of testing, can you try adding LDFLAGS=-F when building
> for arm?

I did, and the result is the same:
mkconfig config-$objtype >config-$objtype.c
pcc -TVwc -I.. -I../Include -DTarm -DPLAN9APE -DPy_BUILD_CORE -DNDEBUG LDFLAGS=-F config-arm.c
pcc  -o 5.out config-arm.5 python.5 libpython.a5 libz.a5 libbz2.a5 /arm/lib/ape/libmp.a /arm/lib/ape/libsec.a /arm/lib/ape/lib9.a
@{
	cd ..
	Plan9/5.out -E -S -m sysconfig --generate-posix-vars
}
5.out 6759: warning: emulated arm7500 fpa instr 0xee500110 at 0x22ae90
5.out 6759: suicide: illegal instruction: VFP opcode in emulated mode
mk: @{  cd ...  : exit status=rc 6756: rc 6758: 5.out 6759: illegal instruction: VFP opcode in emulated mode, deleting '../pybuilddir.txt'
mk: @{  cd ...  : exit status=rc 481: rc 483: mk 6668: error
mk 476: error

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-11 22:28 ` [9front] " kokamoto
@ 2020-07-12  0:22   ` kokamoto
  0 siblings, 0 replies; 9+ messages in thread
From: kokamoto @ 2020-07-12  0:22 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

I forgot to update the 5l sources, obj.c was updated
at May 2020.

Sorry noise

Kenji

[-- Attachment #2: Type: message/rfc822, Size: 3024 bytes --]

From: kokamoto@hera.eonet.ne.jp
To: 9front@9front.org
Subject: Re: [9front] 5l problem on python276 compilation
Date: Sun, 12 Jul 2020 07:28:46 +0900
Message-ID: <91DD69073E2788CF105B0444B1B590CD@hera.eonet.ne.jp>

I forgot to include the 5l line which caused this error:

mk
pcc  -o 5.out config-arm.5 python.5 libpython.a5 libz.a5 libbz2.a5 /arm/lib/ape/libmp.a /arm/lib/ape/libsec.a /arm/lib/ape/lib9.a
/5l 511: suicide: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
pcc: 5l: 5l 511: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
mk: pcc  -o ...  : exit status=rc 508: pcc 510: 5l: 5l 511: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
mk: @{  cd ...  : exit status=rc 450: rc 452: mk 453: error

term% acid 542 (542 is 5l process number)
/proc/542/text:arm plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/arm
acid: stk()
ldobj(f=0x4,pn=0x3ffffd54,c=0x6d0)+0x8cc /sys/src/cmd/5l/obj.c:1054
objfile(file=0x3fffff55)+0x4f8 /sys/src/cmd/5l/obj.c:415
main(argc=0x9,argv=0x3fffff14)+0x32c /sys/src/cmd/5l/obj.c:242
_main+0x28 /sys/src/libc/arm/main9.s:19
acid: 

Kenji

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9front] 5l problem on python276 compilation
  2020-07-11 22:10 kokamoto
@ 2020-07-11 22:28 ` kokamoto
  2020-07-12  0:22   ` kokamoto
  0 siblings, 1 reply; 9+ messages in thread
From: kokamoto @ 2020-07-11 22:28 UTC (permalink / raw)
  To: 9front

I forgot to include the 5l line which caused this error:

mk
pcc  -o 5.out config-arm.5 python.5 libpython.a5 libz.a5 libbz2.a5 /arm/lib/ape/libmp.a /arm/lib/ape/libsec.a /arm/lib/ape/lib9.a
/5l 511: suicide: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
pcc: 5l: 5l 511: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
mk: pcc  -o ...  : exit status=rc 508: pcc 510: 5l: 5l 511: sys: alignment: pc 0x9cac va 0x1ff7c1
 pc=0x9cac
mk: @{  cd ...  : exit status=rc 450: rc 452: mk 453: error

term% acid 542 (542 is 5l process number)
/proc/542/text:arm plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/arm
acid: stk()
ldobj(f=0x4,pn=0x3ffffd54,c=0x6d0)+0x8cc /sys/src/cmd/5l/obj.c:1054
objfile(file=0x3fffff55)+0x4f8 /sys/src/cmd/5l/obj.c:415
main(argc=0x9,argv=0x3fffff14)+0x32c /sys/src/cmd/5l/obj.c:242
_main+0x28 /sys/src/libc/arm/main9.s:19
acid: 

Kenji



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-14  4:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12  0:22 [9front] 5l problem on python276 compilation kokamoto
2020-07-12  5:29 ` kokamoto
2020-07-12  5:38   ` ori
2020-07-12 23:30     ` kokamoto
2020-07-13  2:42       ` kokamoto
2020-07-13  3:20         ` ori
2020-07-14  4:58           ` kokamoto
  -- strict thread matches above, loose matches on Subject: below --
2020-07-11 22:10 kokamoto
2020-07-11 22:28 ` [9front] " kokamoto
2020-07-12  0:22   ` kokamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).