All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Guidance creating first package (WAMR)
@ 2019-09-10 12:35 Jonathan Beri
  2019-09-10 13:49 ` Vadim Kochan
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Beri @ 2019-09-10 12:35 UTC (permalink / raw
  To: buildroot

Hello! I'm new to buildroot and so far have found the project to be very
mature. My goal is to create an environment for WebAssembly Micro Runtime
(WAMR,) a standalone WebAssembly (Wasm) runtime on SBCs like the Raspberry
Pi. See https://github.com/intel/wasm-micro-runtime.

I started by using a docker container to build an image using the Raspberry
Pi defconfig. I got it working in an afternoon. Next I created a `wamr`
folder in `packages`, added a `Config.in` and started to work on a `wamr.mk
`.

And here's where I need help. The build process for WAMR Core is fairly
straightforward - see
https://github.com/intel/wasm-micro-runtime/blob/master/doc/building.md#build-wamr-core.
I contributed the Dockerfile, which took a few hours to write. I'm
comfortable on linux but far from an expert. However, I'm little more than
a novice when it comes kconfig, make and the like.

I tried following the CMake docs to build a package:
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages.
Here's an example of what I tried:

```
################################################################################
#
# wamr
#
################################################################################

WAMR_VERSION = a522e985f30c12c9c66eda6ff3ab41f493b31b2c
WAMR_SOURCE = wasm-micro-runtime-master.tar.gz
WAMR_SITE = $(call github,intel,wasm-micro-runtime,$(WAMR_VERSION))

$(eval $(cmake-package))
```

From here I didn't know how to test even that this syntax is correct. I've
tried `./utils/test-pkg`, `make wamr-source` & `make wamr-build` but the
outputs haven't been helpful.

I've tried looking for additional tutorials on the web (Bootlin has some
lovely detailed ones) but so far none that have helped me wrap my head
around the packaging system.

Anyone have suggestions or pointers?

Many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190910/1341ef68/attachment.html>

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

* [Buildroot] Guidance creating first package (WAMR)
  2019-09-10 12:35 [Buildroot] Guidance creating first package (WAMR) Jonathan Beri
@ 2019-09-10 13:49 ` Vadim Kochan
  2019-09-10 15:10   ` Jonathan Beri
  0 siblings, 1 reply; 4+ messages in thread
From: Vadim Kochan @ 2019-09-10 13:49 UTC (permalink / raw
  To: buildroot

HI Jonathan,

On Tue, Sep 10, 2019 at 3:36 PM Jonathan Beri <jmberi@gmail.com> wrote:
>
> Hello! I'm new to buildroot and so far have found the project to be very mature. My goal is to create an environment for WebAssembly Micro Runtime (WAMR,) a standalone WebAssembly (Wasm) runtime on SBCs like the Raspberry Pi. See https://github.com/intel/wasm-micro-runtime.
>
> I started by using a docker container to build an image using the Raspberry Pi defconfig. I got it working in an afternoon. Next I created a `wamr` folder in `packages`, added a `Config.in` and started to work on a `wamr.mk`.
>
> And here's where I need help. The build process for WAMR Core is fairly straightforward - see https://github.com/intel/wasm-micro-runtime/blob/master/doc/building.md#build-wamr-core. I contributed the Dockerfile, which took a few hours to write. I'm comfortable on linux but far from an expert. However, I'm little more than a novice when it comes kconfig, make and the like.
>
> I tried following the CMake docs to build a package: https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages. Here's an example of what I tried:
>
> ```
> ################################################################################
> #
> # wamr
> #
> ################################################################################
>
> WAMR_VERSION = a522e985f30c12c9c66eda6ff3ab41f493b31b2c
> WAMR_SOURCE = wasm-micro-runtime-master.tar.gz
> WAMR_SITE = $(call github,intel,wasm-micro-runtime,$(WAMR_VERSION))
>
> $(eval $(cmake-package))
> ```
>
> From here I didn't know how to test even that this syntax is correct. I've tried `./utils/test-pkg`, `make wamr-source` & `make wamr-build` but the outputs haven't been helpful.
>
> I've tried looking for additional tutorials on the web (Bootlin has some lovely detailed ones) but so far none that have helped me wrap my head around the packaging system.
>
> Anyone have suggestions or pointers?
>

So may be try to check:

1) if you included your Config.in in the package/Config.in like the
rest of packages

2) if you enabled config for your package in menuconfig/defconfig, you
can check it in
(probably) output/.config if the BR2_PACKAGE_WAMR (or how you named
your package in your Config.in) is set to 'y':
    BR2_PACKAGE_WAMR=y

Regards,
Vadim Kochan

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

* [Buildroot] Guidance creating first package (WAMR)
  2019-09-10 13:49 ` Vadim Kochan
