Build Failed for RISC-V Image Using isar/kas-container

80 views
Skip to first unread message

Sun, Yi

unread,
Apr 13, 2025, 3:01:38 AMApr 13
to isar-...@googlegroups.com

Hi All,

 

I'm new to ISAR and was told it's an efficient project for building embedded OS images.

I'm currently trying to create an Ubuntu Noble (24.04) image for the RISC-V architecture.

 

I gave it a quick try, but ran into some issues:

Step 1: KAS_ALLOW_ROOT=yes ./kas/kas-container menu

Step 2: KAS_ALLOW_ROOT=yes ./kas/kas-container build (or use the "Build" option from the menu)

 

I've attached my configuration files (generated by kas-container) along with the error log dumped by ISAR during the build process.

 

Another question I have is about the concepts of "target" and "host".

After reading as much documentation on ISAR as I could find, I'm still a bit confused:

 

Why do we need a "host" rootfs/distro, given that ISAR runs inside the kas-isar Docker container, which I assume already acts as the host environment?

What I’m aiming for with this project is to generate an image that can be run in QEMU or flashed to a disk — that would be the target distro, right?

 

Any guidance or suggestions would be greatly appreciated!

 

Thanks

   --Sun, Yi

 

riscv-ubuntu.log
config.yaml

Uladzimir Bely

unread,
Apr 13, 2025, 3:42:03 AMApr 13
to Sun, Yi, isar-...@googlegroups.com
Hello.

