clamav
clamav copied to clipboard
Docs: add ARM64 cross-compile instructions for Windows and Linux
I followed the instructions for not having a sysroot, and am getting link errors for stuff that's in the curses library.
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/clamdtop.dir/clamdtop.c.o: in function resize': clamdtop.c:(.text+0xc0): undefined reference to stdscr'
@ragusaa Ah right... On some distros they split up ncurses into libncurses and libtinfo. stdscr is one they moved to the other library: https://stackoverflow.com/a/11269810
I think you can change the CURSES_LIBRARY variable in that CMAKE_TOOLCHAIN_ARM64.cmake to have both, like this:
set(CURSES_LIBRARY "/usr/lib/aarch64-linux-gnu/libncurses.a;/usr/lib/aarch64-linux-gnu/libtinfo.a")
You should not need to separately sudo apt-get install -y libtinfo:arm64. I think the ncurses package should have brought it along: https://packages.ubuntu.com/jammy/libncurses-dev