Why do i get brut.androlib.AndrolibException-error while building apk-file with apktool? - apk

I downloaded some app from Google PlayStore and dissasabled it with:
$ apktool d my-app
I: Using Apktool 2.5.0 on my-app.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\kreis\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
Now without any modification i want to compile it to apk-file and i become the same error each time:
$ apktool b jodel -o out.apk
I: Using Apktool 2.5.0
...
...
W: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\kreis\AppData\Local\Temp\brut_util_Jar_71166972874490660111854333778234451644.tmp, p, --forced-package-id, 127, --version-code, 0000100, --version-name, 12.11.0, --no-version-vectors, -F, C:\Users\kreis\AppData\Local\Temp\APKTOOLsomecode3.tmp, -e, C:\Users\kreis\AppData\Local\Temp\APKTOOLsomecode.tmp, -0, arsc, -I, C:\Users\kreis\AppData\Local\apktool\framework\1.apk, -S, C:\Users\kreis\Downloads\my-app\res, -M, C:\Users\kreis\Downloads\my-app\AndroidManifest.xml]
I tried following:
Another versions: 2.3.0, 2.2.0 etc.
Adding -r and -s options
Any other alternatives to apktool: it still not working
I appreciate any help!

Related

I compiled an app with apktool_2.6.1 and i didn't make any changes to the app but when i run : apktool b app.apk

I got the following error:
invalid resource directory name: C:\Users\test\Documents\APK Easy Tool\1-Decompiled APKs\com.app.app2\res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\test\AppData\Local\Temp\brut_util_Jar_121707779579717501731948984067731632634.tmp, p, --forced-package-id, 127, --version-code, 4591, --version-name, 4.59.1, --no-version-vectors, -F, C:\Users\test\AppData\Local\Temp\APKTOOL3747578255524950029.tmp, -e, C:\Users\test\AppData\Local\Temp\APKTOOL7131208164915828680.tmp, -0, arsc, -I, C:\Users\test\AppData\Local\apktool\framework\1.apk, -S, C:\Users\test\Documents\APK Easy Tool\1-Decompiled APKs\com.app.app2\res, -M, C:\Users\Everspin\Documents\APK Easy Tool\1-Decompiled APKs\com.app.app2\AndroidManifest.xml]
You should move to aapt2. Add --use-aapt2 during compilation and make sure you update to a more recent version.
You can tell from the res / navigation error that you are rebuilding an application and that was built from aapt2 with aapt1.

Bitbake tries to fetch sources from unavailable URL and they fail

