2019-07-25, 21:17
In order to provide @popcornmix 's leia_pi4 fork for Arch ARM, I need to make two modifications. Arch ARM builds packages in a clean-chroot (a buildroot) that is a subdirectory/fakeroot containing all dependencies for the build.
Not doing both steps causes build failures:
1) Manually copy
2) Manually rename or delete the following directories in buildroot (provided by the raspberrypi-firmware package):
I can do step 1 in the PKGBUILD no problem, but I cannot do step 2 since those directories are not under the control of the buildroot user (ie they are root:root). Step 2 is needed to avoid this build error.
My strategy to circumvent is to simply copy the contents of
Native location (all owned by root:root):
Needed location (all owned by myuser:mygroup):
Is there a variable or variables I can export or CMAKE switches I can use that would allow me to redefine so the build will uses the new location?
My best guess at a workaround is to define each of the VARS the code wants like this:
The build gets going but dies here:
Some of the VARS I defined there are dropped it seems:
I'm not sure how to proceed. Link to entire build log. Your insights are welcomed and thank you again for all the time you have put into this.
Not doing both steps causes build failures:
1) Manually copy
/opt/vc/lib/pkgconfig/{bcm_host.pc,mmal.pc,vcsm.pc}
to $srcdir/pkgconfig/
and prefix my cmake command with: export PKG_CONFIG_PATH=$srcdir/pkgconfig
. 2) Manually rename or delete the following directories in buildroot (provided by the raspberrypi-firmware package):
/opt/vc/include/{EGL,GLES,GLES2}
I can do step 1 in the PKGBUILD no problem, but I cannot do step 2 since those directories are not under the control of the buildroot user (ie they are root:root). Step 2 is needed to avoid this build error.
My strategy to circumvent is to simply copy the contents of
/buildroot/opt/vc
to the build space and then modify that copy, deleting the offending directories. For that to work, I need to redirect cmake to use it rather than the native location.Native location (all owned by root:root):
/buildroot/opt/vc
Needed location (all owned by myuser:mygroup):
$srcdir/opt
Is there a variable or variables I can export or CMAKE switches I can use that would allow me to redefine so the build will uses the new location?
My best guess at a workaround is to define each of the VARS the code wants like this:
Code:
# untar firmware package to $srcdir/opt
# now delete the 3 offending dirs thus leaving everything else intact
# but kodi build expects everything to be in /opt and it is now in $srcdir/opt
rm -rf $srcdir/opt/vc/include/{EGL,GLES,GLES2}
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DMMAL_INCLUDE_DIR="$srcdir/opt/vc/include" \
-DMMAL_LIBRARY="$srcdir/opt/vc/include/lib" \
-DMMALCORE_LIBRARY="$srcdir/opt/vc/include/lib" \
-DMMALUTIL_LIBRARY="$srcdir/opt/vc/include/lib" \
-DMMALCLIENT_LIBRARY="$srcdir/opt/vc/include/lib" \
-DMMALCOMPONENT_LIBRARY="$srcdir/opt/vc/include/lib" \
-DVCSM_LIBRARY="$srcdir/opt/vc/include/interface/vcsm" \
-DBCM_LIBRARY="$srcdir/opt/vc/include/lib" \
-DCONTAINER_LIBRARY="$srcdir/opt/vc/include/lib" \
-DVCHIQ_LIBRARY="$srcdir/opt/vc/include/interface/vchiq_arm" \
-DVCOS_LIBRARY="$srcdir/opt/vc/include/interface/vcos" \
-DVCHOSTIF_LIBRARY="$srcdir/opt/vc/include/interface/vmcs_host" \
-DVCILCS_LIBRARY="$srcdir/opt/vc/include/interface/vmcs_host" \
...
The build gets going but dies here:
Code:
...
CC libavcodec/roqvideodec.o
CC libavcodec/roqvideoenc.o
CC libavcodec/rpi_ctrl_ffmpeg.o
src/libavcodec/rpi_ctrl_ffmpeg.c:28:10: fatal error: interface/vcsm/user-vcsm.h: No such file or directory
#include <interface/vcsm/user-vcsm.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
src/libavcodec/rpi_ctrl_ffmpeg.c:28:10: fatal error: interface/vcsm/user-vcsm.h: No such file or directory
#include <interface/vcsm/user-vcsm.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [/build/kodi-rbp4/src/kodi-build/build/ffmpeg/src/ffmpeg/ffbuild/common.mak:60: libavcodec/rpi_ctrl_ffmpeg.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [CMakeFiles/ffmpeg.dir/build.make:112: ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[4]: *** [CMakeFiles/Makefile2:76: CMakeFiles/ffmpeg.dir/all] Error 2
make[3]: *** [Makefile:130: all] Error 2
make[2]: *** [CMakeFiles/ffmpeg.dir/build.make:114: build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1308: CMakeFiles/ffmpeg.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Some of the VARS I defined there are dropped it seems:
Code:
-- Configuring done
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi-test" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "kodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vmcs_host". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vchiq_arm". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcos". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "libkodi" requests linking to directory "/build/kodi-rbp4/src/opt/vc/include/interface/vcsm". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
I'm not sure how to proceed. Link to entire build log. Your insights are welcomed and thank you again for all the time you have put into this.