Page MenuHomeFreeBSD

lang/micropython: Update to 1.17
ClosedPublic

Authored by kai on Sep 6 2021, 8:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 26, 11:29 AM
Unknown Object (File)
Oct 16 2024, 4:11 PM
Unknown Object (File)
Sep 23 2024, 11:43 AM
Unknown Object (File)
Sep 18 2024, 5:47 AM
Unknown Object (File)
Sep 7 2024, 4:57 PM
Unknown Object (File)
Sep 4 2024, 12:00 AM
Unknown Object (File)
Sep 3 2024, 9:37 AM
Unknown Object (File)
Sep 3 2024, 9:37 AM
Subscribers

Details

Summary
* Switch to GCC because building with Clang leads to a broken
  "mpy-cross" binary, which segfaults if issued with several parameters
  during build. 

* REINPLACE_CMD should not be used to replace static content, hence
  convert those occurrences into patches.

* Also update pkg-descr and sort variables a bit according to the PHB.
Test Plan

This diff is based on the initial work and hints from @decke, without this the update would have taken much longer.

I also tried to apply the workaround described in https://github.com/micropython/micropython/issues/3573 in conjunction with Clang. This leads to a successful build and micropython can be started afterwards, but the test suite fails with many errors.

  • 11.4-RELEASE amd64 i386 -> OK
  • 12.2-RELEASE amd64 i386 -> OK
  • 13.0-RELEASE amd64 aarch64 i386 -> OK (2 tests fails on aarch64, see below for more details)
  • 14.0-CURRENT (1400032 9f7a81b133) amd64 i386 -> OK

Results of make test:

[...]
808 tests performed (21310 individual testcases)
808 tests passed
58 tests skipped: builtin_next_arg2 builtin_range_binop class_inplace_op2 cmd_parsetree extra_coverage ffi_types framebuf1 framebuf16 f
ramebuf2 framebuf4 framebuf8 framebuf_palette framebuf_subclass heap_locked import_mpy_invalid import_mpy_native_gc import_mpy_native_x
64 io_buffered_writer machine_timer math_factorial_intbig memoryview_itemsize namedtuple_asdict repl_words_move resource_stream schedul
e sys_getsizeof sys_settrace_features sys_settrace_generator sys_settrace_loop uasyncio_threadsafeflag ucryptolib_aes128_ctr urandom_ex
tra urandom_extra_float urandom_seed_default ure_debug ure_groups ure_span ure_sub ure_sub_unmatched vfs_basic vfs_blockdev vfs_fat_fil
eio1 vfs_fat_fileio2 vfs_fat_finaliser vfs_fat_more vfs_fat_mtime vfs_fat_oldproto vfs_fat_ramdisk vfs_fat_ramdisklarge vfs_lfs vfs_lfs
_corrupt vfs_lfs_error vfs_lfs_file vfs_lfs_mount vfs_lfs_mtime vfs_lfs_superblock vfs_posix vfs_userfs

On 13.0-RELEASE aarch64 the float_parse and the float_parse_doubleprec tests fails.

Run the tests on amd64:

$ micropython tests/float/float_parse.py > tests-amd64.txt
$ micropython tests/float/float_parse_doubleprec.py >> tests-amd64.txt

Run the tests on aarch64:

$ micropython tests/float/float_parse.py > tests-aarch64.txt
$ micropython tests/float/float_parse_doubleprec.py >> tests-aarch64.txt

Both outputs are different:

$ diff tests-amd64.txt tests-aarch64.txt
6,7c6,8
< 1.0
< 1e+20
---
> 1.000000000000001
> 1.000000000000001e+20
> False
11d11
< True
29,34c29,34
< 1e+300
< 1e+200
< 1.0
< 1.0
< 1e+100
< 1e-100
---
> 1.000000000000003e+300
> 1.000000000000004e+200
> 1.000000000000003
> 1.000000000000003
> 1.000000000000003e+100
> 1.000000000000004e-100

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kai requested review of this revision.Sep 6 2021, 8:33 AM
kai created this revision.

Thanks a lot for dragging it over the finish line! Patches look good to me and testsuite results look promising as well.

This revision is now accepted and ready to land.Sep 6 2021, 1:51 PM
This revision was automatically updated to reflect the committed changes.