clamav icon indicating copy to clipboard operation
clamav copied to clipboard

Docs: add ARM64 cross-compile instructions for Windows and Linux

Open val-ms opened this issue 1 year ago • 2 comments

val-ms avatar Dec 15 '23 00:12 val-ms

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 avatar Dec 22 '23 15:12 ragusaa

@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

val-ms avatar Dec 22 '23 15:12 val-ms