Compiling unix build with dupterm support fails on ubuntu
Port, board and/or hardware
unix
MicroPython version
Micropython v1.24.1-dirty (from v1.24-release branch)
Reproduction
git clone -b v1.24-release --depth=1 --single-branch https://github.com/micropython/micropython.git
cd micropython
git submodule update --init
CFLAGS_EXTRA="-DMICROPY_PY_OS_DUPTERM=2" make -C ports/unix
This is executed on a GitHub actions runner (ubuntu-latest).
Expected behaviour
Finish compiling with a working os.dupterm.
Observed behaviour
This exception appears during compilation:
In file included from ../py/runtime.h:29,
from ../py/bc.h:30,
from ../py/emitglue.h:30,
from ../py/compile.h:31,
from ../py/runtime.c:35:
../py/runtime.c: In function ‘mp_init’:
../py/mpstate.h:312:40: error: ‘mp_state_vm_t’ {aka ‘struct _mp_state_vm_t’} has no member named ‘dupterm_objs’
312 | #define MP_STATE_VM(x) (mp_state_ctx.vm.x)
| ^
../py/runtime.c:128:9: note: in expansion of macro ‘MP_STATE_VM’
128 | MP_STATE_VM(dupterm_objs[i]) = MP_OBJ_NULL;
| ^~~~~~~~~~~
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make[1]: *** [../py/mkrules.mk:90: build/py/runtime.o] Error 1
make[1]: Leaving directory '/home/runner/work/mqterm/mqterm/micropython/mpy-cross'
make: *** [../../py/mkrules.mk:179: ../../mpy-cross/build/mpy-cross] Error 2
make: Leaving directory '/home/runner/work/mqterm/mqterm/micropython/ports/unix'
Additional Information
When compiling locally on my machine (M3 MacBook Pro), setting -DMICROPY_PY_OS_DUPTERM=2 correctly enables os.dupterm support.
Code of Conduct
Yes, I agree
Freebsd build failing; regression
Port, board and/or hardware
unix
MicroPython version
Micropython 1.23.0 on FreeBSD14.1
Reproduction
Build failure on FreeBSD 14.1
Cause is as per: #1972 (conflict of re_exec with freebsd uisntd.h)
Commit 7f5d5c72 appears to revert the fix for the above in extmod/modure.c as part of a mass-rename of some modules and functions.
https://github.com/micropython/micropython/commit/7f5d5c72718af773db751269c6ae14037b9c0727
Expected behaviour
A working build ;-)
Observed behaviour
../../extmod/modre.c:197:17: error: conflicting types for 're_exec'; have 'void *(_Bool, uint, void * const*)' {aka 'void
*(_Bool, unsigned int, void * const*)'}
197 | static mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
| ^~~~~~~
In file included from ./mpconfigport.h:33,
from ../../py/mpconfig.h:91,
from ../../py/mpstate.h:31,
from ../../py/runtime.h:29,
from ../../extmod/modre.c:31:
/usr/include/unistd.h:554:10: note: previous declaration of 're_exec' with type 'int(const char *)'
554 | int re_exec(const char *);
| ^~~~~~~
See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
gmake: *** [../../py/mkrules.mk:90: build-standard/extmod/modre.o] Error 1
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree