Replies: 1 comment
-
Hi, Here is the recipe for the library :
It uses the standard libwebsocket recipe provided by the Yocto tree :
Since I'm not a Yocto expert I can't help you more on this matter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Sir,
I download this project, then add a "Cmake file" and modified the makefile for Yocto toolchain for Resenas SoC aarch64 platform as below, but it still use the local host GCC to build up this project then get build failed, I am so confuse about it, could you do me a favor? Many thanks for your any help ^__^ , I am appreciated.
Generating gcc makefiles...
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using sysroot path as /opt/poky/3.1.26/sysroots/aarch64-poky-linux
CMake Deprecation Warning at 3rdparty/libwebsockets/CMakeLists.txt:25 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at 3rdparty/libwebsockets/CMakeLists.txt:312 (option):
Policy CMP0077 is not set: option() honors normal variables. Run "cmake
--help-policy CMP0077" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable 'LWS_WITH_NETLINK'.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF
-- Found Git: /usr/bin/git (found version "2.25.1")
Git commit hash: f46d149
-- Performing Test LWS_HAVE_inline
-- Performing Test LWS_HAVE_inline - Failed
-- Performing Test LWS_HAVE___inline__
-- Performing Test LWS_HAVE___inline__ - Failed
-- Performing Test LWS_HAVE___inline
-- Performing Test LWS_HAVE___inline - Failed
-- Performing Test LWS_HAVE_MALLOC_TRIM
-- Performing Test LWS_HAVE_MALLOC_TRIM - Failed
-- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE
-- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE - Failed
-- Looking for fork
-- Looking for fork - found
-- Looking for getenv
-- Looking for getenv - found
-- Looking for malloc
-- Looking for malloc - found
-- Looking for memset
-- Looking for memset - found
-- Looking for realloc
-- Looking for realloc - found
-- Looking for socket
-- Looking for socket - found
-- Looking for strerror
-- Looking for strerror - found
The Cmake file that I add as below:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(SYSROOT_PATH /opt/poky/3.1.26/sysroots/aarch64-poky-linux )
set(CMAKE_SYSROOT "${SYSROOT_PATH}")
message(STATUS "Using sysroot path as ${SYSROOT_PATH}")
#set(SDKTARGETSYSROOT /opt/poky/3.1.26/sysroots/aarch64-poky-linux )
set(CMAKE_C_COMPILER /opt/poky/3.1.26/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
set(CMAKE_CXX_COMPILER /opt/poky/3.1.26/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
add_link_options("LINKER:-rpath-link,/opt/poky/3.1.26/sysroots/aarch64-poky-linux/lib:/opt/poky/3.1.26/sysroots/aarch64-poky-linux/usr/lib:/opt/poky/3.1.26/sysroots/aarch64-poky-linux/usr/include")
set(CMAKE_FIND_ROOT_PATH /opt/poky/3.1.26/sysroots/aarch64-poky-linux)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
The Makefile that I modified as below:
#Root directory containing the top level CMakeLists.txt file
ROOT_DIR:=$(PWD)
#Generated binary directory
BIN_DIR:=$(ROOT_DIR)/bin
#Make options
#VERBOSE="VERBOSE=1"
PARALLEL_BUILD?=-j 4
#Build type can be either Debug or Release
BUILD_TYPE?=Release
#Logger configuration
EXTERNAL_LOGGER?=OFF
SDKTARGETSYSROOT=/opt/poky/3.1.26/sysroots/aarch64-poky-linux
CC=aarch64-poky-linux-gcc -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=$(SDKTARGETSYSROOT)
ARCH = "aarch64"
# Default target
default: gcc
#Silent makefile
#.SILENT:
#Install prefix$(strip $ (INSTALL_PREFIX)),)
ifneq (
CMAKE_INSTALL_PREFIX:=-D CMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX)
CMAKE_INSTALL_PREFIX_CMD:=--prefix $(INSTALL_PREFIX)
endif
Beta Was this translation helpful? Give feedback.
All reactions