The commit c5ecf0e01e7b3cec (https://core.tcl-lang.org/tcl/info/c5ecf0e01e7b3cec) introduced a tk build failure when cross compile:
/buildarea/build/tmp/work/core2-64-poky-linux/tk/8.6.10-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/9.2.0/ld: /buildarea/build/tmp/work/core2-64-poky-linux/tk/8.6.10-r0/recipe-sysroot/usr/lib/libtclstub8.6.a(strtoul.o): in function `strtoul':
/usr/src/debug/tcl/8.6.10-r0/tcl8.6.10/compat/strtoul.c:77: undefined reference to `TclIsSpaceProc'
/buildarea/build/tmp/work/core2-64-poky-linux/tk/8.6.10-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/9.2.0/ld: libtk8.6.so: hidden symbol `TclIsSpaceProc' isn't defined
/buildarea/build/tmp/work/core2-64-poky-linux/tk/8.6.10-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/9.2.0/ld: final link failed: bad value
The root cause is the tcl_cv_strtoul_unbroken will set to unknown when cross compile. Then the strtoul.o will be added to COMPAT_OBJS.
In unix/Makefile:
########################################
[snip]
COMPAT_OBJS = strstr.o strtoul.o
[snip]
STUB_LIB_OBJS = tclStubLib.o \
tclTomMathStubLib.o \
tclOOStubLib.o \
${COMPAT_OBJS}
[snip]
#######################################
Then it can not found the `TclIsSpaceProc' function in libtclstub8.6.a
|