Reputation: 13
My apologies for my poor explanation, I am autistic and poor with English. And Grammarly doesn't like code being anywhere near.
So I solved my previous issue. I had an environment variable set wrong and was trying to send a compiler flag onto the linker... Whoops.
So I have gotten swupdate compiled and as an API that I can include in my C++ project, here is a link to the API docs https://sbabic.github.io/swupdate/2018.11/swupdate-ipc.html. I am facing a new problem with a slimmed-down version of this example https://github.com/sbabic/swupdate/blob/master/tools/swupdate-client.c.
The problem I am facing is that swupdate_async_start always returns -1, Looking through the source code I believe the IPC Queue is not opening. It could be caused by misconfiguring Menuconfig when compiling swupdate but nothing I do changes the result... I am looking for advice. Also better English but I don't think you can help me with that.
Old Problem...
I am attempting to compile SWUpdate into my toolchain to use its API within my C++ projects. However, I'm encountering some issues during the build process. When I run make -j16, I get the following output:
jhstrutton@JoshuaLaptop:~/swupdate$ make -j16
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
CC ipc/network_ipc.o
CC ipc/network_ipc-if.o
CC ipc/progress_ipc.o
CC core/swupdate.o
CC core/cpio_utils.o
CC core/notifier.o
CC core/handler.o
CC handlers/dummy_handler.o
CC core/bootloader.o
CC handlers/chain_handler.o
CC core/hw-compatibility.o
CC core/install_from_file.o
CC core/util.o
CC core/parser.o
CC core/pctl.o
CC bootloader/none.o
CC core/state.o
LD bootloader/built-in.o
CC core/syslog.o
LD ipc/built-in.o
arm-linux-gnueabihf-ld: unrecognized option '-Wl,-O1'
arm-linux-gnueabihf-ld: use the --help option for usage information
make[1]: *** [scripts/Makefile.build:224: bootloader/built-in.o] Error 1
make: *** [Makefile:514: bootloader] Error 2
make: *** Waiting for unfinished jobs....
CC core/installer.o
arm-linux-gnueabihf-ld: unrecognized option '-Wl,-O1'
arm-linux-gnueabihf-ld: use the --help option for usage information
make[1]: *** [scripts/Makefile.build:224: ipc/built-in.o] Error 1
make: *** [Makefile:520: ipc] Error 2
CC core/network_utils.o
CC core/network_thread.o
CC core/stream_interface.o
CC core/progress_thread.o
CC core/parsing_library.o
LD handlers/built-in.o
arm-linux-gnueabihf-ld: unrecognized option '-Wl,-O1'
arm-linux-gnueabihf-ld: use the --help option for usage information
make[1]: *** [scripts/Makefile.build:224: handlers/built-in.o] Error 1
make: *** [Makefile:514: handlers] Error 2
CC core/artifacts_versions.o
CC core/swupdate_dict.o
CC core/swupdate_vars.o
CC core/semver.o
CC core/strlcpy.o
LD core/built-in.o
arm-linux-gnueabihf-ld: unrecognized option '-Wl,-O1'
arm-linux-gnueabihf-ld: use the --help option for usage information
make[1]: *** [scripts/Makefile.build:224: core/built-in.o] Error 1
make: *** [Makefile:514: core] Error 2
I have compiled lua and various other headers into my toolchain with make install, but this seems diffrent from a missing dependency.
Below is the config file I generated with menuConfig...
#
# Automatically generated file; DO NOT EDIT.
# SWUpdate Configuration
#
#
# SWUpdate Settings
#
#
# General Configuration
#
# CONFIG_CURL is not set
# CONFIG_CURL_SSL is not set
# CONFIG_DISKFORMAT is not set
# CONFIG_SYSTEMD is not set
CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg"
# CONFIG_SCRIPTS is not set
# CONFIG_HW_COMPATIBILITY is not set
CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
#
# Socket Paths
#
CONFIG_SOCKET_CTRL_PATH=""
CONFIG_SOCKET_PROGRESS_PATH=""
# CONFIG_MTD is not set
CONFIG_LUA=y
CONFIG_LUAPKG="lua"
# CONFIG_FEATURE_SYSLOG is not set
#
# Build Options
#
CONFIG_CROSS_COMPILE=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_WERROR is not set
# CONFIG_NOCLEANUP is not set
#
# Bootloader support
#
#
# Bootloader Interfaces
#
CONFIG_BOOTLOADER_NONE=y
# CONFIG_BOOTLOADER_EBG is not set
# CONFIG_UBOOT is not set
# CONFIG_BOOTLOADER_GRUB is not set
# CONFIG_BOOTLOADER_CBOOT is not set
CONFIG_BOOTLOADER_DEFAULT_NONE=y
# CONFIG_BOOTLOADER_STATIC_LINKED is not set
CONFIG_UPDATE_STATE_CHOICE_BOOTLOADER=y
CONFIG_UPDATE_STATE_BOOTLOADER="ustate"
#
# Interfaces
#
# CONFIG_DOWNLOAD is not set
# CONFIG_SURICATTA is not set
# CONFIG_WEBSERVER is not set
#
# Security
#
# CONFIG_SSL_IMPL_NONE is not set
CONFIG_SSL_IMPL_OPENSSL=y
# CONFIG_SSL_IMPL_WOLFSSL is not set
# CONFIG_SSL_IMPL_MBEDTLS is not set
# CONFIG_HASH_VERIFY is not set
# CONFIG_SIGNED_IMAGES is not set
# CONFIG_ENCRYPTED_IMAGES is not set
#
# Compressors (zlib always on)
#
CONFIG_GUNZIP=y
# CONFIG_ZSTD is not set
#
# Parsers
#
#
# Parser Features
#
# CONFIG_LIBCONFIG is not set
CONFIG_PARSERROOT=""
# CONFIG_LUAEXTERNAL is not set
# CONFIG_SETSWDESCRIPTION is not set
#
# Handlers
#
#
# Image Handlers
#
# CONFIG_ARCHIVE is not set
# CONFIG_BOOTLOADERHANDLER is not set
# CONFIG_COPY is not set
# CONFIG_DELTA is not set
# CONFIG_DISKPART is not set
# CONFIG_DISKFORMAT_HANDLER is not set
# CONFIG_LUASCRIPTHANDLER is not set
# CONFIG_EMBEDDED_LUA_HANDLER is not set
# CONFIG_EMMC_HANDLER is not set
# CONFIG_RAW is not set
# CONFIG_RDIFFHANDLER is not set
# CONFIG_REMOTE_HANDLER is not set
# CONFIG_SHELLSCRIPTHANDLER is not set
# CONFIG_SWUFORWARDER_HANDLER is not set
# CONFIG_UCFWHANDLER is not set
# CONFIG_UNIQUEUUID is not set
#
# Containers
#
#
# Update containers
#
# CONFIG_DOCKER is not set
Upvotes: 0
Views: 92