GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — posixmodule "undeclared function" error when compiling with sanitizer options on Termux (Android) · Issue #140317 · python/cpython

posixmodule "undeclared function" error when compiling with sanitizer options on Termux (Android) #140317

New issue
Copy link
New issue
Copy link
Open
Open
posixmodule "undeclared function" error when compiling with sanitizer options on Termux (Android)#140317
Copy link
Labels
OS-androidbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dir

Description

@theothernighttheotherday
theothernighttheotherday
opened on Oct 19, 2025
Issue body actions

Python fails to compile when compiling with the sanitizer option.

Python/fileutils.c:458:1: warning:                  unused function 'decode_current_locale'       [-Wunused-function]                       458 | decode_current_locale(const char* arg...                                                  | ^~~~~~~~~~~~~~~~~~~~~                 
Python/fileutils.c:677:1: warning:                  unused function 'encode_current_locale'       [-Wunused-function]                       677 | encode_current_locale(const wchar_t *t...                                                 | ^~~~~~~~~~~~~~~~~~~~~                 2 warnings generated.                         
./Modules/posixmodule.c:10400:15: error:            call to undeclared function 'wait3'; ISO      C99 and later do not support implicit         function declarations                         [-Wimplicit-function-declaration]        10400 |         pid = wait3(&status, options, &ru);                                               |               ^                      1 error generated.                            make: *** 
[Makefile:3808: Modules/posixmodule.o] Error 1                                    make: *** Waiting for unfinished jobs...

clang option use.

aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined
aarch64-linux-android-clang++ -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr

aarch64-linux-android-clang --version                                  
 clang version 21.1.3                         
 Target: aarch64-unknown-linux-android24       
Thread model: posix                           
InstalledDir: /data/data/com.termux/files/usr/bin
.git revision is at bedaea05987738c4c6b958d19cec9621bec09f07

Compiling with no sanitizer option works.

Activity

  1. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    buildThe build process and cross-buildThe build process and cross-build
    OS-android
    on Oct 19, 2025
  2. StanFromIreland commented on Oct 19, 2025

    @StanFromIreland
    StanFromIreland
    on Oct 19, 2025
    Member
    More actions

    CC @mhsmith

  3. mhsmith commented on Oct 19, 2025

    @mhsmith
    mhsmith
    on Oct 19, 2025
    Member
    More actions

    Please post:

    • All the commands you ran to do the configure and make, including how you set the sanitizer options.
    • The full output from configure and make.
    • Are you building this on Termux, or are you building it on a different platform for Termux, in which case which one?
    Reacted by Stan Ulbrych
  4. mhsmith
    changed the title [-]posixmodule error when compiling with sanitizer options[/-] [+]posixmodule "undeclared function" error when compiling with sanitizer options on Termux (Android)[/+] on Oct 19, 2025
  5. theothernighttheotherday commented on Oct 19, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 19, 2025
    Author
    More actions

    hi,

    @mhsmith i am compiling this on termux. below is the output of the configure script.

    For python 3.14 branch, it also fail to build at the posixmodule when the sanitizer options are enable.

    i follow the guide https://devguide.python.org/development-tools/clang/ for the sanitizer options.

    output below.

    *** configure-script

    export CC="aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined"
    export CXX="aarch64-linux-android-clang++ -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr"
    export AR=llvm-ar
    export RANLIB=llvm-ranlib
    export AS=llvm-as                       export LD=ld.lld
    export NM=llvm-nm
    export OBJCOPY=llvm-objcopy             export OBJDUMP=llvm-objdump
    export STRIP=llvm-strip                 ./configure --prefix=$HOME/o/python315 \
    --with-pydebug \
    --with-remote-debug=no
    
    output of configure
    checking for git... found
    checking build system type... aarch64-unknown-linux-android                     checking host system type... aarch64-unknown-linux-android
    checking for Python interpreter freezing... ./_bootstrap_python                 checking for python3.15... python3.15
    checking Python for regen version... Python 3.15.0a1+                           checking for pkg-config... /data/data/com.termux/files/usr/bin/pkg-config       checking pkg-config is at least version 0.9.0... yes
    checking MACHDEP... "linux"
    checking for --enable-universalsdk... no
    checking for --with-universal-archs... no                                       checking for --with-app-store-compliance... not patching for app store compliance
    checking for gcc... aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether the compiler supports GNU C... yes
    checking whether aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined accepts -g... yes
    checking for aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined option to enable C11 features... none needed
    checking how to run the C preprocessor... aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined -E
    checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
    checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed
    checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
    checking for CC compiler name... clang
    checking for stdio.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for strings.h... yes
    checking for sys/stat.h... yes
    checking for sys/types.h... yes
    checking for unistd.h... yes
    checking for wchar.h... yes
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking whether _XOPEN_SOURCE should be defined... no
    checking for GCC compatible compiler... yes
    checking for the platform triplet based on compiler characteristics... aarch64-linux-android
    checking for multiarch... aarch64-linux-android
    checking for PEP 11 support tier... aarch64-unknown-linux-android/clang has tier 3 (partially supported)
    checking for -Wl,--no-as-needed... yes
    checking for the Android API level... 24
    checking for the Android arm ABI... 8
    checking for --enable-wasm-dynamic-linking... missing
    checking for --enable-wasm-pthreads... missing
    checking for --with-suffix...
    checking for case-insensitive build directory... no
    checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
    checking LINKCC... $(PURIFY) $(CC)
    checking EXPORTSYMS...
    checking for GNU ld... yes
    checking for --enable-shared... no
    checking for --with-static-libpython... yes
    checking for --enable-profiling... no
    checking LDLIBRARY... libpython$(VERSION)$(ABIFLAGS).a
    checking HOSTRUNNER...
    checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
    checking for a race-free mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p
    checking for --disable-gil... no
    checking for --with-pydebug... yes
    checking for --with-trace-refs... no
    checking for --enable-pystats... no
    checking for --with-assertions... implied by --with-pydebug
    checking for --enable-optimizations... no
    checking PROFILE_TASK... -m test --pgo --timeout=$(TESTTIMEOUT)
    checking for --with-lto... no
    checking for llvm-profdata... /data/data/com.termux/files/usr/bin/llvm-profdata
    checking for --enable-bolt... no
    checking BOLT_COMMON_FLAGS... checking BOLT_INSTRUMENT_FLAGS...  -update-debug-sections -skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1
    checking BOLT_APPLY_FLAGS...   -update-debug-sections -skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1  -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot
    checking if aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined supports -fstrict-overflow and -fno-strict-overflow... yes
    checking for --with-strict-overflow... no
    checking if aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined supports -Og optimization level... yes
    checking for --enable-safety... no
    checking for --enable-slower-safety... no
    checking if we can add -Wextra... yes
    checking whether aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined -fno-strict-aliasing accepts and needs -fno-strict-aliasing... no
    checking if we can disable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined unused-parameter warning... yes
    checking if we can disable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined int-conversion warning... yes
    checking if we can disable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined missing-field-initializers warning... yes
    checking if we can enable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined sign-compare warning... yes
    checking if we can enable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined unreachable-code warning... yes
    checking if we can enable aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined strict-prototypes warning... yes
    checking if we can make implicit function declaration an error in aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined -Werror=implicit-function-declaration... yes
    checking if we can use visibility in aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined -fvisibility=hidden... yes
    checking for --enable-experimental-jit...
    checking whether pthreads are available without options... yes
    checking whether aarch64-linux-android-clang++ -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr also accepts flags for thread support... no
    checking for alloca.h... yes
    checking for asm/types.h... yes
    checking for bluetooth.h... no
    checking for conio.h... no
    checking for direct.h... no
    checking for dlfcn.h... yes
    checking for endian.h... yes
    checking for errno.h... yes
    checking for fcntl.h... yes
    checking for grp.h... yes
    checking for io.h... no
    checking for langinfo.h... yes
    checking for libintl.h... yes
    checking for libutil.h... no
    checking for linux/auxvec.h... yes
    checking for sys/auxv.h... yes
    checking for linux/fs.h... yes
    checking for linux/limits.h... yes
    checking for linux/memfd.h... yes
    checking for linux/netfilter_ipv4.h... yes
    checking for linux/random.h... yes
    checking for linux/soundcard.h... yes
    checking for linux/sched.h... yes
    checking for linux/tipc.h... yes
    checking for linux/wait.h... yes
    checking for netdb.h... yes
    checking for net/ethernet.h... yes
    checking for netinet/in.h... yes
    checking for netpacket/packet.h... yes
    checking for poll.h... yes
    checking for process.h... no
    checking for pthread.h... yes
    checking for pty.h... yes
    checking for sched.h... yes
    checking for setjmp.h... yes
    checking for shadow.h... no
    checking for signal.h... yes
    checking for spawn.h... yes
    checking for stropts.h... no
    checking for sys/audioio.h... no
    checking for sys/bsdtty.h... no
    checking for sys/devpoll.h... no
    checking for sys/endian.h... yes
    checking for sys/epoll.h... yes
    checking for sys/event.h... no
    checking for sys/eventfd.h... yes
    checking for sys/file.h... yes
    checking for sys/ioctl.h... yes
    checking for sys/kern_control.h... no
    checking for sys/loadavg.h... no
    checking for sys/lock.h... no
    checking for sys/memfd.h... no
    checking for sys/mkdev.h... no
    checking for sys/mman.h... yes
    checking for sys/modem.h... no
    checking for sys/param.h... yes
    checking for sys/pidfd.h... yes
    checking for sys/poll.h... yes
    checking for sys/random.h... yes
    checking for sys/resource.h... yes
    checking for sys/select.h... yes
    checking for sys/sendfile.h... yes
    checking for sys/socket.h... yes
    checking for sys/soundcard.h... no
    checking for sys/stat.h... (cached) yes
    checking for sys/statvfs.h... yes
    checking for sys/sys_domain.h... no
    checking for sys/syscall.h... yes
    checking for sys/sysmacros.h... yes
    checking for sys/termio.h... no
    checking for sys/time.h... yes
    checking for sys/times.h... yes
    checking for sys/timerfd.h... yes
    checking for sys/types.h... (cached) yes
    checking for sys/uio.h... yes
    checking for sys/un.h... yes
    checking for sys/utsname.h... yes
    checking for sys/wait.h... yes
    checking for sys/xattr.h... yes
    checking for sysexits.h... yes
    checking for syslog.h... yes
    checking for termios.h... yes
    checking for util.h... no
    checking for utime.h... yes
    checking for utmp.h... yes
    checking for dirent.h that defines DIR... yes
    checking for library containing opendir... none required
    checking for sys/mkdev.h... (cached) no
    checking for sys/sysmacros.h... (cached) yes
    checking for bluetooth/bluetooth.h... no
    checking for net/if.h... yes
    checking for linux/netlink.h... yes
    checking for netlink/netlink.h... no
    checking for linux/qrtr.h... yes
    checking for linux/vm_sockets.h... yes
    checking for linux/can.h... yes
    checking for linux/can/bcm.h... yes
    checking for linux/can/isotp.h... yes
    checking for linux/can/j1939.h... yes
    checking for linux/can/raw.h... yes
    checking for netcan/can.h... no
    checking for clock_t... yes
    checking for makedev... yes
    checking for le64toh... yes
    checking for mode_t... yes
    checking for off_t... yes
    checking for pid_t... yes
    checking for size_t... yes
    checking for uid_t... yes
    checking for gid_t... yes
    checking for ssize_t... yes
    checking for __uint128_t... yes
    checking size of int... 4
    checking size of long... 8
    checking alignment of long... 8
    checking size of long long... 8
    checking size of void *... 8
    checking size of short... 2
    checking size of float... 4
    checking size of double... 8
    checking size of fpos_t... 8
    checking size of size_t... 8
    checking alignment of size_t... 8
    checking size of pid_t... 4
    checking size of uintptr_t... 8
    checking alignment of max_align_t... 16
    checking for long double... yes
    checking size of long double... 16
    checking size of _Bool... 1
    checking size of off_t... 8
    checking whether to enable large file support... no
    checking size of time_t... 8
    checking for pthread_t... yes
    checking size of pthread_t... 8
    checking size of pthread_key_t... 4
    checking whether pthread_key_t is compatible with int... yes
    checking for --enable-framework... no
    checking for --with-dsymutil... no
    checking for dyld... no
    checking for --with-address-sanitizer... no
    checking for --with-memory-sanitizer... no
    checking for --with-undefined-behavior-sanitizer... no
    checking for --with-thread-sanitizer... no
    checking the extension of shared libraries... .so
    checking LDSHARED... $(CC) -shared
    checking BLDSHARED flags... $(CC) -shared
    checking CCSHARED... -fPIC
    checking LINKFORSHARED... -Xlinker -export-dynamic
    checking CFLAGSFORSHARED...
    checking SHLIBS... $(LIBS)
    checking perf trampoline... no
    checking for sendfile in -lsendfile... no
    checking for dlopen in -ldl... yes
    checking for shl_load in -ldld... no
    checking for execinfo.h... yes
    checking for backtrace... no
    checking for dladdr1... no
    checking for link.h... yes
    checking for backtrace... (cached) no
    checking for dladdr1... (cached) no
    checking for dlfcn.h... (cached) yes
    checking for backtrace... (cached) no
    checking for dladdr1... (cached) no
    checking for uuid.h... no
    checking for uuid >= 2.20... yes
    checking for library containing sem_init... none required
    checking for textdomain in -lintl... no
    checking aligned memory access is required... no
    checking for --with-hash-algorithm... default
    checking for --with-tzpath... "/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
    checking for t_open in -lnsl... no
    checking for socket in -lsocket... no
    checking for --with-libs... no
    checking for --with-system-expat... no
    checking for libffi... yes
    checking for ffi_prep_cif_var... yes
    checking for ffi_prep_closure_loc... yes
    checking for ffi_closure_alloc... yes
    checking libffi has complex type support... yes
    checking for --with-system-libmpdec... yes
    checking for libmpdec >= 2.5.0... no
    checking for --with-decimal-contextvar... yes
    checking for sqlite3 >= 3.15.2... yes
    checking for sqlite3.h... yes
    checking for sqlite3_bind_double in -lsqlite3... yes
    checking for sqlite3_column_decltype in -lsqlite3... yes
    checking for sqlite3_column_double in -lsqlite3... yes
    checking for sqlite3_complete in -lsqlite3... yes
    checking for sqlite3_progress_handler in -lsqlite3... yes
    checking for sqlite3_result_double in -lsqlite3... yes
    checking for sqlite3_set_authorizer in -lsqlite3... yes
    checking for sqlite3_trace_v2 in -lsqlite3... yes
    checking for sqlite3_value_double in -lsqlite3... yes
    checking for sqlite3_load_extension in -lsqlite3... yes
    checking for sqlite3_serialize in -lsqlite3... yes
    checking for --enable-loadable-sqlite-extensions... no
    checking for gdbm.h... yes
    checking for gdbm_open in -lgdbm... yes
    checking for ndbm.h... yes
    checking for library containing dbm_open... -lgdbm_compat
    checking for ndbm presence and linker args... yes (-lgdbm_compat)
    checking for gdbm/ndbm.h... no
    checking for gdbm-ndbm.h... no
    checking for db.h... yes
    checking for libdb... no
    checking for --with-dbmliborder... gdbm:ndbm:bdb
    checking for _dbm module CFLAGS and LIBS... -DUSE_NDBM -lgdbm_compat
    checking if PTHREAD_SCOPE_SYSTEM is supported... yes
    checking for pthread_sigmask... yes
    checking for pthread_getcpuclockid... yes
    checking if --enable-ipv6 is specified... yes
    checking if RFC2553 API is available... yes
    checking for IPV6_INRIA_VERSION defined in netinet/in.h... no
    checking for __KAME__ defined in netinet/in.h... no
    checking for __GLIBC__ defined in features.h... no
    checking for _TOSHIBA_INET6 defined in sys/param.h... no
    checking for __V6D__ defined in /usr/local/v6/include/sys/v6config.h... no
    checking for _ZETA_MINAMI_INET6 defined in sys/param.h... no
    checking ipv6 stack type... unknown
    checking CAN_RAW_FD_FRAMES... yes
    checking for CAN_RAW_JOIN_FILTERS... yes
    checking for --with-doc-strings... yes
    checking for stdatomic.h... yes
    checking for builtin __atomic_load_n and __atomic_store_n functions... yes
    checking for --with-mimalloc... yes
    checking for --with-pymalloc... yes
    checking for --with-c-locale-coercion... yes
    checking for --with-valgrind... no
    checking for --with-dtrace... no
    checking for dlopen... yes
    checking DYNLOADFILE... dynload_shlib.o
    checking MACHDEP_OBJS... none
    checking for accept4... yes
    checking for alarm... yes
    checking for bind_textdomain_codeset... no
    checking for chmod... yes
    checking for chown... yes
    checking for clearenv... yes
    checking for clock... yes
    checking for closefrom... no
    checking for close_range... no
    checking for confstr... no
    checking for copy_file_range... no
    checking for ctermid... yes
    checking for dladdr... yes
    checking for dup... yes
    checking for dup3... yes
    checking for execv... yes
    checking for explicit_bzero... no
    checking for explicit_memset... no
    checking for faccessat... yes
    checking for fchmod... yes
    checking for fchmodat... yes
    checking for fchown... yes
    checking for fchownat... yes
    checking for fdopendir... yes
    checking for fdwalk... no
    checking for fexecve... no
    checking for fork... yes
    checking for fork1... no
    checking for fpathconf... yes
    checking for fstatat... yes
    checking for ftime... yes
    checking for ftruncate... yes
    checking for futimens... yes
    checking for futimes... no
    checking for futimesat... no
    checking for gai_strerror... yes
    checking for getegid... yes
    checking for geteuid... yes
    checking for getgid... yes
    checking for getgrent... no
    checking for getgrgid... yes
    checking for getgrgid_r... yes
    checking for getgrnam_r... yes
    checking for getgrouplist... yes
    checking for gethostname... yes
    checking for getitimer... yes
    checking for getloadavg... no
    checking for getlogin... yes
    checking for getlogin_r... no
    checking for getpeername... yes
    checking for getpgid... yes
    checking for getpid... yes
    checking for getppid... yes
    checking for getpriority... yes
    checking for _getpty... no
    checking for getpwent... no
    checking for getpwnam_r... yes
    checking for getpwuid... yes
    checking for getpwuid_r... yes
    checking for getresgid... yes
    checking for getresuid... yes
    checking for getrusage... yes
    checking for getsid... yes
    checking for getspent... no
    checking for getspnam... no
    checking for getuid... yes
    checking for getwd... no
    checking for grantpt... yes
    checking for if_nameindex... yes
    checking for initgroups... yes
    checking for kill... yes
    checking for killpg... yes
    checking for lchown... yes
    checking for linkat... yes
    checking for lockf... yes
    checking for lstat... yes
    checking for lutimes... no
    checking for madvise... yes
    checking for mbrtowc... yes
    checking for memrchr... yes
    checking for mkdirat... yes
    checking for mkfifo... yes
    checking for mkfifoat... yes
    checking for mknod... yes
    checking for mknodat... yes
    checking for mktime... yes
    checking for mmap... yes
    checking for mremap... yes
    checking for nice... yes
    checking for openat... yes
    checking for opendir... yes
    checking for pathconf... yes
    checking for pause... yes
    checking for pipe... yes
    checking for pipe2... yes
    checking for plock... no
    checking for poll... yes
    checking for posix_fadvise... yes
    checking for posix_fallocate... yes
    checking for posix_openpt... yes
    checking for posix_spawn... yes
    checking for posix_spawnp... yes
    checking for posix_spawn_file_actions_addclosefrom_np... no
    checking for pread... yes
    checking for preadv... yes
    checking for preadv2... no
    checking for process_vm_readv... yes
    checking for pthread_cond_timedwait_relative_np... no
    checking for pthread_condattr_setclock... yes
    checking for pthread_init... no
    checking for pthread_kill... yes
    checking for pthread_get_name_np... no
    checking for pthread_getname_np... no
    checking for pthread_set_name_np... no
    checking for pthread_setname_np... yes
    checking for pthread_getattr_np... yes
    checking for ptsname... yes
    checking for ptsname_r... yes
    checking for pwrite... yes
    checking for pwritev... yes
    checking for pwritev2... no
    checking for readlink... yes
    checking for readlinkat... yes
    checking for readv... yes
    checking for realpath... yes
    checking for renameat... yes
    checking for rtpSpawn... no
    checking for sched_get_priority_max... yes
    checking for sched_rr_get_interval... yes
    checking for sched_setaffinity... yes
    checking for sched_setparam... yes
    checking for sched_setscheduler... yes
    checking for sem_clockwait... no
    checking for sem_getvalue... yes
    checking for sem_open... yes
    checking for sem_timedwait... yes
    checking for sem_unlink... yes
    checking for sendfile... yes
    checking for setegid... yes
    checking for seteuid... yes
    checking for setgid... yes
    checking for sethostname... yes
    checking for setitimer... yes
    checking for setlocale... yes
    checking for setpgid... yes
    checking for setpgrp... yes
    checking for setpriority... yes
    checking for setregid... yes
    checking for setresgid... yes
    checking for setresuid... yes
    checking for setreuid... yes
    checking for setsid... yes
    checking for setuid... yes
    checking for setvbuf... yes
    checking for shutdown... yes
    checking for sigaction... yes
    checking for sigaltstack... yes
    checking for sigfillset... yes
    checking for siginterrupt... yes
    checking for sigpending... yes
    checking for sigrelse... no
    checking for sigtimedwait... yes
    checking for sigwait... yes
    checking for sigwaitinfo... yes
    checking for snprintf... yes
    checking for splice... yes
    checking for strftime... yes
    checking for strlcpy... yes
    checking for strsignal... yes
    checking for symlinkat... yes
    checking for sync... yes
    checking for sysconf... yes
    checking for tcgetpgrp... yes
    checking for tcsetpgrp... yes
    checking for tempnam... yes
    checking for timegm... yes
    checking for times... yes
    checking for tmpfile... yes
    checking for tmpnam... yes
    checking for tmpnam_r... no
    checking for truncate... yes
    checking for ttyname_r... yes
    checking for umask... yes
    checking for uname... yes
    checking for unlinkat... yes
    checking for unlockpt... yes
    checking for utimensat... yes
    checking for utimes... yes
    checking for vfork... yes
    checking for wait... yes
    checking for wait3... yes
    checking for wait4... yes
    checking for waitid... yes
    checking for waitpid... yes
    checking for wcscoll... yes
    checking for wcsftime... yes
    checking for wcsxfrm... yes
    checking for wmemcmp... yes
    checking for writev... yes
    checking for statx... no
    checking for getentropy... no
    checking for getgroups... yes
    checking for system... yes
    checking for aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined options needed to detect all undeclared functions... none needed
    checking whether dirfd is declared... yes
    checking for chroot... yes
    checking for link... yes
    checking for symlink... yes
    checking for fchdir... yes
    checking for fsync... yes
    checking for fdatasync... yes
    checking for epoll_create... yes
    checking for epoll_create1... yes
    checking for kqueue... no
    checking for prlimit... yes
    checking for _dyld_shared_cache_contains_path... no
    checking for memfd_create... no
    checking for eventfd... yes
    checking for timerfd_create... yes
    checking for ctermid_r... no
    checking for flock declaration... yes
    checking for flock... yes
    checking for getpagesize... yes
    checking for broken unsetenv... no
    checking for true... true
    checking for inet_aton in -lc... yes
    checking for hstrerror in -lc... yes
    checking for chflags... no
    checking for lchflags... no
    checking for zlib >= 1.2.2.1... yes
    checking for bzip2... no
    checking for bzlib.h... yes
    checking for BZ2_bzCompress in -lbz2... yes
    checking for liblzma... yes
    checking for libzstd >= 1.4.5... yes
    checking for hstrerror... yes
    checking for getservbyname... yes
    checking for getservbyport... yes
    checking for gethostbyname... yes
    checking for gethostbyaddr... yes
    checking for getprotobyname... yes
    checking for inet_aton... yes
    checking for inet_ntoa... yes
    checking for inet_pton... yes
    checking for getpeername... (cached) yes
    checking for getsockname... yes
    checking for accept... yes
    checking for bind... yes
    checking for connect... yes
    checking for listen... yes
    checking for recvfrom... yes
    checking for sendto... yes
    checking for setsockopt... yes
    checking for socket... yes
    checking for setgroups... yes
    checking whether MAXLOGNAME is declared... no
    checking whether UT_NAMESIZE is declared... yes
    checking for openpty... yes
    checking for library containing login_tty... none required
    checking for forkpty... yes
    checking for fseek64... no
    checking for fseeko... yes
    checking for fstatvfs... yes
    checking for ftell64... no
    checking for ftello... yes
    checking for statvfs... yes
    checking for dup2... yes
    checking for getpgrp... yes
    checking for setpgrp... (cached) yes
    checking for setns... yes
    checking for unshare... yes
    checking for clock_gettime... yes
    checking for clock_getres... yes
    checking for clock_settime... yes
    checking for clock_nanosleep... yes
    checking for nanosleep... yes
    checking for major, minor, and makedev... yes
    checking for getaddrinfo... yes
    checking getaddrinfo bug... no
    checking for getnameinfo... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for struct tm.tm_zone... yes
    checking for struct stat.st_rdev... yes
    checking for struct stat.st_blksize... yes
    checking for struct stat.st_flags... no
    checking for struct stat.st_gen... no
    checking for struct stat.st_birthtime... no
    checking for struct stat.st_blocks... yes
    checking for struct passwd.pw_gecos... yes
    checking for struct passwd.pw_passwd... yes
    checking for siginfo_t.si_band... yes
    checking for time.h that defines altzone... no
    checking for addrinfo... yes
    checking for sockaddr_storage... yes
    checking for sockaddr_alg... yes
    checking for an ANSI C-conforming const... yes
    checking for working signed char... yes
    checking for prototypes... yes
    checking for socketpair... yes
    checking if sockaddr has sa_len member... no
    checking for gethostbyname_r... yes
    checking gethostbyname_r with 6 args... yes
    checking for __fpu_control... no
    checking for __fpu_control in -lieee... no
    checking for --with-libm=STRING... default LIBM="-lm"
    checking for --with-libc=STRING... default LIBC=""
    checking for x64 gcc inline assembler... no
    checking whether float word ordering is bigendian... no
    checking whether we can use gcc inline assembler to get and set x87 control word... no
    checking whether we can use gcc inline assembler to get and set mc68881 fpcr... no
    checking for x87-style double rounding... no
    checking for acosh... yes
    checking for asinh... yes
    checking for atanh... yes
    checking for erf... yes
    checking for erfc... yes
    checking for expm1... yes
    checking for log1p... yes
    checking for log2... yes
    checking whether POSIX semaphores are enabled... no
    checking for broken sem_getvalue... yes
    checking whether RTLD_LAZY is declared... yes
    checking whether RTLD_NOW is declared... yes
    checking whether RTLD_GLOBAL is declared... yes
    checking whether RTLD_LOCAL is declared... yes
    checking whether RTLD_NODELETE is declared... yes
    checking whether RTLD_NOLOAD is declared... yes
    checking whether RTLD_DEEPBIND is declared... no
    checking whether RTLD_MEMBER is declared... no
    checking digit size for Python's longs... no value specified
    checking for wchar.h... (cached) yes
    checking size of wchar_t... 4
    checking whether wchar_t is signed... no
    checking whether wchar_t is usable... yes
    checking whether byte ordering is bigendian... no
    checking ABIFLAGS... d
    checking SOABI... cpython-315d-aarch64-linux-android
    checking LDVERSION... $(VERSION)$(ABIFLAGS)
    checking for --with-platlibdir... no
    checking for --with-wheel-pkg-dir... no
    checking whether right shift extends the sign bit... yes
    checking for getc_unlocked() and friends... yes
    checking for readline... yes
    checking how to link readline... readline (CFLAGS: -DNCURSES_WIDECHAR -I/data/data/com.termux/files/usr/include, LIBS: -L/data/data/com.termux/files/usr/lib -lreadline)
    checking whether rl_completion_append_character is declared... yes
    checking whether rl_completion_suppress_append is declared... yes
    checking for rl_pre_input_hook in -lreadline... yes
    checking for rl_completion_display_matches_hook in -lreadline... yes
    checking for rl_resize_terminal in -lreadline... yes
    checking for rl_completion_matches in -lreadline... yes
    checking whether rl_catch_signals is declared... yes
    checking for append_history in -lreadline... yes
    checking for rl_compdisp_func_t... yes
    checking if rl_startup_hook takes arguments... no
    checking for broken nice()... no
    checking for broken poll()... no
    checking for working tzset()... yes
    checking for tv_nsec in struct stat... yes
    checking for tv_nsec2 in struct stat... no
    checking for ncursesw... yes
    checking for panelw... yes
    checking for ncursesw/curses.h... yes
    checking for ncursesw/ncurses.h... yes
    checking for ncursesw/panel.h... yes
    checking for ncurses/curses.h... yes
    checking for ncurses/ncurses.h... yes
    checking for ncurses/panel.h... yes
    checking for curses.h... yes
    checking for ncurses.h... yes
    checking for panel.h... yes
    checking for library containing initscr... none required
    checking for library containing update_panels... none required
    checking for term.h... yes
    checking whether mvwdelch is an expression... yes
    checking whether WINDOW has _flags... no
    checking for curses function is_pad... yes
    checking for curses function is_term_resized... yes
    checking for curses function resize_term... yes
    checking for curses function resizeterm... yes
    checking for curses function immedok... yes
    checking for curses function syncok... yes
    checking for curses function wchgat... yes
    checking for curses function filter... yes
    checking for curses function has_key... yes
    checking for curses function typeahead... yes
    checking for curses function use_env... yes
    configure: checking for device files
    checking for /dev/ptmx... yes
    checking for /dev/ptc... no
    checking for socklen_t... yes
    checking for broken mbstowcs... no
    checking for --with-computed-gotos... no value specified
    checking whether aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined supports computed gotos... yes
    checking for --with-tail-call-interp... no value specified
    checking for --with-remote-debug... no
    checking for build directories... done
    checking for -O2... yes
    checking for glibc _FORTIFY_SOURCE/memmove bug... no
    checking for ensurepip... upgrade
    checking if the dirent structure of a d_type field... yes
    checking for the Linux getrandom() syscall... yes
    checking for the getrandom() function... no
    checking for library containing shm_open... no
    checking for shm_open... no
    checking for shm_unlink... no
    checking for pkg-config... /data/data/com.termux/files/usr/bin/pkg-config
    checking whether compiling and linking against OpenSSL works... yes
    checking for --with-openssl-rpath...
    checking whether OpenSSL provides required ssl module APIs... yes
    checking whether OpenSSL provides required hashlib module APIs... yes
    checking for --with-ssl-default-suites... python
    checking for --with-builtin-hashlib-hashes... md5,sha1,sha2,sha3,blake2
    checking for --disable-test-modules... yes
    checking whether libatomic is needed by <pyatomic.h>... no
    checking for stdlib extension module _multiprocessing... yes
    checking for stdlib extension module _posixshmem... missing
    checking for stdlib extension module fcntl... yes
    checking for stdlib extension module mmap... yes
    checking for stdlib extension module _socket... yes
    checking for stdlib extension module grp... missing
    checking for stdlib extension module pwd... yes
    checking for stdlib extension module resource... yes
    checking for stdlib extension module _scproxy... n/a
    checking for stdlib extension module syslog... yes
    checking for stdlib extension module termios... yes
    checking for stdlib extension module pyexpat... yes
    checking for stdlib extension module _elementtree... yes
    checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2... no
    checking whether C compiler accepts -mavx2... no
    checking for HACL* library linking type... shared
    checking for stdlib extension module _md5... yes
    checking for stdlib extension module _sha1... yes
    checking for stdlib extension module _sha2... yes
    checking for stdlib extension module _sha3... yes
    checking for stdlib extension module _blake2... yes
    checking for stdlib extension module _hmac... yes
    checking for stdlib extension module _ctypes... yes
    checking for stdlib extension module _curses... yes
    checking for stdlib extension module _curses_panel... yes
    checking for stdlib extension module _decimal... missing
    configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
    checking for stdlib extension module _dbm... yes
    checking for stdlib extension module _gdbm... yes
    checking for stdlib extension module readline... yes
    checking for stdlib extension module _sqlite3... yes
    checking for stdlib extension module _tkinter... missing
    checking for stdlib extension module _uuid... yes
    checking for stdlib extension module zlib... yes
    checking for stdlib extension module _bz2... yes
    checking for stdlib extension module _lzma... yes
    checking for stdlib extension module _zstd... yes
    checking for stdlib extension module _ssl... yes
    checking for stdlib extension module _hashlib... yes
    checking for stdlib extension module _testcapi... yes
    checking for stdlib extension module _testclinic... yes
    checking for stdlib extension module _testclinic_limited... yes
    checking for stdlib extension module _testlimitedcapi... yes
    checking for stdlib extension module _testinternalcapi... yes
    checking for stdlib extension module _testbuffer... yes
    checking for stdlib extension module _testimportmultiple... yes
    checking for stdlib extension module _testmultiphase... yes
    checking for stdlib extension module _testsinglephase... yes
    checking for stdlib extension module xxsubtype... yes
    checking for stdlib extension module _xxtestfuzz... yes
    checking for stdlib extension module _ctypes_test... yes
    checking for stdlib extension module xxlimited... yes
    checking for stdlib extension module xxlimited_35... yes
    configure: creating ./config.status
    config.status: creating Makefile.pre
    config.status: creating Misc/python.pc
    config.status: creating Misc/python-embed.pc
    config.status: creating Misc/python-config.sh
    config.status: creating Modules/Setup.bootstrap
    config.status: creating Modules/Setup.stdlib
    config.status: creating Modules/ld_so_aix
    config.status: creating pyconfig.h
    configure: creating Modules/Setup.local
    configure: creating Makefile
    

    *** output of make file

    make -s -j 8
    Python/fileutils.c:458:1: warning:            unused function
          'decode_current_locale'
          [-Wunused-function]
      458 | decode_current_locale(const char...                                           | ^~~~~~~~~~~~~~~~~~~~~
    Python/fileutils.c:677:1: warning:            unused function
          'encode_current_locale'                 [-Wunused-function]
      677 | encode_current_locale(const wcha...
          | ^~~~~~~~~~~~~~~~~~~~~           2 warnings generated.
    ./Modules/posixmodule.c:10400:15: error:
          call to undeclared function
          'wait3'; ISO C99 and later do not
          support implicit function
          declarations
          [-Wimplicit-function-declaration]
     10400 |         pid = wait3(&status, opt...
           |               ^
    1 error generated.
    make: *** [Makefile:3808: Modules/posixmodule.o] Error 1
    make: *** Waiting for unfinished jobs....
    
  6. StanFromIreland commented on Oct 19, 2025

    @StanFromIreland
    StanFromIreland
    on Oct 19, 2025
    Member
    More actions

    Please use triple backticks for codeblocks, I edited your post with them, I also hid the long output in a details block so that this discussion is easier to navigate.

    Reacted by Badli Al Rashid
    Reacted by Badli Al Rashid
  7. theothernighttheotherday commented on Oct 19, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 19, 2025
    Author
    More actions

    Please use triple backticks for codeblocks, I edited your post with them, I also hid the long output in a details block so that this discussion is easier to navigate.

    okey thanks!

  8. mhsmith commented on Oct 21, 2025

    @mhsmith
    mhsmith
    on Oct 21, 2025
    Member
    More actions

    The configure log shows that it thinks wait3 is available, but it isn't in the NDK headers as of version 27.3.13750724. It isn't in the Termux headers either as of ndk-sysroot version 28c. However, wait4 is included in both places.

    configure usually detects functions by trying to link against them, regardless of whether they're in a header. So my guess is that the libc on your device actually contains a wait3 symbol. That doesn't appear to be the case on my Pixel 7:

    .../usr/lib $ nm /system/lib64/libc.so | grep wait3
    .../usr/lib $ nm /system/lib64/libc.so | grep wait4
    00000000000dea40 T wait4
    

    What do you get from those two commands, and what device are you running on?

  9. theothernighttheotherday commented on Oct 21, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 21, 2025
    Author
    More actions

    i got the following

    here is the output of nm. only wait4 function have.

     nm /system/lib64/libc.so | grep wait3
     nm /system/lib64/libc.so | grep wait4
    00000000000ea2b0 T wait4
    
  10. mhsmith commented on Oct 21, 2025

    @mhsmith
    mhsmith
    on Oct 21, 2025
    Member
    More actions

    And what device are you running this on?

  11. theothernighttheotherday commented on Oct 21, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 21, 2025
    Author
    More actions

    it is a Xiaomi mobile phone.

  12. mhsmith commented on Oct 22, 2025

    @mhsmith
    mhsmith
    on Oct 22, 2025
    Member
    More actions

    They make thousands of models. Which one specifically, and which version of Android?

    I don't have a full Python development environment set up on my Pixel 7, but I tried this test program which is similar to what the configure script would do:

    char wait3(void);
    int main(void) {
    return wait3();
    ;
    return 0;
    }
    
    ~ $ clang -o conftest conftest.c
    ld.lld: error: undefined symbol: wait3
    >>> referenced by conftest.c
    >>>               /data/data/com.termux/files/usr/tmp/conftest-71af60.o:(main)
    >>> did you mean: wait4
    >>> defined in: /system/lib64/libc.so
    

    What happens if you try the same?

    One possible workaround is to add wait3 to the blocked_funcs list in configure.ac. Then regenerate configure with autoreconf as shown here, and rerun configure and make.

    You may need to do the same with other symbols, in which case, please let me know which ones they are.

  13. theothernighttheotherday commented on Oct 22, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 22, 2025
    Author
    More actions

    hi,

    It's a Xiaomi Redmi Note 12 5g but in termux-info its
    Device manufacturer:
    Xiaomi
    Device model:
    22111317G

    is under the if if test "$ac_sys_system" = "Linux-android"; then section ? see the attach screenshot.

    i got the following when i run the wait3 conftest

    clang -o conftest conftest.c
    ld.lld: error: undefined symbol: wait3
    >>> referenced by conftest.c
    >>>               /data/data/com.termux/files/usr/tmp/conftest-153e82.o:(main)
    >>> did you mean: wait4
    >>> defined in: /data/data/com.termux/files/usr/bin/../../usr/aarch64-linux-android/lib/libc.so
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    for wait4 conf test the output as shown below.

    clang -o conftest conftest.c
    
    

    Image

  14. mhsmith commented on Oct 22, 2025

    @mhsmith
    mhsmith
    on Oct 22, 2025
    Member
    More actions

    OK, then I don't know why the configure script thinks wait3 is available, but yes, the section in the screenshot is where you could disable it.

    And by the way, there's no need to quote entire comments when you're replying in the very next comment, that just wastes space on the page.

  15. VectorASD commented on Oct 24, 2025

    @VectorASD
    VectorASD
    on Oct 24, 2025 · Hidden as off-topic
    show commentMore actions
  16. theothernighttheotherday commented on Oct 25, 2025

    @theothernighttheotherday
    theothernighttheotherday
    on Oct 25, 2025
    Author
    More actions

    Thank you @VectorASD for the information.
    The ./configure --enable-optimizations and --with-lto=full works well with python3.12.12 in termux.

    but the --with-address-sanitizer, --with-memory-sanitizer and --with-undefined-behavior-sanitizer seems to be not woeking as expected reason being unsupported.

    the guide is at https://devguide.python.org/development-tools/clang/ is a good starting point.

  17. mhsmith commented on Oct 25, 2025

    @mhsmith
    mhsmith
    on Oct 25, 2025
    Member
    More actions

    @VectorASD: Your post has nothing to do with this issue. Please don't waste everybody's time with AI-generated essays.

    Reacted by Stan Ulbrych
  18. manueljacob commented on Apr 7, 2026

    @manueljacob
    manueljacob
    on Apr 7, 2026
    Contributor
    More actions

    @theothernighttheotherday

    i got the following when i run the wait3 conftest

    clang -o conftest conftest.c
    ld.lld: error: undefined symbol: wait3
    >>> referenced by conftest.c
    >>>               /data/data/com.termux/files/usr/tmp/conftest-153e82.o:(main)
    >>> did you mean: wait4
    >>> defined in: /data/data/com.termux/files/usr/bin/../../usr/aarch64-linux-android/lib/libc.so
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    It would be interesting to do this with the real conftest.c generated by configure. E.g. you could add exit 1 after

    cpython/configure

    Line 20641 in 8a73478

    ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
    , which should leave conftest.c in the current directory.

    Then you could try running clang -o conftest conftest.c to see whether it behaves as with the conftest.c you created manually. If you pass -E to clang, it outputs the preprocessed file, which could give some hints in which header wait3 is defined (I assume it is because the configure script seems to be able to compile conftest.c).

    One possibility is that conftest.c includes some header defining wait3 as function calling wait4 with -1 as the first argument, which is not included by Modules/posixmodule.c (although I can’t think of a reason why that should be the case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-androidbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.