@ 2019-09-10 15:10   ` Jonathan Beri
  2019-09-10 16:21     ` Vadim Kochan
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Beri @ 2019-09-10 15:10 UTC (permalink / raw
  To: buildroot

Thanks Vadim, confirmed both were there.

I just a new container with wamr copied over. When I ran `make wamr-build`,
I noticed `pkgconf` fail during the host compilation step. Maybe this is a
red herring but now when I simply run `make` I'm seeing:

```
>>> host-pkgconf 1.5.3 Downloading
wget: error while loading shared libraries: libpsl.so.5: cannot open shared
object file: Error 40
wget: error while loading shared libraries: libpsl.so.5: cannot open shared
object file: Error 40
wget: error while loading shared libraries: libpsl.so.5: cannot open shared
object file: Error 40
package/pkg-generic.mk:143: recipe for target
'/home/buildroot-2019.02.5/output/build/host-pkgconf-1.5.3/.stamp_downloaded'
failed
make: ***
[/home/buildroot-2019.02.5/output/build/host-pkgconf-1.5.3/.stamp_downloaded]
Error 1
```

On Tue, Sep 10, 2019 at 6:52 AM Vadim Kochan <vadim4j@gmail.com> wrote:

> HI Jonathan,
>
> On Tue, Sep 10, 2019 at 3:36 PM Jonathan Beri <jmberi@gmail.com> wrote:
> >
> > Hello! I'm new to buildroot and so far have found the project to be very
> mature. My goal is to create an environment for WebAssembly Micro Runtime
> (WAMR,) a standalone WebAssembly (Wasm) runtime on SBCs like the Raspberry
> Pi. See https://github.com/intel/wasm-micro-runtime.
> >
> > I started by using a docker container to build an image using the
> Raspberry Pi defconfig. I got it working in an afternoon. Next I created a
> `wamr` folder in `packages`, added a `Config.in` and started to work on a `
> wamr.mk`.
> >
> > And here's where I need help. The build process for WAMR Core is fairly
> straightforward - see
> https://github.com/intel/wasm-micro-runtime/blob/master/doc/building.md#build-wamr-core.
> I contributed the Dockerfile, which took a few hours to write. I'm
> comfortable on linux but far from an expert. However, I'm little more than
> a novice when it comes kconfig, make and the like.
> >
> > I tried following the CMake docs to build a package:
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages.
> Here's an example of what I tried:
> >
> > ```
> >
> ################################################################################
> > #
> > # wamr
> > #
> >
> ################################################################################
> >
> > WAMR_VERSION = a522e985f30c12c9c66eda6ff3ab41f493b31b2c
> > WAMR_SOURCE = wasm-micro-runtime-master.tar.gz
> > WAMR_SITE = $(call github,intel,wasm-micro-runtime,$(WAMR_VERSION))
> >
> > $(eval $(cmake-package))
> > ```
> >
> > From here I didn't know how to test even that this syntax is correct.
> I've tried `./utils/test-pkg`, `make wamr-source` & `make wamr-build` but
> the outputs haven't been helpful.
> >
> > I've tried looking for additional tutorials on the web (Bootlin has some
> lovely detailed ones) but so far none that have helped me wrap my head
> around the packaging system.
> >
> > Anyone have suggestions or pointers?
> >
>
> So may be try to check:
>
> 1) if you included your Config.in in the package/Config.in like the
> rest of packages
>
> 2) if you enabled config for your package in menuconfig/defconfig, you
> can check it in
> (probably) output/.config if the BR2_PACKAGE_WAMR (or how you named
> your package in your Config.in) is set to 'y':
>     BR2_PACKAGE_WAMR=y
>
> Regards,
> Vadim Kochan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190910/1d8cafc1/attachment.html>

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

