Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "error: ‘imx_dwl_buffer’ undeclared" when building v1.1.2 #7

Closed
Talkless opened this issue Jun 8, 2023 · 3 comments
Closed

Comments

@Talkless
Copy link

Talkless commented Jun 8, 2023

I have some toolchain named fsl-imx-wayland-glibc-x86_64-core-image-base-cortexa53-crypto-imx8mmevk-toolchain-5.10-hardknott. Sysroot has old GStreamer 1.18 , so I'm building gstreamer-imx for GStreamer 1.22.3.

I've set imx headers path to /opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx, build starts but fails with:

[ 9/12] Compiling libimxdmabuffer.pc.in
In file included from ../imxdmabuffer/imxdmabuffer_g2d_allocator.c:1:
../imxdmabuffer/imxdmabuffer_g2d_allocator.c: In function ‘imx_dma_buffer_g2d_allocator_map’:
../imxdmabuffer/imxdmabuffer_g2d_allocator.c:142:11: error: ‘imx_dwl_buffer’ undeclared (first use in this function); did you mean ‘imx_g2d_buffer’?
  142 |   assert((imx_dwl_buffer->map_flags & flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK) == (flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK));
      |           ^~~~~~~~~~~~~~
../imxdmabuffer/imxdmabuffer_g2d_allocator.c:142:11: note: each undeclared identifier is reported only once for each function it appears in

Could this mean that imx linux headers are too old in that toolchain?

Full log:

Setting top to                           : /home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04 
Setting out to                           : /home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build 
Checking for 'gcc' (C compiler)          : aarch64-poky-linux-gcc -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux 
Testing compiler flags -O2 -pipe -g -feliminate-unused-debug-types 
Checking if building with these flags works : yes 
Checking for compiler switch -O2            : yes 
Checking for compiler switch -DPIC          : yes 
Checking for compiler switch -fPIC          : yes 
Checking for compiler switch -pedantic      : yes 
Checking for compiler switch -std=gnu99     : yes 
Checking for compiler switch -Wall          : yes 
Checking for compiler switch -Wextra        : yes 
Checking for header linux/mxcfb.h           : yes 
i.MX linux headers path: /opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx 
Checking for dma-heap allocator support by testing the presence of the DMA_HEAP_IOCTL_ALLOC ioctl : yes 
dma-heap device node path: /dev/dma_heap/linux,cma 
dma-heap allocates uncached memory                                                                : no 
Checking for ION allocator support by testing the presence of linux/ion.h                         : yes 
--hantro-decoder-version is not set; disabling DWL allocator 
Hantro decoder version: None 
Hantro headers path:  
checking for linux/fb.h and the IPU header linux/ipu.h                                            : yes 
Checking for library g2d                                                                          : yes 
Checking for header g2d.h                                                                         : yes 
checking for linux/pxp_device.h                                                                   : yes 
libimxdmabuffer version 1.1.2 
'configure' finished successfully (0.635s)
Waf: Entering directory `/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build'
[ 1/12] Compiling imxdmabuffer/imxdmabuffer_pxp_allocator.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_pxp_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_pxp_allocator.c.1.o']
[ 2/12] Compiling imxdmabuffer/imxdmabuffer_ion_allocator.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_ion_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_ion_allocator.c.1.o']
[ 3/12] Compiling imxdmabuffer/imxdmabuffer.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer.c.1.o']
[ 4/12] Compiling imxdmabuffer/imxdmabuffer_g2d_allocator.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_g2d_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_g2d_allocator.c.1.o']
[ 5/12] Compiling imxdmabuffer/imxdmabuffer_ipu_priv.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_ipu_priv.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_ipu_priv.c.1.o']
[ 6/12] Compiling imxdmabuffer/imxdmabuffer_dma_heap_allocator.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_dma_heap_allocator.c.1.o']
[ 7/12] Compiling imxdmabuffer/imxdmabuffer_ipu_allocator.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_ipu_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_ipu_allocator.c.1.o']
[ 8/12] Compiling test/test-alloc.c
06:52:51 runner ['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-I.', '-I..', '../test/test-alloc.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/test/test-alloc.c.4.o']
[ 9/12] Compiling libimxdmabuffer.pc.in
In file included from ../imxdmabuffer/imxdmabuffer_g2d_allocator.c:1:
../imxdmabuffer/imxdmabuffer_g2d_allocator.c: In function ‘imx_dma_buffer_g2d_allocator_map’:
../imxdmabuffer/imxdmabuffer_g2d_allocator.c:142:11: error: ‘imx_dwl_buffer’ undeclared (first use in this function); did you mean ‘imx_g2d_buffer’?
  142 |   assert((imx_dwl_buffer->map_flags & flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK) == (flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK));
      |           ^~~~~~~~~~~~~~
../imxdmabuffer/imxdmabuffer_g2d_allocator.c:142:11: note: each undeclared identifier is reported only once for each function it appears in

Waf: Leaving directory `/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build'
Build failed
 -> task in 'imxdmabuffer' failed with exit status 1: 
	{task 139920145773280: c imxdmabuffer_g2d_allocator.c -> imxdmabuffer_g2d_allocator.c.1.o}
['aarch64-poky-linux-gcc', '-mcpu=cortex-a53', '-march=armv8-a+crc+crypto', '-fstack-protector-strong', '-O2', '-D_FORTIFY_SOURCE=2', '-Wformat', '-Wformat-security', '-Werror=format-security', '--sysroot=/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux', '-Wextra', '-Wall', '-std=gnu99', '-pedantic', '-fPIC', '-DPIC', '-O2', '-O2', '-pipe', '-g', '-feliminate-unused-debug-types', '-fPIC', '-I.', '-I..', '-I/opt/fsl-imx-wayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/imx', '../imxdmabuffer/imxdmabuffer_g2d_allocator.c', '-c', '-o/home/vincas/.conan/data/imxdmabuffer/1.1.2/mycompany/stable/build/88abcc74e28af662737a51ad32b4ade060691a04/build/imxdmabuffer/imxdmabuffer_g2d_allocator.c.1.o']
@Talkless
Copy link
Author

Talkless commented Jun 8, 2023

Right, it seems I can build 1.0.1 on that sysroot, not the latest...

@Talkless Talkless closed this as completed Jun 8, 2023
@dv1
Copy link
Collaborator

dv1 commented Jun 8, 2023

This was a typo in 1.1.2, fixed in commit 41825b1 . I will release a version 1.1.3 soon that includes this. Until then, that commit can be put on top of 1.1.2.

@Talkless
Copy link
Author

Talkless commented Jun 8, 2023

Thanks @dv1, it builds with fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants