I've done the followings to try to build glibc: - Installed Debian sid in a qemu-system-loongarch64 VM on a x86-64 machine - Created a sid chroot environment with debootstrap and schroot - Installed rpm and osc, copied the rpm macros - Installed the Debian build dependencies for glibc with apt - Created folders for rpmbuild - osc co Base:System glibc - cp -av Base\:System/glibc/* ~/rpmbuild/SOURCES/ When I cd ~/rpmbuild/SOURCES/ && rpmbuild --nocheck -bb glibc.spec, got the following errors: warning: line 501: Possible unexpanded macro in: %package -n cross-%{cross_cpu}-glibc-devel error: Failed build dependencies: audit-devel is needed by glibc-2.40-0.loongarch64 bison is needed by glibc-2.40-0.loongarch64 fdupes is needed by glibc-2.40-0.loongarch64 gcc13 is needed by glibc-2.40-0.loongarch64 libcap-devel is needed by glibc-2.40-0.loongarch64 libselinux-devel is needed by glibc-2.40-0.loongarch64 makeinfo is needed by glibc-2.40-0.loongarch64 python3-base is needed by glibc-2.40-0.loongarch64 systemd-rpm-macros is needed by glibc-2.40-0.loongarch64 systemtap-headers is needed by glibc-2.40-0.loongarch64 sysuser-tools is needed by glibc-2.40-0.loongarch64 xz is needed by glibc-2.40-0.loongarch64 RPM build warnings: line 501: Possible unexpanded macro in: %package -n cross-%{cross_cpu}-glibc-devel I think I need to deal with the dependencies error first. I can think of two ways to do this: - Comment out the BuildRequires in the spec file, or - Create fake packages to satisfy the dependencies The second way is more elegant, but I need to know how to build packages. All of these are new to me and there are quite a lot of things to learn. And the VM is very slow compared to the bare metal system.