* [Buildroot] Guidance creating first package (WAMR)
  2019-09-10 15:10   ` Jonathan Beri
@ 2019-09-10 16:21     ` Vadim Kochan
  0 siblings, 0 replies; 4+ messages in thread
From: Vadim Kochan @ 2019-09-10 16:21 UTC (permalink / raw
  To: buildroot

host pkgconf even could not download, may be issue with docker image, you can
try Dockerfile from support/docker.

On Tue, Sep 10, 2019 at 6:10 PM Jonathan Beri <jmberi@gmail.com> wrote:
>
> Thanks Vadim, confirmed both were there.
>
> I just a new container with wamr copied over. When I ran `make wamr-build`, I noticed `pkgconf` fail during the host compilation step. Maybe this is a red herring but now when I simply run `make` I'm seeing:
>
> ```
> >>> host-pkgconf 1.5.3 Downloading
> wget: error while loading shared libraries: libpsl.so.5: cannot open shared object file: Error 40
> wget: error while loading shared libraries: libpsl.so.5: cannot open shared object file: Error 40
> wget: error while loading shared libraries: libpsl.so.5: cannot open shared object file: Error 40
> package/pkg-generic.mk:143: recipe for target '/home/buildroot-2019.02.5/output/build/host-pkgconf-1.5.3/.stamp_downloaded' failed
> make: *** [/home/buildroot-2019.02.5/output/build/host-pkgconf-1.5.3/.stamp_downloaded] Error 1
> ```
>
> On Tue, Sep 10, 2019 at 6:52 AM Vadim Kochan <vadim4j@gmail.com> wrote:
>>
>> HI Jonathan,
>>
>> On Tue, Sep 10, 2019 at 3:36 PM Jonathan Beri <jmberi@gmail.com> wrote:
>> >
>> > Hello! I'm new to buildroot and so far have found the project to be very mature. My goal is to create an environment for WebAssembly Micro Runtime (WAMR,) a standalone WebAssembly (Wasm) runtime on SBCs like the Raspberry Pi. See https://github.com/intel/wasm-micro-runtime.
>> >
>> > I started by using a docker container to build an image using the Raspberry Pi defconfig. I got it working in an afternoon. Next I created a `wamr` folder in `packages`, added a `Config.in` and started to work on a `wamr.mk`.
>> >
>> > And here's where I need help. The build process for WAMR Core is fairly straightforward - see https://github.com/intel/wasm-micro-runtime/blob/master/doc/building.md#build-wamr-core. I contributed the Dockerfile, which took a few hours to write. I'm comfortable on linux but far from an expert. However, I'm little more than a novice when it comes kconfig, make and the like.
>> >
>> > I tried following the CMake docs to build a package: https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages. Here's an example of what I tried:
>> >
>> > ```
>> > ################################################################################
>> > #
>> > # wamr
>> > #
>> > ################################################################################
>> >
>> > WAMR_VERSION = a522e985f30c12c9c66eda6ff3ab41f493b31b2c
>> > WAMR_SOURCE = wasm-micro-runtime-master.tar.gz
>> > WAMR_SITE = $(call github,intel,wasm-micro-runtime,$(WAMR_VERSION))
>> >
>> > $(eval $(cmake-package))
>> > ```
>> >
>> > From here I didn't know how to test even that this syntax is correct. I've tried `./utils/test-pkg`, `make wamr-source` & `make wamr-build` but the outputs haven't been helpful.
>> >
>> > I've tried looking for additional tutorials on the web (Bootlin has some lovely detailed ones) but so far none that have helped me wrap my head around the packaging system.
>> >
>> > Anyone have suggestions or pointers?
>> >
>>
>> So may be try to check:
>>
>> 1) if you included your Config.in in the package/Config.in like the
>> rest of packages
>>
>> 2) if you enabled config for your package in menuconfig/defconfig, you
>> can check it in
>> (probably) output/.config if the BR2_PACKAGE_WAMR (or how you named
>> your package in your Config.in) is set to 'y':
>>     BR2_PACKAGE_WAMR=y
>>
>> Regards,
>> Vadim Kochan

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

end of thread, other threads:[~2019-09-10 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-10 12:35 [Buildroot] Guidance creating first package (WAMR) Jonathan Beri
2019-09-10 13:49 ` Vadim Kochan
2019-09-10 15:10   ` Jonathan Beri
2019-09-10 16:21     ` Vadim Kochan

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.