All of lore.kernel.org
 help / color / mirror / Atom feed
* How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
@ 2020-12-02 10:02 vijayrakeshmunganda
  2020-12-02 10:17 ` [yocto] " Ross Burton
  2020-12-02 10:19 ` Quentin Schulz
  0 siblings, 2 replies; 7+ messages in thread
From: vijayrakeshmunganda @ 2020-12-02 10:02 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Hi,

I'm trying to write a recipe to install AWS SDK into the build(https://github.com/aws/aws-iot-device-sdk-embedded-C), but I complete don't know how to do it. Based on online example https://github.com/joaocfernandes/Learn-Yocto/blob/master/develop/Recipe-CMake.md I have written my recipe file and download the sdk into files folder of my recipe. When I run build do_configure got failed.

SUMMARY = "AWS IoT SDK EMBEDDED C"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://CMakeLists.txt"

S = "${WORKDIR}"

inherit cmake

EXTRA_OECMAKE = ""

I know it is wrong, but kindly please someone help to write it correctly, thank you.

Thanks & Regards,
VR

[-- Attachment #2: Type: text/html, Size: 1106 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 10:02 How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto vijayrakeshmunganda
@ 2020-12-02 10:17 ` Ross Burton
  2020-12-02 10:19 ` Quentin Schulz
  1 sibling, 0 replies; 7+ messages in thread
From: Ross Burton @ 2020-12-02 10:17 UTC (permalink / raw)
  To: vijayrakeshmunganda; +Cc: yocto

I suggest looking at meta-aws (https://github.com/aws/meta-aws) to see
if that has a recipe already, and if it doesn't use one of the recipes
there as a starting point.

Ross

On Wed, 2 Dec 2020 at 10:02, <vijayrakeshmunganda@gmail.com> wrote:
>
> Hi,
>
> I'm trying to write a recipe to install AWS SDK into the build(https://github.com/aws/aws-iot-device-sdk-embedded-C), but I complete don't know how to do it. Based on online example https://github.com/joaocfernandes/Learn-Yocto/blob/master/develop/Recipe-CMake.md I have written my recipe file and download the sdk into files folder of my recipe. When I run build do_configure got failed.
>
> SUMMARY = "AWS IoT SDK EMBEDDED C"
> SECTION = "examples"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>
> SRC_URI = "file://CMakeLists.txt"
>
> S = "${WORKDIR}"
>
> inherit cmake
>
> EXTRA_OECMAKE = ""
>
> I know it is wrong, but kindly please someone help to write it correctly, thank you.
>
> Thanks & Regards,
> VR
> 
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 10:02 How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto vijayrakeshmunganda
  2020-12-02 10:17 ` [yocto] " Ross Burton
@ 2020-12-02 10:19 ` Quentin Schulz
  2020-12-02 11:27   ` vijayrakeshmunganda
  1 sibling, 1 reply; 7+ messages in thread
From: Quentin Schulz @ 2020-12-02 10:19 UTC (permalink / raw)
  To: vijayrakeshmunganda; +Cc: yocto

Hi VR,

On Wed, Dec 02, 2020 at 02:02:39AM -0800, vijayrakeshmunganda@gmail.com wrote:
> Hi,
> 
> I'm trying to write a recipe to install AWS SDK into the build(https://github.com/aws/aws-iot-device-sdk-embedded-C), but I complete don't know how to do it. Based on online example https://github.com/joaocfernandes/Learn-Yocto/blob/master/develop/Recipe-CMake.md I have written my recipe file and download the sdk into files folder of my recipe. When I run build do_configure got failed.
> 

If you don't give us the log, we won't be able to help you.

> SUMMARY = "AWS IoT SDK EMBEDDED C"
> SECTION = "examples"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> 
> SRC_URI = "file://CMakeLists.txt"
> 

Where is the sdk? You need to add it into your SRC_URI (you can also
just pass a URL to a git repo or tarball download link).

Quentin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 10:19 ` Quentin Schulz
@ 2020-12-02 11:27   ` vijayrakeshmunganda
  2020-12-02 11:29     ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 7+ messages in thread
From: vijayrakeshmunganda @ 2020-12-02 11:27 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 3217 bytes --]

Hi Quentin Schulz,

Thanks for the reply. I had downloaded the SDK into "files" folder of my recipe and given CMakeLists.txt as SRCURI. Is it correct to do like this?

Here is the Error: (It's a long error)

ERROR: aws-1.0-r0 do_configure: Execution of '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_configure.28296' failed with exit code 1:
-- The C compiler identification is GNU 9.3.0
-- Check for working C compiler: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
-- Check for working C compiler: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenSSL: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/lib/libcrypto.so (found version "1.1.1g")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
Downloading the Amazon Root CA certificate...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Download  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (77) error setting certificate verify locations:
CAfile: /home/bl-docker/rity/bsp/tmp/work/x86_64-linux/curl-native/7.69.1-r0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
CApath: none
Downloading the Baltimore Cybertrust Root CA certificate...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (77) error setting certificate verify locations:
CAfile: /home/bl-docker/rity/bsp/tmp/work/x86_64-linux/curl-native/7.69.1-r0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt
CApath: none
CMake Error at demos/defender/defender_demo_json/CMakeLists.txt:6 (include):
include could not find load file:
/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/libraries/standard/coreMQTT/mqttFilePaths.cmake
CMake Error at demos/defender/defender_demo_json/CMakeLists.txt:9 (include):
include could not find load file:
/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake
CMake Error at demos/defender/defender_demo_json/CMakeLists.txt:12 (include):
include could not find load file:
/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/libraries/standard/coreJSON/jsonFilePaths.cmake (Similar errors continued for few files)

Thanks & Regards,
VR

[-- Attachment #2: Type: text/html, Size: 4099 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 11:27   ` vijayrakeshmunganda
@ 2020-12-02 11:29     ` Quentin Schulz
  2020-12-02 12:33       ` vijayrakeshmunganda
  0 siblings, 1 reply; 7+ messages in thread
From: Quentin Schulz @ 2020-12-02 11:29 UTC (permalink / raw)
  To: vijayrakeshmunganda; +Cc: yocto

Hi VR,

On Wed, Dec 02, 2020 at 03:27:51AM -0800, vijayrakeshmunganda@gmail.com wrote:
> Hi Quentin Schulz,
> 
> Thanks for the reply. I had downloaded the SDK into "files" folder of my recipe and given CMakeLists.txt as SRCURI. Is it correct to do like this?
> 

You need to put the SDK filename into SRC_URI as well otherwise Yocto
does not fetch it from the files directory.

Also, Ross had a good suggestion too, please check that the recipe or a
similar one does not exist already in meta-aws (or other layers).

Quentin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 11:29     ` [yocto] " Quentin Schulz
@ 2020-12-02 12:33       ` vijayrakeshmunganda
  2020-12-03  5:33         ` vijayrakeshmunganda
  0 siblings, 1 reply; 7+ messages in thread
From: vijayrakeshmunganda @ 2020-12-02 12:33 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

Hi Quentin Schulz & Ross,

Thanks for the information. Based on meta-aws I had written the recipe and do_compile has completed. Now I want to install demos in to the build which are located at tmp/work/aarch64-poky-linux/aws/1.0-r0/git/demos/mqtt/mqtt_demo_mutual_auth, so how do I write do_install? ( https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/mqtt/mqtt_demo_mutual_auth )

do_install() {
install -d ${D}${bindir}
install -m 0755 mqtt_demo_mutual_auth ${D}${bindir}
}

Does above code works?

Thanks & Regards,
VR.

[-- Attachment #2: Type: text/html, Size: 904 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto
  2020-12-02 12:33       ` vijayrakeshmunganda
@ 2020-12-03  5:33         ` vijayrakeshmunganda
  0 siblings, 0 replies; 7+ messages in thread
From: vijayrakeshmunganda @ 2020-12-03  5:33 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

Hi,

do_install failed with an error "ninja: error: unknown target 'install'". Kindly please help me to fix the above issue.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/poky/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build [0/2] /home/poky/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/cmake -P /home/poky/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build/CMakeFiles/VerifyGlobs.cmake ninja: error: unknown target 'install' WARNING: /home/poky/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.15415:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/poky/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}' ERROR: Task (/home/poky/src/meta-application/recipes-bleapp/aws/aws_1.0.bb:do_install) failed with exit code '1'

Thanks & Regards,
VR

[-- Attachment #2: Type: text/html, Size: 1858 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-03  5:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 10:02 How to write custom recipe to install AWS C SDK from github #dunfell #linux #yocto vijayrakeshmunganda
2020-12-02 10:17 ` [yocto] " Ross Burton
2020-12-02 10:19 ` Quentin Schulz
2020-12-02 11:27   ` vijayrakeshmunganda
2020-12-02 11:29     ` [yocto] " Quentin Schulz
2020-12-02 12:33       ` vijayrakeshmunganda
2020-12-03  5:33         ` vijayrakeshmunganda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.