Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Trying to build popcornmix/gbm on Arch ARM aarch64 but encountering missing MMAL.
#1
I am trying to build popcornmix/gbm for Arch ARM aarch64 but an encountering a configuration error during ffmpeg setup it seems.  Likely I am not showing the build system where to find some key header files. Any thoughts as to what I'm missing are welcomed:
Code:
...
Scanning dependencies of target TexturePacker
[ 4%] Building CXX object build/texturepacker/CMakeFiles/TexturePacker.dir/src/md5.cpp.o
[ 4%] Building CXX object build/texturepacker/CMakeFiles/TexturePacker.dir/src/DecoderManager.cpp.o
[ 4%] Building CXX object build/texturepacker/CMakeFiles/TexturePacker.dir/src/TexturePacker.cpp.o
[ 4%] Building CXX object build/upnp/CMakeFiles/upnp.dir/Platinum/Source/Core/PltEvent.cpp.o
ERROR: mmal not found

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
make[5]: *** [CMakeFiles/ffmpeg.dir/build.make:125: ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure] Error 1
make[4]: *** [CMakeFiles/Makefile2:95: CMakeFiles/ffmpeg.dir/all] Error 2
make[3]: *** [Makefile:149: all] Error 2
make[2]: *** [CMakeFiles/ffmpeg.dir/build.make:132: build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:5534: CMakeFiles/ffmpeg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

When I inspect ffbuild/config.log produced by configure, it seems that the build system cannot find several headers:
Code:
% grep fatal config.log|sort|uniq
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: android/native_window.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: atomic.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: conio.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: d3d9.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: direct.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: dxgidebug.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: dxva2api.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: dxva.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: interface/mmal/mmal.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: io.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: libcrystalhd/libcrystalhd_if.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: mach/mach_time.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: mbarrier.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: mfapi.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: mftransform.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: netinet/sctp.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: net/udplite.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:1:10: fatal error: windows.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:2:10: fatal error: media/NdkImage.h: No such file or directory
/tmp/ffconf.Vua60suI/test.c:3:10: fatal error: camera/NdkCameraManager.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: AppKit/AppKit.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: AudioToolbox/AudioToolbox.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: AVFoundation/AVFoundation.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: CoreFoundation/CoreFoundation.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: CoreImage/CoreImage.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: CoreMedia/CoreMedia.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: CoreVideo/CoreVideo.h: No such file or directory
/tmp/ffconf.Vua60suI/test.m:1:10: fatal error: VideoToolbox/VideoToolbox.h: No such file or directory

Complete build log: https://gist.github.com/graysky2/09411b8...383a2f9910
Complete ffmpeg config.log: https://gist.github.com/graysky2/18720fd...343e8c43ec

I am configuring the build like this:
Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_FMT=ON \
-DENABLE_INTERNAL_CROSSGUID=ON \
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_SPDLOG=ON \
-DCORE_PLATFORM_NAME=gbm \
-DAPP_RENDER_SYSTEM=gles \
-Dlibdvdcss_URL="/libdvdcss-1.4.2-Leia-Beta-5.tar.gz" \
-Dlibdvdnav_URL="/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz" \
-Dlibdvdread_URL="/libdvdread-6.0.0-Leia-Alpha-3.tar.gz" \
-DFFMPEG_URL="/ffmpeg-4.3.1-Matrix-Alpha1-2.tar.gz" \
-DFMT_URL="/fmt-6.1.2.tar.gz" \
-DCROSSGUID_URL="/crossguid-8f399e8bd4.tar.gz" \
-DFSTRCMP_URL="/fstrcmp-0.7.D001.tar.gz" \
-DFLATBUFFERS_URL="/flatbuffers-1.11.0.tar.gz" \
-DSPDLOG_URL="/spdlog-1.5.0.tar.gz" \
../xbmc-11dfbdb418bedb13c3834e19b339403edace6e99
Need help programming a Streamzap remote?
Reply
#2
That's expected.
Aarch64 userland does not provide 64bit mmal libs and headers.
https://github.com/raspberrypi/userland/...xt#L11-L17
 
(2020-11-02, 21:42)graysky Wrote: it seems that the build system cannot find several headers:

Those are expected/irrelevant.

Here are the relevant lines https://gist.github.com/graysky2/18720fd...473-L16509
Reply
#3
@asavah - Thanks for pointing that out with the link to userland for me.  Next question is why the build system trying to build with mmal since this is ARM64?  Is there a switch I need to pass to cmake?
Need help programming a Streamzap remote?
Reply
#4
(2020-11-03, 01:04)graysky Wrote: Next question is why the build system trying to build with mmal since this is ARM64?  Is there a switch I need to pass to cmake?
Because it was hardcoded (sort of) to do so.
https://github.com/popcornmix/xbmc/blob/...ts.txt#L25 does enable --enable-rpi
However if you look at the ffmpeg patch itself you can see
Code:
+( enabled rpi || + enabled mmal ) && <lots of stuff here>

Which forces mmal on if --enable-rpi is present.
Sadly I can only answer the question "why it is failing"
but I'm not the right person to answer the questions "why this is needed?", "why there is no check for aarch64?" and "wtf is going to happen with Matrix where rpi platform was removed and v4l2 accel doesn't seem to get any improvements from pi POV?".

Raspbian seems to ship armhf build of Kodi which does have access to mmal.
However 64bit raspbian (Raspberry PI OS) is multiarch and this is not a problem at all.
But it is a problem for "pure" aarch64 distros.
Reply
#5
@asavah - Thanks for the insights.  @popcornmix - can you comment on the original issue and on asavah's questions?
Need help programming a Streamzap remote?
Reply
#6
I asked our codecs guy and he suggested: "The trick is to not --enable-rpi.  If you don't want mmal you probably
don't want anything else enabled by that except possibly --enable-sand."

So maybe swap --enable-rpi for --enable-sand and check if that works.
Reply
#7
FYI: "--disable-rpi --enable-sand" is also what we use on LibreELEC master / RPi4: https://github.com/LibreELEC/LibreELEC.t...age.mk#L24

Not 100% sure if "--disable-rpi" is really needed, we prefer to be explicit in configure options though to prevent autodetect code from accidentally enabling something we don't want.

so long,

Hias
Reply
#8
Thanks for the replies, all.  I am a little confused which exact file I should edit to add the literal "--disable-rpi --enable-sand" ... is it https://github.com/popcornmix/xbmc/blob/...ts.txt#L25 or is it the patch itself, 0001-rpi-Add-hevc-acceleration.patch
Need help programming a Streamzap remote?
Reply
#9
This line: https://github.com/popcornmix/xbmc/blob/...ts.txt#L25
Reply
#10
Thanks guys, using this patch in my fork allowed me to build successfully on Arch ARM aarch64!

EDIT:  I think the problem is Arch ARM aarch64 is not providing the /boot/overlays/* due to the fact that the kernel is vanilla and not raspberrypi branch.

Does aarch64 work the same as armv7h with respect to dtoverlays?  I added the following to /boot/config.txt on the aarch64 box, yet kodi does not start.  Seems there is no drm device. 
Code:
% cat /boot/config.txt 
enable_uart=1

[all]
include kodi-gbm.config.txt
 
Code:
% cat /boot/kodi-gbm.config.txt 
# the recommended vc4 driver is vc4-kms-v3d however support for 4k modes is
# not yet mature and the vc4-fkms-v3d may be substituted but it is known to
# cause tearing artifacts
dtoverlay=vc4-kms-v3d,cma-384
dtoverlay=rpivid-v4l2
disable_overscan=1
 
Code:
% grep 'ERROR\|FATAL' /var/lib/kodi/.kodi/temp/kodi.log
2020-11-03 14:28:01.939 T:626     ERROR <general>: GetDirectory - Error getting /usr/lib/kodi/addons
2020-11-03 14:28:01.939 T:626     ERROR <general>: GetDirectory - Error getting special://xbmcbin/addons
2020-11-03 14:28:01.980 T:626     ERROR <general>: DBus error: org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
2020-11-03 19:28:02.097 T:626     ERROR <general>: CDRMUtils::OpenDrm - no drm devices found: (No such file or directory)
2020-11-03 19:28:02.097 T:626     ERROR <general>: CWinSystemGbm::InitWindowSystem - failed to initialize Atomic DRM
2020-11-03 19:28:02.097 T:626     ERROR <general>: CDRMUtils::OpenDrm - no drm devices found: (No such file or directory)
2020-11-03 19:28:02.097 T:626     ERROR <general>: CWinSystemGbm::InitWindowSystem - failed to initialize Legacy DRM
2020-11-03 19:28:02.097 T:626     ERROR <general>: CDRMUtils::OpenDrm - no drm devices found: (No such file or directory)
2020-11-03 19:28:02.097 T:626     ERROR <general>: CWinSystemGbm::InitWindowSystem - failed to initialize off screen DRM
2020-11-03 19:28:02.466 T:626     FATAL <general>: CApplication::CreateGUI - unable to init windowing system

Complete kodi.log: https://gist.github.com/graysky2/eb163d9...5a5df8b6fd
Need help programming a Streamzap remote?
Reply
#11
Which pi is that?
For pi4 there is no vc4/v3d support in mainline yet, will be in 5.10.

Overlays are rpi specific, not present in mainline kernel, AFAIK rpf/rpt guys invented and implemented them.

Stick with RPF kernels.
Reply
#12
It's Pi4.  Thanks for the info.  I  will mark this as solved.
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
Trying to build popcornmix/gbm on Arch ARM aarch64 but encountering missing MMAL.0