IL/OMX_ headers on Raspberry Pi

313 views
Skip to first unread message

Andrew Benham

unread,
Nov 12, 2021, 10:37:29 AM11/12/21
to baresip
Using a fresh git clone of baresip, building on a Raspberry Pi running bullseye (not buster), I can't find the -dev package which provides the IL/OMX_ headers which omx.h is looking for.

I've installed libomxil-bellagio-dev, but that's probably the wrong package - it provides OMX_ headers but not IL/OMX_ headers

--
Andrew

Alfred E. Heggestad

unread,
Nov 16, 2021, 5:23:22 AM11/16/21
to Andrew Benham, baresip
the bellagio dev is there so that omx.so can be used on other
platforms, I think it is not needed anymore we should probably
remove support for bellagio


do you have a complete build log ?



/alfred

Andrew Benham

unread,
Nov 17, 2021, 12:30:34 PM11/17/21
to baresip
Not sure it warrants a complete build log.

Line 127 of mk/modules.mk reads:

USE_OMX_RPI  := $(shell $(call CC_TEST,bcm_host.h))

which essentially determines whether the target is a Raspberry Pi,  It doesn't check whether the OMX library/header files are available.


modules/omx/modules.mk does:

ifneq ($(USE_OMX_RPI),)
$(MOD)_CFLAGS»··:= -DRASPBERRY_PI -DOMX_SKIP64BIT \
         -isystem /usr/local/include/interface/vmcs_host/linux/ \
         -isystem /usr/local/include/interface/vcos/pthreads/ \
         -isystem /opt/vc/include \
        ·-isystem /opt/vc/include/interface/vmcs_host/linux \
        ·-isystem /opt/vc/include/interface/vcos/pthreads
$(MOD)_LFLAGS»··+= -lvcos -lbcm_host -lopenmaxil -L /opt/vc/lib
endif

ifneq ($(USE_OMX_BELLAGIO),)
$(MOD)_LFLAGS  += -lomxil-bellagio
endif

with no checking whether these files exist.

So when modules/omx/omx.h does

ifdef RASPBERRY_PI
#include <IL/OMX_Core.h>
#include <IL/OMX_Video.h>
#include <IL/OMX_Broadcom.h>
#else

it all blows up:

$ make LFLAGS=-Wl,-rpath=/usr/local/lib --trace
mk/mod.mk:47: update target 'build-arm6/modules/omx/omx.o' due to: modules/omx/omx.c build-arm6 Makefile mk/mod.mk modules/omx/module.mk mk/modules.mk
echo "  CC [M]  build-arm6/modules/omx/omx.o"
  CC [M]  build-arm6/modules/omx/omx.o
mkdir -p build-arm6/modules/omx/
gcc -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wbad-function-cast -Wsign-compare -Wnested-externs -Wshadow -Waggregate-return -Wcast-align -Wold-style-definition -Wdeclaration-after-statement -Wvla  -g -fPIC -DLINUX -DOS=\"linux\" -std=c11 -pedantic -DHAVE_ATOMIC -DARCH=\"arm6\" -DUSE_OPENSSL -DUSE_TLS -DUSE_OPENSSL_DTLS -DUSE_DTLS -DUSE_OPENSSL_SRTP -DUSE_DTLS_SRTP -DUSE_ZLIB -DHAVE_PTHREAD -DHAVE_GETIFADDRS -DHAVE_STRERROR_R -DHAVE_GETOPT -DHAVE_INTTYPES_H -DHAVE_NET_ROUTE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STDBOOL_H -DHAVE_INET6 -DHAVE_SYSLOG -DHAVE_RESOLV -DHAVE_EXECINFO -DHAVE_FORK -DHAVE_PWD_H -DHAVE_POLL     -DHAVE_SELECT -DHAVE_SELECT_H -DHAVE_SETRLIMIT -DHAVE_SIGNAL -DHAVE_SYS_TIME_H -DHAVE_EPOLL -DHAVE_UNAME -DHAVE_UNISTD_H -DHAVE_STRINGS_H -DVERSION=\"1.1.0\" -DVER_MAJOR= -DVER_MINOR= -DVER_PATCH=  -I. -Iinclude -I../re/include -I../rem/include -DPREFIX=\"/usr/local\" -DMOD_PATH=\"/usr/local/lib/baresip/modules\" -DSHARE_PATH=\"/usr/local/share/baresip\" -DRASPBERRY_PI -DOMX_SKIP64BIT -isystem /usr/local/include/interface/vmcs_host/linux/ -isystem /usr/local/include/interface/vcos/pthreads/ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vmcs_host/linux -isystem /opt/vc/include/interface/vcos/pthreads \
    -c modules/omx/omx.c -o build-arm6/modules/omx/omx.o -MD -MF build-arm6/modules/omx/omx.d -MT build-arm6/modules/omx/omx.o
In file included from modules/omx/omx.c:10:
modules/omx/omx.h:9:10: fatal error: IL/OMX_Core.h: No such file or directory
    9 | #include <IL/OMX_Core.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [mk/mod.mk:49: build-arm6/modules/omx/omx.o] Error 1

The supposition is that any Raspberry Pi will have the required files installed.  And there's no instructions on how to get them if they aren't installed.

Andrew Benham

unread,
Nov 17, 2021, 2:11:44 PM11/17/21
to baresip
Reply all
Reply to author
Forward
0 new messages