Avnu / libavtp

Open source implementation of Audio Video Transport Protocol (AVTP) specified in IEEE 1722-2016 spec.
BSD 3-Clause "New" or "Revised" License
62 stars 34 forks source link

cmocka dependency? #38

Closed r10kindsofpeople closed 2 years ago

r10kindsofpeople commented 2 years ago

I'm trying to cross-compile the release version under Yocto, and the Meson build step is failing with a dependency on cmocka. Installing cmocka on the host system (Ubuntu 18.04) didn't seem to help, so I'm assuming it's looking for it in the cross tools. Unfortunately, there's no recipe for cmocka in Yocto that I've found.

"Run-time dependency cmocka found: NO (tried pkgconfig and cmake)"

Is the dependency recent? Postings from 5/24/2021 giving instructions on how to build under Yocto don't mention cmocka.

edersondisouza commented 2 years ago

Hi @r10kindsofpeople,

cmocka is not a new dependency. But it should be optional - it's used only for tests. So I'm bit confused by "failing". That message is informative only. Have you tried to just build it (ninja -C build)?

r10kindsofpeople commented 2 years ago

Hi,

$ source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux 
$ meson build
The Meson build system
Version: 0.51.2
Source dir: /home/mumblemumble/git
Build dir: /home/mumblemumble/git/build
Build type: cross build
Project name: libavtp
Project version: 0.1.0
Appending CFLAGS from environment: ' -O2 -pipe -g -feliminate-unused-debug-types '
Appending LDFLAGS from environment: '-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now'
C compiler for the build machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C compiler for the host machine: aarch64-poky-linux-gcc -mcpu=cortex-a53+crc+crypto -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fsl-imx-wayland/5.4-zeus/sysroots/aarch64-poky-linux (gcc 9.2.0 "aarch64-poky-linux-gcc (GCC) 9.2.0")
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /opt/fsl-imx-wayland/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/pkg-config (0.29.2)
Found CMake: /opt/fsl-imx-wayland/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/cmake (3.15.3)
Run-time dependency cmocka found: NO (tried pkgconfig and cmake)

meson.build:40:0: ERROR: Dependency "cmocka" not found, tried pkgconfig and cmake

A full log can be found at /home/mumblemumble/git/build/meson-logs/meson-log.txt
$ ninja -C build
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory

This from release 0.1.0 pulled via git.

I downloaded 'master' as a ZIP, unpacked it, and the meson build step completed without error. So I can't speak to whether it's a 0.1.0 vs master issue or a PICNIC problem with the way I pulled the files. Not a git expert, and I was trying to hack my way to a working Yocto recipe. Either way, I have something that builds, so I'm fine with closing this.

edersondisouza commented 2 years ago

Oh, that's true - on 0.1.0 cmoka was still mandatory. We probably need a new release =D

I'll close this, then.