I'm currently trying to set up an environment for Yocto project for my personal study.
I was clueless about where to start Yocto so I bought the book Embedded Linux Projects Using Yocto Project Cookbook but it keeps failing to build the environment.
I've run only simple commands. I ran source oe-init-build-env <dir name> to make a directory and ran bitbake core-image-minimal.
But bitbake command keeps giving me errors like this. This is the log.
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100%
|#################################################################################| Time: 00:00:25Parsing of 891 .bb files complete (0 cached, 891 parsed). 1287 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-18.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "qemuarm"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "arm armv5 thumb dsp"
TARGET_FPU = "soft"
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL http://www.zlib.net/zlib-1.2.8.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://www.multiprecision.org/mpc/download/mpc-1.0.2.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://ftp.gmplib.org/pub/gmp-6.0.0/gmp-6.0.0a.tar.bz2, attempting MIRRORS if available
WARNING: Failed to fetch URL http://ymorin.is-a-geek.org/download/kconfig-frontends/kconfig-frontends-3.12.0.0.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://download.gna.org/cryptodev-linux/cryptodev-linux-1.6.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz to /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz_bad-checksum_2ae3e6c958d83d2855a37f13fe29fd95
WARNING: Failed to fetch URL http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://rpm5.org/files/popt/popt-1.16.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz to /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz_bad-checksum_9e09d0bf772649c5ba385c48ba2d3547
WARNING: Failed to fetch URL http://zlib.net/pigz/pigz-2.3.1.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm to /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm_bad-checksum_6a8d9bc6a7e0162d7ff72fefc9e841e5
WARNING: Failed to fetch URL http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://invisible-island.net/byacc/byacc-20140422.tgz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://pkg-shadow.alioth.debian.org/releases/shadow-4.2.1.tar.xz, attempting MIRRORS if available
I checked the URLs in the log and it turned out they are all 404 pages. And most importantly, it terminates by showing this message.
ERROR: Error executing a python function in /opt/yocto/poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb:
The stack trace of python calls that resulted in this exception/failure was:
File: 'do_preconfigure', lineno: 12, function: <module>
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0010:
0011:
*** 0012:do_preconfigure(d)
0013:
File: 'do_preconfigure', lineno: 5, function: do_preconfigure
0001:
0002:def do_preconfigure(d):
0003: import subprocess
0004: cmd = d.expand('PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1 && gnu-configize')
*** 0005: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0006: # See 0044-gengtypes.patch, we need to regenerate this file
0007: bb.utils.remove(d.expand("/opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/gengtype-lex.c"))
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
File: '/usr/lib/python2.7/subprocess.py', lineno: 223, function: check_output
0219: if retcode:
0220: cmd = kwargs.get("args")
0221: if cmd is None:
0222: cmd = popenargs[0]
*** 0223: raise CalledProcessError(retcode, cmd, output=output)
0224: return output
0225:
0226:
0227:def list2cmdline(seq):
Exception: CalledProcessError: Command 'PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm
I feel like I need to modify conf files to fetch available URLs but I'm new to Yocto and Bitbake so I'm very lost now. I would appreciate if anyone could tell me where to find solutions. Thank you and stay safe everyone.
You seem to use quite an old yocto version 1.7.3 while there is already 3.3 released. This means also you try to build recipes for some packages that are also old and hence some URLs might be unavailable. Might it be an option for you to use a newer version?
If this is no option for you, one thing to try would be setting MIRROR (see [1]) to a mirror [2] where those packages are still available. But this approach I would not prefer.
[1] https://www.yoctoproject.org/docs/1.7/bitbake-user-manual/bitbake-user-manual.html#var-MIRRORS
[2] could be: http://downloads.yoctoproject.org/mirror/sources/
1.7.3 is a very old release of the project, originally released in 2015 with a last point release in 2016. The fetcher warnings you see aren't the problem, they're warnings but it will fall back to the project mirrors. If it hadn't fallen back correctly, it would have shown errors as well as the warnings. The bigger problem is in fact this:
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Since Ubuntu 18.04 is three years newer than the project release you're using, there is no way it would be compatible with that release. You need to use a host OS from the era of the release, so Ubuntu 16.04 may work better. This is because the host OS provides gcc used to build the cross tools and the newer gcc versions don't tend to work with 100% of old code without tweaks.
So in short, use an older distro if you want to try and get that to build.

Why can't I get st_read to open a shapefile from a compressed file? (Map is read if saved on local Onedrive folder but not unzipped in R)

