I'm trying to cross compile qt6 for Bullseye on an Ubuntu 22.04.

Everything compiles, but I seeing unresolved externals that (I think) should be in clib:
Qt Code:
  1. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_dlopen_mode@GLIBC_PRIVATE'
  2. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_current_sigrtmin_private@GLIBC_PRIVATE'
  3. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_dlclose@GLIBC_PRIVATE'
  4. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE'
  5. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_longjmp@GLIBC_PRIVATE'
  6. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_allocate_rtsig_private@GLIBC_PRIVATE'
  7. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_thread_freeres@GLIBC_PRIVATE'
  8. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_dlsym@GLIBC_PRIVATE'
  9. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_current_sigrtmax_private@GLIBC_PRIVATE'
  10. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
  11. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'
  12. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `__libc_pthread_init@GLIBC_PRIVATE'
  13. /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /home/dave/rpi-sysroot/lib/aarch64-linux-gnu/libpthread.so.0: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE'
To copy to clipboard, switch view to plain text mode 

Another forum has a post saying that this is probably due to a mismatch between the cross-compiler on Ubuntu and the rpi.

Here's what's on the pi:

Qt Code:
  1. pi@raspberrypi:~ $ g++ --version
  2. g++ (Debian 10.2.1-6) 10.2.1 20210110
To copy to clipboard, switch view to plain text mode 

Here's what I have in the "toolchain.cmake":

Qt Code:
  1. set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-10)
  2. set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-10)
To copy to clipboard, switch view to plain text mode 

I've also tried the -9 and -11 versions of gcc and g++, but get the same errors.

The poster said he solved the error by downgrading the Ubuntu host to 20.x. I'd do that, if I thought it would work, but seems like I should be able to use the same cross-compiler.

Three questions:

1) Are the unresolved externals indeed (likely) due to an incompatible C run time used by the cross-compiler?
2) What cross compiler toolchain should I use?
3) What cross compiler is available for cross-compiling on Ubuntu 20 (if any) that's not on Ubuntu 22?

Here's the guide I've been using:

https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
Thanks!