Currently we support (and test) only amd64/i386 and arm64/armhf
architectures for Ubuntu despite of the fact ubuntu has ports for
riscv64 ( http://ports.ubuntu.com/ubuntu-ports/dists/noble/ ).

For now, you could try attached patch for Isar to run ubuntu-noble
build for riscv64.

Also, you need to apply patches for u-boot and kernel from
https://patchwork.isar-build.org/project/isar/list/?series=1551 - or
wait 2..3 days until they are merged to 'next' branch.

---

In general, we might need to add other architectures supported in
ubuntu-ports into our configs. Stay tuned.

>  
> --
> You received this message because you are subscribed to the Google
> Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to isar-users+...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/isar-users/BL3PR11MB6363A0B1AF096C7A2BC1014D99B02%40BL3PR11MB6363.namprd11.prod.outlook.com
> .

--
Best regards,
Uladzimir.
ubuntu-riscv64.patch

Sun, Yi

unread,
Apr 13, 2025, 4:02:32 AMApr 13
to Uladzimir Bely, isar-...@googlegroups.com
Thanks to Uladzimir for sharing your progress!
I gave the patch a quick try, but unfortunately it didn’t work as expected.
I tried master+patch and next+patch, both are failed.
I'm still seeing the following error message.

BTW, could you please expain more about the "host distro"? Do I really
need a host distro if my running ISAR in KAS container?

```
ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/
bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/isar-apt/1.0-r0/temp/log.do_unpack.686
ERROR: Task (/build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack) failed with exit code '1'
ERROR: base-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/
bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/base-apt/files/distributions.in" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/base-apt/1.0-r0/temp/log.do_unpack.694
ERROR: Task (/build/../repo/meta/recipes-devtools/base-apt/base-apt.bb:do_unpack) failed with exit code '1'
ERROR: isar-mmdebstrap-host-1.0-r0 do_unpack: Unpack failure for URL: 'file://locale'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin
:/bin" cp -fpPRH "/build/../repo/meta/recipes-core/isar-bootstrap/files/locale" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/isar-mmdebstrap-host/1.0-r0/temp/log.do_unpack.746
ERROR: Task (/build/../repo/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb:do_unpack) failed with exit code '1'
NOTE: Tasks Summary: Attempted 22 tasks of which 0 didn't need to be rerun and 3 failed.

Summary: 3 tasks failed:
/build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack
/build/../repo/meta/recipes-devtools/base-apt/base-apt.bb:do_unpack
/build/../repo/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb:do_unpack
Summary: There were 3 ERROR messages, returning a non-zero exit code.
2025-04-13 07:52:46 - ERROR - Command "/repo/bitbake/bin/bitbake -c build isar-image-base" failed with error 1
```

Thanks
--Sun, Yi

>>  
>> --
>> You received this message because you are subscribed to the Google
>> Groups "isar-users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to isar-users+...@googlegroups.com.
>> To view this discussion visit
>> https://groups.google.com/d/msgid/isar-users/BL3PR11MB6363A0B1AF096C7A2BC1014D99B02%40BL3PR11MB6363.namprd11.prod.outlook.com
>> .
>
>--
>Best regards,
>Uladzimir.

>diff --git a/meta-isar/conf/distro/ubuntu-common.inc b/meta-isar/conf/distro/ubuntu-common.inc
>index 88a3b4f0..25aa13ea 100644
>--- a/meta-isar/conf/distro/ubuntu-common.inc
>+++ b/meta-isar/conf/distro/ubuntu-common.inc
>@@ -12,6 +12,9 @@ HOST_BASE_DISTRO = "${BASE_DISTRO}"
> DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-ports.list"
> HOST_DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${HOST_DISTRO}.list conf/distro/${HOST_DISTRO}-ports.list"
>
>+DISTRO_APT_SOURCES:riscv64 ?= "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-ports.list"
>+HOST_DISTRO_APT_SOURCES:riscv64 ?= "conf/distro/${HOST_DISTRO}.list conf/distro/${HOST_DISTRO}-ports.list"
>+
> BOOTSTRAP_KEY = "file://${LAYERDIR_isar}/conf/distro/ubuntu.public.key;sha256sum=36a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
> DISTRO_BOOTSTRAP_KEYS += "${BOOTSTRAP_KEY}"
> HOST_DISTRO_BOOTSTRAP_KEYS += "${BOOTSTRAP_KEY}"
>diff --git a/meta-isar/conf/distro/ubuntu-noble-ports.list b/meta-isar/conf/distro/ubuntu-noble-ports.list
>index adeb2639..9b101e3d 100644
>--- a/meta-isar/conf/distro/ubuntu-noble-ports.list
>+++ b/meta-isar/conf/distro/ubuntu-noble-ports.list
>@@ -1,6 +1,6 @@
>-deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
>-deb-src [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
>-deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
>-deb-src [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
>-deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse
>-deb-src [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse
>+deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
>+deb-src [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
>+deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
>+deb-src [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
>+deb [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse
>+deb-src [arch=armhf,arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse

Uladzimir Bely

unread,
Apr 13, 2025, 4:18:20 AMApr 13
to Sun, Yi, isar-...@googlegroups.com
Briefly, host distro - is a distro that is repsoncible for compiling
custom packages. Target distro - is what will be installed on target.

E.g., in your case (riscv64), we have:
1. Cross-compiling case:
- host-distro: Ubuntu Noble / amd64
- target-distro: Ubuntu Noble / riscv64
2. Non-cross-compiling case:
- host-distro = target-distro = riscv64

Of course, case 2 is much slower because everything is built natively
using qemu-static.

---

I've updated a bit the patch I sent and managed to completely build
ubuntu-noble for starfive-visionfive2 machine.

I pushed my changes to the branch "ubely/devel" so you can give it a
try without any additional patches.

./kas/kas-container menu:
- Machine selection
- starfive-visionfive2
- Distro
- Allow any machine-distro combinations
- Ubuntu 24.04 (Noble)

> ```
> ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL:
> 'file://distributions.in'. Unpack command
> PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/
> bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-
> apt/files/distributions.in" "." failed with return value 1
> ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-
> riscv64/isar-apt/1.0-r0/temp/log.do_unpack.686
> ERROR: Task (/build/../repo/meta/recipes-devtools/isar-apt/isar-
> apt.bb:do_unpack) failed with exit code '1'
> ERROR: base-apt-1.0-r0 do_unpack: Unpack failure for URL:
> 'file://distributions.in'. Unpack command
> PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/
> bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/base-
> apt/files/distributions.in" "." failed with return value 1
> ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-
> riscv64/base-apt/1.0-r0/temp/log.do_unpack.694
> ERROR: Task (/build/../repo/meta/recipes-devtools/base-apt/base-
> apt.bb:do_unpack) failed with exit code '1'
> ERROR: isar-mmdebstrap-host-1.0-r0 do_unpack: Unpack failure for URL:
> 'file://locale'. Unpack command
> PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin
> :/bin" cp -fpPRH "/build/../repo/meta/recipes-core/isar-
> bootstrap/files/locale" "." failed with return value 1
> ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-
> riscv64/isar-mmdebstrap-host/1.0-r0/temp/log.do_unpack.746
> ERROR: Task (/build/../repo/meta/recipes-core/isar-mmdebstrap/isar-
--
Best regards,
Uladzimir.

Sun, Yi

unread,
Apr 13, 2025, 5:58:42 AMApr 13
to Uladzimir Bely, isar-...@googlegroups.com
I see — that matches my previous understanding exactly.
My question is: since we're already using kas-container (a Debian-based OS)
why don’t we just compile all packages directly within it, instead of
chrooting into a separate host rootfs? It seems like things could be
simplified if there were a toggle option to do that.

I'm asking because, while trying to figure out why the Ubuntu Noble target
couldn't be built, I noticed that ubuntu-common.inc might be mixing up
DISTRO_ARCH and HOST_ARCH somewhere (if I’m understanding it correctly).

>---
>
>I've updated a bit the patch I sent and managed to completely build
>ubuntu-noble for starfive-visionfive2 machine.
>
>I pushed my changes to the branch "ubely/devel" so you can give it a
>try without any additional patches.
>
>./kas/kas-container menu:
> - Machine selection
> - starfive-visionfive2
> - Distro
> - Allow any machine-distro combinations
> - Ubuntu 24.04 (Noble)
>

The devel branch doesn't make things better:

```
➜ isar git:(ubely/devel) ✗ KAS_ALLOW_ROOT=yes ./kas/kas-container build
2025-04-13 08:45:36 - INFO - kas 4.7 started
2025-04-13 08:45:36 - INFO - Using /repo as root for repository isar
2025-04-13 08:45:36 - INFO - /build$ /repo/bitbake/bin/bitbake -c build isar-image-base
Loading cache: 100% |
| ETA: --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################
#| Time: 0:00:00
Parsing of 70 .bb files complete (0 cached, 70 parsed). 105 targets, 14 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Sstate summary: Wanted 13 Local 0 Mirrors 0 Missed 13 Current 0 (0% match, 0% complete)#############
| ETA: 0:00:00
Initialising tasks: 100% |##################################################################################
#| Time: 0:00:00
NOTE: Executing Tasks
ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/r
epo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools
/isar-apt/files/distributions.in" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/isar-apt/1.0-r0/temp/log.do_unpack
.757
ERROR: Task (/build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack) failed with exit code '1'
ERROR: base-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/r
epo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools
/base-apt/files/distributions.in" "." failed with return value 1
ERROR: Logfile of failure stored in: /build/tmp/work/ubuntu-noble-riscv64/base-apt/1.0-r0/temp/log.do_unpack
.778
(......)
Summary: 3 tasks failed:
/build/../repo/meta/recipes-devtools/isar-apt/isar-apt.bb:do_unpack
/build/../repo/meta/recipes-devtools/base-apt/base-apt.bb:do_unpack
/build/../repo/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb:do_unpack
Summary: There were 3 ERROR messages, returning a non-zero exit code.
2025-04-13 08:45:53 - ERROR - Command "/repo/bitbake/bin/bitbake -c build isar-image-base" failed with er
ror 1
```


And the log log.do_unpack.778 and log.do_unpack.757 show the similar error:

```
DEBUG: Using /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in for distributions.in
NOTE: Unpacking /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in to /build/tmp/wor
k/ubuntu-noble-riscv64/isar-apt/1.0-r0/
cp: failed to preserve ownership for './distributions.in': Invalid argument
ERROR: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bit
bake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files
/distributions.in" "." failed with return value 1
DEBUG: Python function do_unpack finished
```

Is it issue of kas-contaner ? Which version of kas-contain are you
using?
I'm going to digging it out later this evening or next Monday.

Thanks
--Sun, Yi

Uladzimir Bely

unread,
Apr 13, 2025, 10:42:04 AMApr 13
to Sun, Yi, isar-...@googlegroups.com
Big sorry for misleading you... I wanted to write "ubely/riscv64"
branch I've created for you...

Please, try it instead.

> ```
> ➜  isar git:(ubely/devel) ✗ KAS_ALLOW_ROOT=yes ./kas/kas-container
>    /build/../repo/meta/recipes-devtools/isar-apt/isar-
> apt.bb:do_unpack
>    /build/../repo/meta/recipes-devtools/base-apt/base-
> apt.bb:do_unpack
>    /build/../repo/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-
--
Best regards,
Uladzimir.


Sun, Yi

unread,
Apr 14, 2025, 7:48:21 AMApr 14
to Uladzimir Bely, isar-...@googlegroups.com
Hi Uladzimir,

I gave it a try, but no luck.
What I want to point out is that the error I encountered is likely not
RISC-V specific. Due to limited time, I did a quick debug and found
that the error is coming from bitbake:

```
(root)# bitbake -c build isar-image-base

ERROR: isar-apt-1.0-r0 do_unpack: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "." failed with return value 1
```

LOG FILE:
```
DEBUG: Using /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in for distributions.in
NOTE: Unpacking /build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in to /build/tmp/work/ubuntu-noble-riscv64/isar-apt/1.0-r0/
cp: failed to preserve ownership for './distributions.in': Invalid argument
ERROR: Unpack failure for URL: 'file://distributions.in'. Unpack command PATH="/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "." failed with return value 1
DEBUG: Python function do_unpack finished
```

Log file shows that all failures are the same that caused by 'copy':
cp: failed to preserve ownership for './distributions.in': Invalid argument

@Uladzimir, if you have a moment, could you help me understand what might
be going wrong here?

I'm using the Docker image kas-isar:4.7, and I can consistently
reproduce the issue by running ./kas/kas-container build.

Here is my docker parameters:
```
docker run -v /home/riscv/isar:/repo:rw -v /home/riscv/isar:/work:rw -e KAS_WORK_DIR=/work -v /home/riscv/isar/build/rv64_sw-machine:/build:rw --workdir=/repo -e KAS_BUILD_DIR=/build -e USER_ID=0 -e GROUP_ID=0 --rm --init -t -i -e TERM=tmux-256color -e SHELL=/bin/bash -e http_proxy=http://xxx:port -e https_proxy=http://xxx:port -e NO_PROXY=localhost,127.0.0.0/8 --privileged --log-driver=none --user=root ghcr.io/siemens/kas/kas-isar:4.7 build
```

I'm pretty sure that my configue matches your demo setup:
StarFive VisionFive2 + Ubuntu 24.04 (Noble).

Thanks
--Sun, Yi

Baurzhan Ismagulov

unread,
Apr 14, 2025, 11:54:00 AMApr 14
to isar-...@googlegroups.com, Uladzimir Bely, Sun, Yi
Hello Sun Yi,

On 2025-04-14 19:48, Sun, Yi wrote:
> cp: failed to preserve ownership for './distributions.in': Invalid argument

Is the underlying storage in any way exotic? Like Windows host, cifs share,
etc.

With kind regards,
Baurzhan

Sun, Yi

unread,
Apr 14, 2025, 8:10:46 PMApr 14
to Baurzhan Ismagulov, isar-...@googlegroups.com, Uladzimir Bely
Hi Baurzhan,

Nope, I'm trying to build it on an Ubuntu 22.04.4 LTS native machine.

Thanks
--Sun, Yi

Sun, Yi

unread,
Apr 14, 2025, 8:34:06 PMApr 14
to Baurzhan Ismagulov, isar-...@googlegroups.com, Uladzimir Bely
BTW, the error will not happen if run that copy command in the docker manually:

# ./kas/kas-container shell
root@fe0d1f3b7b5e:/build# "/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -fpPRH "/build/../repo/meta/recipes-devtools/isar-apt/files/distributions.in" "."

Sun, Yi

unread,
Apr 16, 2025, 11:43:11 AMApr 16
to Uladzimir Bely, isar-...@googlegroups.com
I made some progress — the issue was caused by the -p parameter in the cp command.
The following patch allows the unpack process to proceed.

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 5bf2c4b8..73c34301 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1606,7 +1606,7 @@ class FetchMethod(object):
if urlpath.find("/") != -1:
destdir = urlpath.rsplit("/", 1)[0] + '/'
bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
- cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir)
+ cmd = 'cp -fPRH "%s" "%s"' % (file, destdir)
else:
urldata.unpack_tracer.unpack("archive-extract", unpackdir)

diff --git a/bitbake/lib/bb/fetch2/npmsw.py b/bitbake/lib/bb/fetch2/npmsw.py
index ff5f8dc7..a250a2d2 100644
--- a/bitbake/lib/bb/fetch2/npmsw.py
+++ b/bitbake/lib/bb/fetch2/npmsw.py
@@ -294,7 +294,7 @@ class NpmShrinkWrap(FetchMethod):
npm_unpack(depsrcdir, depdestdir, d)
else:
bb.utils.mkdirhier(depdestdir)
- cmd = 'cp -fpPRH "%s/." .' % (depsrcdir)
+ cmd = 'cp -fPRH "%s/." .' % (depsrcdir)
runfetchcmd(cmd, d, workdir=depdestdir)

def clean(self, ud, d):

Then I got following issuem, which I believe are related to riscv
platform. The log is dumpped by do_rootfs_install.

```
(......)
Broken libstdc++-13-dev:amd64 Breaks on libstdc++-13-dev:riscv64 < none -> 13.3.0-6ubuntu2~24.04 @un puN Ib > (!= 13.2.0-1
6ubuntu1)
Considering libstdc++-13-dev:riscv64 9998 as a solution to libstdc++-13-dev:amd64 0
Conflicts//Breaks against version 13.2.0-23ubuntu4 for libstdc++-13-dev but that is not InstVer, ignoring
Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not installable or
libc-dev
devscripts : Depends: gnupg but it is not installable or
gnupg2 but it is not installable
libc-dev-bin:riscv64 : Depends: libc6:riscv64 (> 2.39) but it is not installable
Depends: libc6:riscv64 (< 2.40) but it is not installable
libc6-dev:riscv64 : Depends: libc6:riscv64 (= 2.39-0ubuntu8.4) but it is not installable
libcrypt-dev:riscv64 : Depends: libcrypt1:riscv64 (= 1:4.4.36-4build1) but it is not installable
libgcc-13-dev : Breaks: libgcc-13-dev:riscv64 (!= 13.2.0-16ubuntu1) but 13.3.0-6ubuntu2~24.04 is to be installed
libgcc-13-dev:riscv64 : Depends: gcc-13-base:riscv64 (= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libgcc-s1:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libgomp1:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libitm1:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libatomic1:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libasan8:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libubsan1:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Breaks: libgcc-13-dev (!= 13.3.0-6ubuntu2~24.04) but 13.2.0-16ubuntu1 is to be installed
libstdc++-13-dev : Depends: libc6-dev (>= 2.13-0ubuntu6) but it is not installable
Breaks: libstdc++-13-dev:riscv64 (!= 13.2.0-16ubuntu1) but 13.3.0-6ubuntu2~24.04 is to be installed
libstdc++-13-dev:riscv64 : Depends: gcc-13-base:riscv64 (= 13.3.0-6ubuntu2~24.04) but it is not installable
Depends: libstdc++6:riscv64 (>= 13.3.0-6ubuntu2~24.04) but it is not installable
Breaks: libstdc++-13-dev (!= 13.3.0-6ubuntu2~24.04) but 13.2.0-16ubuntu1 is to be installed
libtool : Depends: libc6-dev but it is not installable or
libc-dev
E: Unable to correct problems, you have held broken packages.
```

Uladzimir Bely

unread,
Apr 16, 2025, 3:53:30 PMApr 16
to Sun, Yi, Baurzhan Ismagulov, isar-...@googlegroups.com
On Tue, 2025-04-15 at 00:33 +0000, Sun, Yi wrote:
> BTW, the error will not happen if run that copy command in the docker
> manually:
>
> # ./kas/kas-container shell
> root@fe0d1f3b7b5e:/build# 
> "/repo/scripts:/repo/bitbake/bin:/usr/sbin:/usr/bin:/sbin:/bin" cp -
> fpPRH "/build/../repo/meta/recipes-devtools/isar-
> apt/files/distributions.in" "."
>
> Thanks
>    --Sun, Yi
>
> -----Original Message-----
> From: Sun, Yi
> Sent: Tuesday, April 15, 2025 08:10
> To: Baurzhan Ismagulov <i...@radix50.net>; isar-...@googlegroups.com
> Cc: Uladzimir Bely <ub...@ilbers.de>
> Subject: RE: Build Failed for RISC-V Image Using isar/kas-container
>
> Hi Baurzhan,
>
> Nope, I'm trying to build it on an Ubuntu 22.04.4 LTS native machine.
>
> Thanks
>    --Sun, Yi
>

But probably filesystem where project is run is not something like
ext4/btrfs, but, e.g. ntfs?

In another your message you remove "-p" option of `cp` and this somehow
helps. This definitely means that either the filesystem you are using
doesn't support standard linux file permissions or something else (e.g.
ACLs) doesn't allow you to do it.


> -----Original Message-----
> From: Baurzhan Ismagulov <i...@radix50.net>
> Sent: Monday, April 14, 2025 23:54
> To: isar-...@googlegroups.com
> Cc: Uladzimir Bely <ub...@ilbers.de>; Sun, Yi <yi....@intel.com>
> Subject: Re: Build Failed for RISC-V Image Using isar/kas-container
>
> Hello Sun Yi,
>
> On 2025-04-14 19:48, Sun, Yi wrote:
> > cp: failed to preserve ownership for './distributions.in': Invalid
> > argument
>
> Is the underlying storage in any way exotic? Like Windows host, cifs
> share,
> etc.
>
> With kind regards,
> Baurzhan

--
Best regards,
Uladzimir.


Sun, Yi

unread,
Apr 16, 2025, 8:19:54 PMApr 16
to Uladzimir Bely, Baurzhan Ismagulov, isar-...@googlegroups.com
I've checked my partition: one is vFAT (used for EFI), and the other two are ext4:
➜ isar git:(ubely/riscv64) ✗ blkid
/dev/nvme0n1p1: UUID="083cdf27-..." BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="37d996f0-..."
/dev/sda2: UUID="ebd1da1b-2940-..." BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="e3b2e602-..."
/dev/sda1: UUID="5E71-..." BLOCK_SIZE="512" TYPE="vfat" PARTUUID="08e794af-..."

Anyway, it would be good if there was a toggle to switch 'preserve the specified attributes' for cp.

I'd also be grateful if you have some time to take a look at this new issue —
it seems to be broken by some RISC-V package during the do_bootstrap_host step.

```
```

Thanks
--Sun, Yi

Uladzimir Bely

unread,
Apr 17, 2025, 1:58:37 AMApr 17
to Sun, Yi, isar-...@googlegroups.com
> > DEBUG: Using /build/../repo/meta/recipes-devtools/isar-
> > apt/files/distributions.in for distributions.in
> > NOTE: Unpacking /build/../repo/meta/recipes-devtools/isar-
> > apt/files/distributions.in to /build/tmp/work/ubuntu-noble-
> > riscv64/isar-apt/1.0-r0/

Hello.

This looks like a temporary bug, when `ubuntu-ports` repo is temporary
not synchronized with `ubuntu` one. We periodicaly face it and can't do
anything with it.

I also this issue now when crossbuilding riscv64 and arm64 ubuntu-noble
targets. It was not reproduced week ago.

There are two options to get a successfull build:

1. Disable cross-compile option - but it is relatively slow.
2. Use some snapshot that is known to work.

For example, this additional configuration (I used one-week-ago
snapshot) works for me:

```
Mirror selection
- [*] Use the distros snapshot mirror
- (*) Custom date
- (20250410T000000Z) Custom snapshot date
```

I'm attaching kas configuration I can get working build with.

--
Best regards,
Uladzimir.

.config.yaml

Sun, Yi

unread,
Apr 17, 2025, 8:09:05 AMApr 17
to Uladzimir Bely, isar-...@googlegroups.com
Big thanks, Uladzimir!
I can successfully build my first RISC-V image — really appreciate your help!

I have several follow-up questions:
1. I'm currently using the riscv branch. Do you have any plans to merge it into the mainline?
For my use case, it would be ideal to have a stable release version I can base our project on.

2. Regarding the distro snapshot, do you know if there’s a stable version available?
My goal is to ensure the project remains stable and maintainable in the long term.

3. Regarding the change I made to remove -p parameter in the cp command — what are your thoughts?
Should I just maintain the patch locally, or would it make sense to adjust it in a way that's more broadly applicable for others as well?

Thanks
--Sun, Yi

Uladzimir Bely

unread,
Apr 17, 2025, 11:04:50 AMApr 17
to Sun, Yi, isar-...@googlegroups.com

Yes, we have plans to add architectures supported by ubuntu-ports after
isar-0.11 release.

>
> 2. Regarding the distro snapshot, do you know if there’s a stable
> version available?
> My goal is to ensure the project remains stable and maintainable in
> the long term.

It was buildable for me week ago and has become unbuildable, that's why
I tried this snapshot - and it was OK. Ubuntu keeps snapshots for about
2 years.

In you want follow upstream, there is always chanse that ubuntu and
ubuntu ports are not in sync. You might want to use Debian instead -
they moved riscv64 from sid-ports to sid not so much time ago. Since
trixie it should be rathe stable, I guess.

>
> 3. Regarding the change I made to remove -p parameter in the cp
> command — what are your thoughts?
> Should I just maintain the patch locally, or would it make sense to
> adjust it in a way that's more broadly applicable for others as well?
>

You should maintain it locally, since we don't want to make a local
fork of bitbake we completely borrow (and periodically sync to new
version) from OE/Yocto as is.

I still think there is something wrong in your filesystem/permissions,
if such a trivial thing as "cp -p" doesn't work.

Sun, Yi

unread,
Apr 22, 2025, 9:15:14 AMApr 22
to Uladzimir Bely, isar-...@googlegroups.com
On 17.04.2025 08:58, Uladzimir Bely wrote:
>
>Hello.
>
>This looks like a temporary bug, when `ubuntu-ports` repo is temporary
>not synchronized with `ubuntu` one. We periodicaly face it and can't do
>anything with it.
>
>I also this issue now when crossbuilding riscv64 and arm64 ubuntu-noble
>targets. It was not reproduced week ago.
>
>There are two options to get a successfull build:
>
>1. Disable cross-compile option - but it is relatively slow.
>2. Use some snapshot that is known to work.
>
>For example, this additional configuration (I used one-week-ago
>snapshot) works for me:
>
>```
>Mirror selection
>- [*] Use the distros snapshot mirror
> - (*) Custom date
> - (20250410T000000Z) Custom snapshot date
>```
>
>I'm attaching kas configuration I can get working build with.

Hi Uladzimir,

I'm adding some actual .bb files for my project and have a few questions.

1, It seems the installation of the linux-libc-dev package is failing in the host rootfs.
Have you happened to run into this issue before?

```
| Broken libc6-dev:amd64 Depends on linux-libc-dev:amd64 < none @un pH >
| Considering linux-libc-dev:amd64 1 as a solution to libc6-dev:amd64 24
| Considering linux-libc-dev:amd64 1 as a solution to libc6-dev:amd64 24
| Done
| Some packages could not be installed. This may mean that you have
| requested an impossible situation or if you are using the unstable
| distribution that some required packages have not yet been created
| or been moved out of Incoming.
| The following information may help to resolve the situation:
|
| The following packages have unmet dependencies:
| libc6-dev : Depends: linux-libc-dev but it is not installable
| E: Unable to correct problems, you have held broken packages.
| WARNING: exit code 100 from a shell command.
| DEBUG: Executing shell function rootfs_do_umounts
| DEBUG: Shell function rootfs_do_umounts finished
| DEBUG: Python function do_rootfs_install finished
ERROR: Task (/build/../repo/meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-host-db2m.bb:do_rootfs_install) failed with exit code '1' ```

2, So I tried disabling cross-build working aroud above issue. As you mentioned, the performance is quite poor.
Would you mind explaining a bit more about why that happens? And is there anything I can do to improve it?

3, Do you have an estimated timeline for the v0.10 release?

Thanks
--Sun, Yi

Uladzimir Bely

unread,
Apr 22, 2025, 9:56:55 AMApr 22
to Sun, Yi, isar-...@googlegroups.com

Yes, it happend at least previous week (not only for riscv64, but also
for e.g. arm64) and using snapshot was a working solution.

You can see this issue in e.g. CrossTest.test_cross in our Gitlab CI
https://gitlab.isar-build.org/ilbers/isar/-/jobs/2159

Today it seems to be fixed by ubuntu upstream just works with main
ubuntu/ubuntu-ports repos.

> 2, So I tried disabling cross-build working aroud above issue. As you
> mentioned, the performance is quite poor.
> Would you mind explaining a bit more about why that happens? And is
> there anything I can do to improve it?

Sometimes such problems can happen in upstream (ubuntu and debian)
repos. We can't do anything with it except to using snapshots known to
be working/stable.

>
> 3, Do you have an estimated timeline for the v0.10 release?
>
> Thanks
>     --Sun, Yi

0.11 is going to be released soon, maybe even by the end of this week
or. After that riscv64/noble patches will be sent to the maillist and
merged soon. For now, you can recheck my 'ubely/riscv64' branch I tend
to keep updated and thus force-pushed sometimes.

--
Best regards,
Uladzimir.


Sun, Yi

unread,
Apr 22, 2025, 11:34:33 AMApr 22
to Uladzimir Bely, isar-...@googlegroups.com
You saved me again! I was using the snapshot you mentioned last time: "20250410T000000Z".

Anyway, I just rebuilt the project without the snapshot, and everything is working perfectly now!

By the way, is there a way to get a full list of available snapshots? I checked https://snapshot.ubuntu.com/, but couldn't find a clear way to list all the snapshot timestamps.

>
>> 2, So I tried disabling cross-build working aroud above issue. As you
>> mentioned, the performance is quite poor.
>> Would you mind explaining a bit more about why that happens? And is
>> there anything I can do to improve it?
>
>Sometimes such problems can happen in upstream (ubuntu and debian)
>repos. We can't do anything with it except to using snapshots known to
>be working/stable.
>
>>
>> 3, Do you have an estimated timeline for the v0.10 release?
>>
>> Thanks
>>     --Sun, Yi
>
>0.11 is going to be released soon, maybe even by the end of this week
>or. After that riscv64/noble patches will be sent to the maillist and
>merged soon. For now, you can recheck my 'ubely/riscv64' branch I tend
>to keep updated and thus force-pushed sometimes.
>

Get it. Please keep me updated with the riscv64/noble stuffs.

Sun, Yi

unread,
Apr 27, 2025, 5:14:28 AMApr 27
to Uladzimir Bely, isar-...@googlegroups.com
Hi @Uladzimir

Could you please guide me a bit on how to get a snapshot timestamp?
For example, if I want to use the snapshot on 2025/04/22 where I had
a successful pass, how can I find the exact timestamp for it?

Thanks
--Sun, Yi

Sun, Yi

unread,
Apr 27, 2025, 7:32:26 AMApr 27
to Uladzimir Bely, isar-...@googlegroups.com
And do you know how to setup a local copy of the snapshots server?

Thanks
--Sun, Yi

Baurzhan Ismagulov

unread,
Apr 28, 2025, 3:24:14 AMApr 28
to Isar users, Sun, Yi
Hello Sun Yi,

On 2025-04-27 19:32, Sun, Yi wrote:
> Could you please guide me a bit on how to get a snapshot timestamp?
> For example, if I want to use the snapshot on 2025/04/22 where I had
> a successful pass, how can I find the exact timestamp for it?

https://snapshot.ubuntu.com/ says any timestamp should be supported.


> And do you know how to setup a local copy of the snapshots server?

We haven't done snapshots specifically, but we've used debmirror for partial
mirroring. That might be used for one's own directory-based mirroring
infrastructure similar to https://snapshot.debian.org/archive/debian/.


With kind regards,
Baurzhan

Sun, Yi

unread,
Apr 30, 2025, 1:10:23 AMApr 30
to Isar users
On 28.04.2025 09:24, Baurzhan Ismagulov wrote:
>Hello Sun Yi,
>
>On 2025-04-27 19:32, Sun, Yi wrote:
>> Could you please guide me a bit on how to get a snapshot timestamp?
>> For example, if I want to use the snapshot on 2025/04/22 where I had
>> a successful pass, how can I find the exact timestamp for it?
>
>https://snapshot.ubuntu.com/ says any timestamp should be supported.

Hi Baurzhan,

I get it, cool ~~~
>
>
>> And do you know how to setup a local copy of the snapshots server?
>
>We haven't done snapshots specifically, but we've used debmirror for partial
>mirroring. That might be used for one's own directory-based mirroring
>infrastructure similar to https://snapshot.debian.org/archive/debian/.
>

OK, I see. I'm going to look into if there is a similar tool for Ubuntu.

Appciate it your helpful input!

Thanks
--Sun, Yi
Reply all
Reply to author
Forward
0 new messages