I'm creating a report that includes a vector map of the state of Oklahoma in the US. I found shapefiles that I need, but these are in zipped files.
I found a similar question on Stackoverflow (link here) about downloading and extracting zipped data, and used the approach suggested there. However, I am getting an error about being unable to find the file in the zipped file--even though it is there. The original question is linked below:
https://stackoverflow.com/questions/3053833/using-r-to-download-zipped-data-file-extract-and-import-data#:~:text=8%20Answers.%201%20Create%20a%20temp.%20file%20name,simpler%29%20looks%20like%20temp%20%3C-%20tempfile%28%29%20download.%20
This is the R code that I used, which includes linked to the zipped vector data:
library(tidyverse)
library(sf)
library(tmap)
ok_zip_code_tempfile <- tempfile()
download.file("https://okmaps.org/OGI/Downloads/okzip/OGR-SHP-ZIP/okzip__state_EPSG_32124.zip", ok_zip_code_tempfile)
ok_zip_map <- st_read(unzip(ok_zip_code_tempfile, files="okzip.shp"))
unlink(ok_zip_code_tempfile)
ok_municipalities_tempfile <- tempfile()
download.file("https://www.odot.org/hqdiv/p-r-div/maps/shp-files/munibnd.zip", ok_municipalities_tempfile)
ok_municipalities <- st_read(unzip(ok_municipalities_tempfile, files='munibnd.shp'))
unlink(ok_municipalities_tempfile)
When running these, I get the following errors:
> Error: Cannot open
> "C:\Users\[myname]\OneDrive\Desktop\Documents\okzip.shp"; The source
> could be corrupt or not supported. See `st_drivers()` for a list of
> supported formats. In addition: Warning message: In CPL_read_ogr(dsn,
> layer, query, as.character(options), quiet, : GDAL Error 4: Unable
> to open C:\Users\[myname]\OneDrive\Desktop\Documents\okzip.shx or
> C:\Users\[myname]\OneDrive\Desktop\Documents\okzip.SHX. Set
> SHAPE_RESTORE_SHX config option to YES to restore or create it.
>
>
> Error: Cannot open
> "C:\Users\[myname]\OneDrive\Desktop\Documents\munibnd.shp"; The source
> could be corrupt or not supported. See `st_drivers()` for a list of
> supported formats. In addition: Warning message: In CPL_read_ogr(dsn,
> layer, query, as.character(options), quiet, : GDAL Error 4: Unable
> to open C:\Users\[myname]\OneDrive\Desktop\Documents\munibnd.shx or
> C:\Users\[myname]\OneDrive\Desktop\Documents\munibnd.SHX. Set
> SHAPE_RESTORE_SHX config option to YES to restore or create it.
Further confusing the mix, if I save a copy on my Desktop on OneDrive, then the files load correctly:
ok_zip_map <- st_read("C:\\Users\\[myname]\\OneDrive\\Desktop\\OK_Data\\okzip.shp")
> Reading layer `okzip' from data source
> `C:\Users\[myname]\OneDrive\Desktop\OK_Data\okzip.shp' using driver
> `ESRI Shapefile' Simple feature collection with 682 features and 4
> fields geometry type: MULTIPOLYGON dimension: XY bbox:
> xmin: -103.0025 ymin: 33.61579 xmax: -94.43066 ymax: 37.00231
> geographic CRS: WGS 84
ok_municipalities <- st_read("C:\\Users\\[myname]\\OneDrive\\Desktop\\OK_Data\\munibnd.shp")
> Reading layer `munibnd' from data source
> `C:\Users\[myname]\OneDrive\Desktop\OK_Data\munibnd.shp' using driver
> `ESRI Shapefile' Simple feature collection with 1414 features and 8
> fields geometry type: MULTIPOLYGON dimension: XY bbox:
> xmin: -102.5219 ymin: 33.76577 xmax: -94.43182 ymax: 36.99937 CRS:
> NA
However, if I save the same files on my local computer (and not in a Onedrive folder), then I get an error.
ok_zip_map <- st_read("C:\\Users\\[myname]\\Documents\\okzip.shp")
> Error: Cannot open "C:\Users\[myname]\Documents\okzip.shp"; The source
> could be corrupt or not supported. See `st_drivers()` for a list of
> supported formats. In addition: Warning message: In CPL_read_ogr(dsn,
> layer, query, as.character(options), quiet, : GDAL Error 4: Unable
> to open C:\Users\[myname]\Documents\okzip.shx or
> C:\Users\[myname]\Documents\okzip.SHX. Set SHAPE_RESTORE_SHX config
> option to YES to restore or create it.
ok_municipalities <- st_read("C:\\Users\\[myname]\\Documents\\munibnd.shp")
> Error: Cannot
> open "C:\Users\[myname]\Documents\munibnd.shp"; The source could be
> corrupt or not supported. See `st_drivers()` for a list of supported
> formats. In addition: Warning message: In CPL_read_ogr(dsn, layer,
> query, as.character(options), quiet, : GDAL Error 4: Unable to open
> C:\Users\[myname]\Documents\munibnd.shx or
> C:\Users\[myname]\Documents\munibnd.SHX. Set SHAPE_RESTORE_SHX config
> option to YES to restore or create it
I've also tried running the original code (downloading the link into a temporary file and unzipping it in R) on another computer (a Mac) and it failed with a similar error.
I would ideally like to produce a report that doesn't need dependency files (i.e., local copies of the maps), as it will be run by others on their own computers. Can someone help me understand what may be going on?
Thanks in advance for any guidance you might have!
Tony
As mentioned in this answer, the key here is to unzip the downloaded file, and read the unzipped folder using sf::read_sf or sf::st_read. Here's a wrapper function that I used before:
library(sf)
read_shape_URL <- function(URL){
cur_tempfile <- tempfile()
download.file(url = URL, destfile = cur_tempfile)
out_directory <- tempfile()
unzip(cur_tempfile, exdir = out_directory)
st_read(dsn = out_directory) #read_sf also works here
}
Using this, we can load the zipped shapefile:
ok_zip_map <- read_shape_URL("https://okmaps.org/OGI/Downloads/okzip/OGR-SHP-ZIP/okzip__state_EPSG_32124.zip")

bitbake rpi-test-image with MACHINE=raspberrypi3-64 failing to build on the zeus release of yocto

I'm following the readthedocs instructions for the meta-raspberrypi layer and trying to build the rpi-test-image image for the raspberrypi3-64 machine contained in the meta-raspberrypi layer using the zeus release of yocto.
I added this to conf/local.conf:
MACHINE ??= "raspberrypi3-64"
ENABLE_UART = "1"
My bblayers.conf file looks like this:
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$ cat bblayers.conf
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/opt/yocto/workspace/sources/poky/meta \
/opt/yocto/workspace/sources/poky/meta-poky \
/opt/yocto/workspace/sources/poky/meta-yocto-bsp \
/opt/yocto/workspace/sources/meta-openembedded/meta-oe \
/opt/yocto/workspace/sources/meta-openembedded/meta-multimedia \
/opt/yocto/workspace/sources/meta-openembedded/meta-networking \
/opt/yocto/workspace/sources/meta-openembedded/meta-python \
/opt/yocto/workspace/sources/meta-raspberrypi \
"
I added the 4 items from meta-openembeeded as a work-around for ERROR: Nothing RPROVIDES 'bigbuckbunny-480p':
This enables the build to run but it exits with the following errors:
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$ bitbake rpi-test-image
Parsing recipes: 100% |#########################################################################################################################################| Time: 0:02:49
Parsing of 2340 .bb files complete (0 cached, 2340 parsed). 3464 targets, 133 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-16.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi3-64"
DISTRO = "poky"
DISTRO_VERSION = "3.0.2"
TUNE_FEATURES = "aarch64 cortexa53 crc"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "zeus:74f229160c7f4037107c1dad8f0d02128c080a7e"
meta-oe
meta-multimedia
meta-networking
meta-python = "zeus:9e60d30669a2ad0598e9abf0cd15ee06b523986b"
meta-raspberrypi = "zeus:0e05098853eea77032bff9cf81955679edd2f35d"
Initialising tasks: 100% |######################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 1338 Found 0 Missed 1338 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
WARNING: icu-native-64.2-r0 do_fetch: Checksum mismatch for local file /opt/yocto/cache/downloads/icu4c-64_2-src.tgz
Cleaning and trying again.
WARNING: icu-native-64.2-r0 do_fetch: Renaming /opt/yocto/cache/downloads/icu4c-64_2-src.tgz to /opt/yocto/cache/downloads/icu4c-64_2-src.tgz_bad-checksum_abb12cb25a05198ad8f4c1e6f668fa05
WARNING: icu-native-64.2-r0 do_fetch: Checksum failure encountered with download of http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz - will attempt other sources if available
ERROR: rpi-test-image-1.0-r0 do_rootfs: Could not invoke dnf. Command '/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/etc/yum.repos.d --installroot=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs --setopt=logdir=/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/temp --repofrompath=oe-repo,/opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/oe-rootfs-repo --nogpgcheck install psplash-raspberrypi packagegroup-core-boot packagegroup-base-extended run-postinsts packagegroup-rpi-test locale-base-en-us locale-base-en-gb' returned 1:
DNF version: 4.2.2
cachedir: /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Thu 30 Apr 2020 09:25:08 PM UTC.
Last metadata expiration check: 0:00:02 ago on Thu 30 Apr 2020 09:25:11 PM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: package packagegroup-base-wifi-1.0-r83.raspberrypi3_64 requires wireless-regdb-static, but none of the providers can be installed
- package wireless-regdb-2019.06.03-r0.noarch conflicts with wireless-regdb-static provided by wireless-regdb-static-2019.06.03-r0.noarch
- package packagegroup-base-1.0-r83.raspberrypi3_64 requires packagegroup-base-wifi, but none of the providers can be installed
- package packagegroup-rpi-test-1.0-r0.noarch requires wireless-regdb, but none of the providers can be installed
- package packagegroup-base-extended-1.0-r83.raspberrypi3_64 requires packagegroup-base, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
ERROR: Logfile of failure stored in: /opt/yocto/workspace/rpi3-64-build/tmp/work/raspberrypi3_64-poky-linux/rpi-test-image/1.0-r0/temp/log.do_rootfs.23419
ERROR: Task (/opt/yocto/workspace/sources/meta-raspberrypi/recipes-core/images/rpi-test-image.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3511 tasks of which 1 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/opt/yocto/workspace/sources/meta-raspberrypi/recipes-core/images/rpi-test-image.bb:do_rootfs
Summary: There were 3 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
/opt/yocto/workspace/rpi3-64-build/conf[master]☢ ☠$
I'm not even sure how to go about debugging it.
I've tried googling the warnings and error messages but was not able to find anything the might be causing the problem.
2 questions:
1: What might the problem be in this particular instance?
2: What is a good general procedure for debugging failed builds like this?
UPDATE: "bitbake core-image-base" does successfully build the image, but it is still unclear to me why "bitbake rpi-test-image" failed.

Resolving dependency issue while installing keter vis stack

I am trying to install the keter executable to the implicit "global-project" of stack. I use stack install keter from the directory to do this. When I do so, I get the error.
In the dependencies for keter-1.4.3.2:
http-reverse-proxy-0.5.0.1 from stack configuration does not match >=0.4.2 && <0.5 (latest matching version is 0.4.5)
unix-compat-0.5.0.1 from stack configuration does not match >=0.3 && <0.5 (latest matching version is 0.4.3.1)
needed since keter is a build target.
Some different approaches to resolving this:
* Set 'allow-newer: true' in <$HOME>/.stack/config.yaml to ignore all version constraints and build anyway.
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated
constraint errors, but results may be unpredictable.
* Recommended action: try adding the following to your extra-deps in <$HOME>/.stack/global-project/stack.yaml:
http-reverse-proxy-0.4.5#sha256:7f2a181ec848e8fdc0bdb4d6e775e488897957ee7ae0a2b82a623360168ccf96
unix-compat-0.4.3.1#sha256:a291f209e9c9723204c49c978ed2c53997dbc9666e53fe7bf7a3548b2c8bb22c
When I follow the recommended action, (i.e., I add the following to /.stack/global-project/stack.yaml):
extra-deps:
- http-reverse-proxy-0.4.5#sha256:7f2a181ec848e8fdc0bdb4d6e775e488897957ee7ae0a2b82a623360168ccf96
- unix-compat-0.4.3.1#sha256:a291f209e9c9723204c49c978ed2c53997dbc9666e53fe7bf7a3548b2c8bb22c
I get a different error when I do stack install keter a second time.
Completed 8 action(s).
-- While building package keter-1.4.3.2 using:
/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /.stack/global-project/.stack-work/logs/keter-1.4.3.2.log
Configuring keter-1.4.3.2...
Preprocessing library for keter-1.4.3.2..
Building library for keter-1.4.3.2..
[ 1 of 18] Compiling Codec.Archive.TempTarball ( Codec/Archive/TempTarball.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Codec/Archive/TempTarball.o )
[ 2 of 18] Compiling Data.Conduit.LogFile ( Data/Conduit/LogFile.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Data/Conduit/LogFile.o )
[ 3 of 18] Compiling Data.Conduit.Process.Unix ( Data/Conduit/Process/Unix.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Data/Conduit/Process/Unix.o )
/tmp/stack2837/keter-1.4.3.2/Data/Conduit/Process/Unix.hs:65:20: error:
• The constructor ‘ProcessHandle’ should have 3 arguments, but has been given 2
• In the pattern: ProcessHandle m _
In an equation for ‘processHandleMVar’:
processHandleMVar (ProcessHandle m _) = m
|
65 | processHandleMVar (ProcessHandle m _) = m
| ^^^^^^^^^^^^^^^^^
My guess is that keter still ends up trying to use the 0.5* versions when building, which have different signatures and so the build breaks. Any ideas on how to correctly install keter?
Here is some debug information:
`stack exec -- ghc -v`
Glasgow Haskell Compiler, Version 8.2.2, stage 2 booted by GHC version 8.0.2
Using binary package database: <$HOME>/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.2/lib/ghc-8.2.2/package.conf.d/package.cache
Using binary package database: <$HOME>/.stack/snapshots/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb/package.cache
Using binary package database: <$HOME>/.stack/global-project/.stack-work/install/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb/package.cache
package flags []
loading package database <$HOME>/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.2/lib/ghc-8.2.2/package.conf.d
loading package database <$HOME>/.stack/snapshots/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb
loading package database <$HOME>/.stack/global-project/.stack-work/install/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb
wired-in package ghc-prim mapped to ghc-prim-0.5.1.1
wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
wired-in package base mapped to base-4.10.1.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.12.0.0
wired-in package ghc mapped to ghc-8.2.2
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
ghc: no input files
Usage: For basic information, try the `--help' option.
stack --version
Version 1.9.1, Git revision f9d0042c141660e1d38f797e1d426be4a99b2a3c (6168 commits) x86_64 hpack-0.31.0

Resources