Lors du portage du package FRR, il n'y a pas de fichiers de bibliothèque dépendants. Ajustez l'option de compilation et configurez-la en mode glibc. Lors de la recompilation, le contenu de l'erreur est le suivant
cd /home/robot/OpenWrt/LS1046A-19.07/build_dir/target-aarch64_generic_glibc/libuhttpd-nossl/libuhttpd-2.2.2/example && /home/robot/OpenWrt/LS1046A-19.07/staging_dir/host/bin/cmake -E cmake_link_script CMakeFiles/helloworld.dir/link.txt --verbose=1
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/bin/aarch64-openwrt-linux-gnu-gcc -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/robot/OpenWrt/LS1046A-19.07/build_dir/target-aarch64_generic_glibc/libuhttpd-nossl/libuhttpd-2.2.2=libuhttpd-2.2.2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -L/home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib -L/home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/lib -L/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/usr/lib -L/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib -znow -zrelro -rdynamic CMakeFiles/helloworld.dir/helloworld.c.o -o helloworld ../src/libuhttpd.so.2.2.2 -lubox -ldl -llua
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib/gcc/aarch64-openwrt-linux-gnu/8.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: /home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib/liblua.so: undefined reference to `sinh'
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib/gcc/aarch64-openwrt-linux-gnu/8.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: /home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib/liblua.so: undefined reference to `atan2'
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib/gcc/aarch64-openwrt-linux-gnu/8.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: /home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib/liblua.so: undefined reference to `tanh'
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib/gcc/aarch64-openwrt-linux-gnu/8.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: /home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib/liblua.so: undefined reference to `atanh'
/home/robot/OpenWrt/LS1046A-19.07/staging_dir/toolchain-aarch64_generic_gcc-8.3.0_glibc/lib/gcc/aarch64-openwrt-linux-gnu/8.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: /home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/usr/lib/liblua.so: undefined reference to `cosh'
La solution est la suivante
robot@ubuntu:~/OpenWrt/LS1046A-19.07$ cd build_dir/target-aarch64_generic_glibc/libuhttpd-nossl/libuhttpd-2.2.2/example
vim CMakeLists.txt
Les ajouts sont les suivants
include_directories(${
CMAKE_SOURCE_DIR}/src ${
CMAKE_BINARY_DIR}/src)
add_definitions(-lm)
add_executable(helloworld helloworld.c)
target_link_libraries(helloworld uhttpd ${
LIBUBOX_LIBRARY} -lm)
add_executable(template template.c)
target_link_libraries(template uhttpd ${
LIBUBOX_LIBRARY} -lm)