ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_func_dlopen=yes ac_cv_lib_socket_socket=no ac_cv_header_linux_vm_sockets_h=no ac_cv_little_endian_double=yes ax_cv_c_float_words_bigendian=no ac_cv_func_rtpSpawn=no ac_cv_func_wait3=no ac_cv_func_wait4=no ac_cv_func_getrusage=no ac_cv_func_accept=no ac_cv_func_accept4=no ## I found some of these in Tools/wasm/config.site-wasm32-wasi -- william # Written by Christian Heimes <[email protected]> # cannot be detected in cross builds ac_cv_buggy_getaddrinfo=no # WASI has no /dev/pt* ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no # dummy readelf, WASI build does not need readelf. ac_cv_prog_ac_ct_READELF=true # get/setrlimit are not supported ac_cv_header_sys_resource_h=no # undefined symbols / unsupported features ac_cv_func_eventfd=no # But we just implement one ourselves in posix-node # pipe2 is Linux-only, so confusing to allow to get enabled. ac_cv_func_pipe=yes ac_cv_func_pipe2=no # We have fork, but don't have fork1 though on macOS or Linux, so disable that ac_cv_func_fork1=no # WASI SDK 15.0 cannot create fifos and special files. ac_cv_func_mkfifo=no ac_cv_func_mkfifoat=no ac_cv_func_mknod=no ac_cv_func_mknodat=no # This was upstream, but I'm not sure it's a problem in zig yet, # so I'm allowing fdopendir for now. We'll see. # fdopendir() fails on SDK 15.0, # OSError: [Errno 28] Invalid argument: '.' # ac_cv_func_fdopendir=no # WASI sockets are limited to operations on given socket fd and inet sockets. # Disable AF_UNIX and AF_PACKET support, see socketmodule.h. ac_cv_header_sys_un_h=no ac_cv_header_netpacket_packet_h=no # That said... i want sockets! ac_cv_func_socket=yes ############################### # This seems to no longer be a problem with the newest zig. # Instead we actually implement realpath in our posix layer. # (WAS: Realpath is stubbed with WASI, hence returns false answers. This # causes _PyPathConfig_ComputeSysPath0 to break horribly at least when # readline is built properly. Yep, a day to figure this out:) # NOTE: os.path.realpath uses readlink rather than realpath. # ac_cv_func_realpath=no # The clock_nanosleep and nanosleep functions both are provided by # zig/musl, but they don't work at all. The select function, which # is what Modules/timemodule.c falls back to, does work, due to # special code I wrote in our WASI layer. Note that I think CPython # and pyodide try to prefer these, but then they are really fake stub # functions and time.sleep(...) is a no-op, which is also very bad. # See https://github.com/python/cpython/commit/4ed8a9a589d2eee7442e0c9417515a707e504faa#diff-4d876038a7287c1070e54aa692759f86856e97df95a9361b2f7f04d637a2bb1eL30 ac_cv_func_clock_nanosleep=no ac_cv_lib_rt_clock_nanosleep=no ac_cv_func_nanosleep=no ac_cv_lib_rt_nanosleep=no # For some reason with wasm32-emscripten, etc., these get detected by autoconf as "yes": # Obviously, inline assembly language won't work! ac_cv_gcc_asm_for_x64=no ac_cv_gcc_asm_for_x87=no ac_cv_gcc_asm_for_mc68881=no # memrchr is not in Zig's MUSL wasi, by the ac detection script thinks it is, hence get a stub # which breaks things ac_cv_func_memrchr=no # epoll is linux only, and doesn't exit in WASM ac_cv_func_epoll_create1=no ac_cv_func_epoll_create=no # Some low level fd copy functionality that isn't implemented: ac_cv_func_splice=no ac_cv_func_fdwalk=no # We do not have this chflags or lchflags yet, but Python would expose it if we did. # nodejs doesn't use the chflags system call anywhere either. ac_cv_have_chflags=no ac_cv_have_lchflags=no # netdb functionality # ac_cv_func_gethostbyname_r is a GNU extension. We implement # ac_cv_func_gethostbyname in our posix-node package so do have it (and # if you disable it, then the cpython build breaks). ac_cv_func_gethostbyname_r=no ac_cv_func_gethostbyname=yes ac_cv_func_gethostbyaddr=yes # Disable all of the process scheduling functionality, which nodejs doesn't provide # either, and of course doesn't make sense in browser. # NO -- as with ac_cv_func_gethostbyname above, doing this just completely breaks # building Python, so instead we have functions that raise errors in our posix module # for now, and later we'll use a nodejs extension module. #ac_cv_header_sched_h=no #ac_cv_func_sched_get_priority_max=no #ac_cv_func_sched_rr_get_interval=no #ac_cv_func_sched_setaffinity=no #ac_cv_func_sched_setparam=no #ac_cv_func_sched_setscheduler=no # Modules # In configure.ac, for the WASI and emscripten targets, they explicitly disable # attempting to build a long list of modules, viewing it as impossible. Of course, # with posix-node, there are probably NO MODULES that we can build and have fully # working via nodejs... and we can have good stubs (at the expense of a slightly # bigger binary). # NO -- doing this has no effect -- the configure.ac script doesn't respect # config.site for module config, unfortunately. Instead, we will explicitly # add an entry to Setup.local, which is what having this as yes would result in. # py_cv_module__posixsubprocess=yes # Signal related functions # We don't have sigaltstack in "-lwasi-emulated-signal", but it gets detected # from headers. It's used in python to handle certain fatal exceptions, # and python gracefully degrades; seems like the sort of thing that might # not be possible in wasm. ac_cv_func_sigaltstack=no ac_cv_func_sigpending=no ac_cv_func_sigtimedwait=no ac_cv_func_sigwait=no ac_cv_func_sigwaitinfo=no # this is something involving swap, which obviously WASM can't # directly deal with. ac_cv_func_plock=no # would have to be maybe in WASI; emscripten also disables this. ac_cv_func_preadv2=no ac_cv_func_pwritev2=no # We don't have this gettext thing; it would return a char* # so a 0-returning stub would cause a segfault; better to work around. ac_cv_func_bind_textdomain_codeset=no # We don't have this; maybe linux only? ac_cv_func_copy_file_range=no # An optimization on linux? ac_cv_func_close_range=no # Not in WASI ac_cv_func_memfd_create=no # Maybe should be added to wasi.ts / WASI? ac_cv_func_getitimer=no ac_cv_func_setitimer=no # Sendfile is part of sockets, and we don't have it (yet): ac_cv_func_sendfile=no # Not in WASI? ac_cv_func_fchownat=no # Working through Python test suite # WASI does have openat, but it doesn't seem to work properly. The problem could # be with my wasi implementation. Pyodide also doesn't support this. With this on, # the test_compile.py test suite fails due to shutil.rmtree failing, so for now # we just disable it. We can debug this later by enabling it, building, and # trying to use shutil.rmtree. TODO: we want to, since other code (not python) # could easily try to use this function, and we want to know exactly why it is broken! ac_cv_func_openat=no # dup3 is a Linux-only function that Python easily implements instead # using dup3 and fcntl. If we enable this it is a pain and slower to have to also # implement it ourselves in Javascript. Let python do it. ac_cv_func_dup3=no # We want to fully support the socket C extension module: ac_cv_func_bind=yes ac_cv_func_getsockname=yes ac_cv_func_listen=yes ac_cv_func_recvfrom=yes ac_cv_func_connect=yes ac_cv_func_sendto=yes ac_cv_func_accept=yes ac_cv_func_setsockopt=yes # Needed for the curses extension module. ac_cv_header_term_h=yes # The less threads the better for us, given our goals. # These are all of the pthread related variables I get in config.log. ac_cv_func_pthread_kill=no ac_cv_func_pthread_condattr_setclock=no ac_cv_func_pthread_detach=no ac_cv_func_pthread_getcpuclockid=no ac_cv_func_pthread_init=no ac_cv_func_pthread_kill=no ac_cv_func_pthread_sigmask=no # I implemented fchdir so we have it. It's nice to make # it available, since python is really nice for testing everything. ac_cv_func_fchdir=yes # We have not implemented openpty yet: ac_cv_func_openpty=no ac_cv_func__getpty=no # We have mmap in zig's WASI but it's not properly implemented. ac_cv_func_mmap=no