Results 1 to 6 of 6

Thread: Cross Architecture Build

  1. #1

    Default Cross Architecture Build

    Hey guys, can anybody help me with cross build.
    I'm trying to build my project for
    openSUSE:Factory:ARM:standard repository in chroot.
    But every time i got an error.

    # osc build openSUSE_Factory_ARM armv7l qbs.spec --clean

    Building qbs.spec for openSUSE_Factory_ARM/armv7l
    Getting buildinfo from server and store to /mnt/storage/documents/qbs/qbs/.osc/_buildinfo-openSUSE_Factory_ARM-armv7l.xml
    Getting buildconfig from server and store to /mnt/storage/documents/qbs/qbs/.osc/_buildconfig-openSUSE_Factory_ARM-armv7l
    Updating cache of required packages
    0.0% cache miss. 312/312 dependencies cached.


    Verifying integrity of cached packages
    using keys from openSUSE.orgpenSUSE:Factory
    Writing build configuration
    Running build
    VM_IMAGE: , VM_SWAP:
    logging output to /home/build/openSUSE_Factory_ARM-armv7l/.build.log...
    [ 0s] Memory limit set to 10973788KB
    [ 0s] Using BUILD_ROOT=/home/build/openSUSE_Factory_ARM-armv7l
    [ 0s] Using BUILD_ARCH=armv7l:armv6l:armv5tel
    [ 0s]
    [ 0s]
    [ 0s] bruteforce started "build qbs.spec" at Mon Feb 24 23:35:55 UTC 2014.
    [ 0s]
    [ 0s]
    [ 0s] processing specfile /mnt/storage/documents/qbs/qbs/qbs.spec ...
    [ 0s] running changelog2spec --target rpm --file /mnt/storage/documents/qbs/qbs/qbs.spec
    [ 0s] init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --clean --rpmlist /tmp/rpmlist.2mfgLJ /mnt/storage/documents/qbs/qbs/qbs.spec ...
    [ 8s] registering binfmt handlers for VM
    [ 9s] /srv/obs/run/worker/2/build/qemu-reg: line 7: interpreter '/usr/bin/qemu-aarch64-binfmt' not found, ignoring
    [ 9s] /srv/obs/run/worker/2/build/qemu-reg: line 8: interpreter '/usr/bin/qemu-arm64-binfmt' not found, ignoring
    [ 11s] [1/30] preinstalling filesystem...
    [ 13s] [2/30] preinstalling glibc...
    [ 13s] [3/30] preinstalling libgcc_s1...
    [ 13s] [4/30] preinstalling fillup...
    [ 13s] [5/30] preinstalling libattr1...
    [ 14s] [6/30] preinstalling libbz2-1...
    [ 14s] [7/30] preinstalling libcap2...
    [ 14s] [8/30] preinstalling libelf1...
    [ 14s] [9/30] preinstalling liblua5_1...
    [ 14s] [10/30] preinstalling liblzma5...
    [ 14s] [11/30] preinstalling libncurses5...
    [ 14s] [12/30] preinstalling libpcre1...
    [ 15s] [13/30] preinstalling libpopt0...
    [ 15s] [14/30] preinstalling libz1...
    [ 15s] [15/30] preinstalling attr...
    [ 15s] [16/30] preinstalling libacl1...
    [ 15s] [17/30] preinstalling libreadline6...
    [ 15s] [18/30] preinstalling libselinux1...
    [ 15s] [19/30] preinstalling bash...
    [ 15s] [20/30] preinstalling qemu-linux-user...
    [ 17s] [21/30] preinstalling diffutils...
    [ 17s] [22/30] preinstalling m4...
    [ 17s] [23/30] preinstalling sed...
    [ 17s] [24/30] preinstalling tar...
    [ 17s] [25/30] preinstalling grep...
    [ 18s] [26/30] preinstalling coreutils...
    [ 19s] [27/30] preinstalling permissions...
    [ 19s] [28/30] preinstalling aaa_base...
    [ 19s] [29/30] preinstalling rpm...
    [ 20s] [30/30] preinstalling pam...
    [ 20s]
    [ 20s] running aaa_base preinstall script
    [ 20s] chroot: failed to run command 'sh': Too many levels of symbolic links
    [ 20s] running aaa_base postinstall script
    [ 20s] chroot: failed to run command 'sh': Too many levels of symbolic links
    [ 20s] initializing rpm db...
    [ 20s] chroot: failed to run command '/usr/bin/rpmdb': Too many levels of symbolic links


    I'm usuing:
    openSuse x86_64 13.1
    osc 0.143.0-122.1
    build 20140220-170.1

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,333
    Blog Entries
    15

    Default Re: Cross Architecture Build

    Hi
    For a start please don't run as root user, you can add yourself via visudo and build as your user and add the su-wrapper in your .oscrc file!

    Code:
    # Wrapper to call build as root (sudo, su -, ...)
    # NOTE: use visudo, <username> ALL = NOPASSWD: /usr/bin/build
    su-wrapper = sudo
    It looks like your missing the qemu-linux-aarch64 package, see the errors at 9secons in your log file.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: Cross Architecture Build

    Quote Originally Posted by malcolmlewis View Post
    Hi
    For a start please don't run as root user, you can add yourself via visudo and build as your user and add the su-wrapper in your .oscrc file!

    Code:
    # Wrapper to call build as root (sudo, su -, ...)
    # NOTE: use visudo, <username> ALL = NOPASSWD: /usr/bin/build
    su-wrapper = sudo
    It looks like your missing the qemu-linux-aarch64 package, see the errors at 9secons in your log file.

    1. I'm running as normal user, and I have "su-wrapper = sudo" settings in .oscrc
    2. I'm trying to build
    armv7l arch, so there is no need in binfmt handlers for aarch64. Anyway I have tried that one.
    3. I can reproduce this error in public
    build.opensuse.org. x86 and x86_64 arch works fine. But armv7l fails with kernel panic inside kvm and restart build process (It is building for about 2 days and I can't stop that). https://build.opensuse.org/package/s...aitsme:qbs/qbs

    Here is a log:
    [ 0s] Using BUILD_ROOT=/var/cache/obs/worker/root_11/.mount
    [ 0s] Using BUILD_ARCH=armv7l:armv6l:armv5tel
    [ 0s] Doing kvm build in /var/cache/obs/worker/root_11/root
    [ 0s]
    [ 0s]
    [ 0s] build21 started "build qbs.spec" at Tue Feb 25 09:23:09 UTC 2014.
    [ 0s]
    [ 0s] Building qbs for project 'home:zaitsme:qbs' repository 'openSUSE_Factory_ARM' arch 'armv7l' srcmd5 '649bf6b9324239d98526d77ece288928'
    [ 0s]
    [ 0s] processing specfile /var/cache/obs/worker/root_11/.build-srcdir/qbs.spec ...
    [ 0s] running changelog2spec --target rpm --file /var/cache/obs/worker/root_11/.build-srcdir/qbs.spec
    [ 0s] init_buildsystem --configdir /var/run/obs/worker/11/build/configs --cachedir /var/cache/build --prepare --clean --rpmlist /var/cache/obs/worker/root_11/.build.rpmlist /var/cache/obs/worker/root_11/.build-srcdir/qbs.spec build rpmlint-Factory ...
    [ 4s] [1/30] preinstalling filesystem...
    [ 7s] [2/30] preinstalling glibc...
    [ 7s] [3/30] preinstalling libgcc_s1...
    [ 7s] [4/30] preinstalling fillup...
    [ 7s] [5/30] preinstalling libattr1...
    [ 7s] [6/30] preinstalling libbz2-1...
    [ 7s] [7/30] preinstalling libcap2...
    [ 7s] [8/30] preinstalling libelf1...
    [ 7s] [9/30] preinstalling liblua5_1...
    [ 7s] [10/30] preinstalling liblzma5...
    [ 7s] [11/30] preinstalling libncurses5...
    [ 7s] [12/30] preinstalling libpcre1...
    [ 7s] [13/30] preinstalling libpopt0...
    [ 7s] [14/30] preinstalling libz1...
    [ 7s] [15/30] preinstalling attr...
    [ 7s] [16/30] preinstalling libacl1...
    [ 7s] [17/30] preinstalling libreadline6...
    [ 7s] [18/30] preinstalling libselinux1...
    [ 7s] [19/30] preinstalling bash...
    [ 7s] [20/30] preinstalling qemu-linux-user...
    [ 8s] [21/30] preinstalling diffutils...
    [ 10s] [22/30] preinstalling m4...
    [ 10s] [23/30] preinstalling sed...
    [ 11s] [24/30] preinstalling tar...
    [ 11s] [25/30] preinstalling grep...
    [ 11s] [26/30] preinstalling coreutils...
    [ 12s] [27/30] preinstalling permissions...
    [ 17s] [28/30] preinstalling aaa_base...
    [ 17s] [29/30] preinstalling rpm...
    [ 17s] [30/30] preinstalling pam...
    [ 17s]
    [ 17s] [1/8] preinstalling libdb-4_8...
    [ 18s] [2/8] preinstalling libsepol1...
    [ 19s] [3/8] preinstalling libuuid1...
    [ 19s] [4/8] preinstalling net-tools...
    [ 20s] [5/8] preinstalling perl-base...
    [ 20s] [6/8] preinstalling libblkid1...
    [ 20s] [7/8] preinstalling libmount1...
    [ 21s] [8/8] preinstalling util-linux...
    [ 22s] copying packages...
    [ 107s] reordering...cycle: libcrack2 -> cracklib
    [ 115s] breaking dependency libcrack2 -> cracklib
    [ 115s] cycle: gio-branding-upstream -> libgio-2_0-0
    [ 115s] breaking dependency libgio-2_0-0 -> gio-branding-upstream
    [ 115s] cycle: xorg-cf-files -> imake
    [ 115s] breaking dependency xorg-cf-files -> imake
    [ 115s] cycle: libudev-mini1 -> udev-mini
    [ 115s] breaking dependency udev-mini -> libudev-mini1
    [ 115s] done
    [ 118s] booting kvm ...
    [ 118s] /usr/bin/qemu-kvm -no-reboot -nographic -vga none -net none -cpu host -kernel /boot/vmlinuz -initrd /boot/initrd -append root=/dev/vda panic=1 quiet no-kvmclock nmi_watchdog=0 rw elevator=noop console=ttyS0 init=/.build/initvm.x86_64 -m 750 -drive file=/var/cache/obs/worker/root_11/root,if=virtio,cache=none -drive file=/var/cache/obs/worker/root_11/root,if=ide,index=0,cache=none -drive file=/var/cache/obs/worker/root_11/swap,if=virtio,cache=none -smp 2
    [ 324s] [ 0.040000] Failed to access perfctr msr (MSR c0010001 is ffffffffffffffff)
    [ 358s] FATAL: Module kqemu not found.
    [ 367s] FATAL: Module ext2 not found.
    [ 367s] FATAL: Module ext3 not found.
    [ 367s] Waiting for device /dev/vda to appear: ok
    [ 367s] fsck from util-linux 2.23.2
    [ 367s] [/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/vda
    [ 367s] /dev/vda: clean, 3495/1281120 files, 134732/5120000 blocks
    [ 367s] fsck succeeded. Mounting root device read-write.
    [ 367s] Mounting root /dev/vda
    [ 367s] mount -o rw,defaults -t ext4 /dev/vda /root
    [ 367s] replacing /etc/mtab with symlink to /proc/self/mounts
    [ 367s] No such file or directory
    [ 367s] interpreter for 'aarch64' is -1
    [ 367s] interpreter for 'aarch64' is -1
    [ 367s] interpreter for 'arm' is -1
    [ 367s] interpreter for 'armeb' is -1
    [ 367s] interpreter for 'ppc' is -1
    [ 367s] interpreter for 'mips' is -1
    [ 367s] interpreter for 'mipsel' is -1
    [ 367s] interpreter for 'sh4' is -1
    [ 367s] interpreter for 'sh4eb' is -1
    [ 367s] execve of /.build/build: Too many levels of symbolic links
    [ 367s] [ 34.425610] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
    [ 367s] [ 34.425610]
    [ 367s] [ 34.427559] CPU: 0 PID: 1 Comm: initvm.x86_64 Not tainted 3.11.6-4-default #1
    [ 367s] [ 34.428066] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    [ 367s] [ 34.428066] ffff88002c925ed8 ffffffff81560e30 ffffffff817dc0a8 ffffffff8155d0ff
    [ 367s] [ 34.428066] 0000000000000010 ffff88002c925ee8 ffff88002c925e88 ffffffff811090e2
    [ 367s] [ 34.428066] 0000000000000100 ffff88002c9223f0 000000000000002e ffffffff81e71900
    [ 367s] [ 34.428066] Call Trace:
    [ 367s] [ 34.428066] [<ffffffff81004868>] dump_trace+0x78/0x2c0
    [ 367s] [ 34.428066] [<ffffffff81004b3f>] show_stack_log_lvl+0x8f/0x170
    [ 367s] [ 34.428066] [<ffffffff81005e0c>] show_stack+0x1c/0x50
    [ 367s] [ 34.428066] [<ffffffff81560e30>] dump_stack+0x41/0x51
    [ 367s] [ 34.428066] [<ffffffff8155d0ff>] panic+0xc3/0x1d2
    [ 367s] [ 34.428066] [<ffffffff81052488>] do_exit+0x938/0xa50
    [ 367s] [ 34.428066] [<ffffffff81052604>] do_group_exit+0x34/0xa0
    [ 367s] [ 34.428066] [<ffffffff8105267b>] SyS_exit_group+0xb/0x10
    [ 367s] [ 34.428066] [<ffffffff8156eeed>] system_call_fastpath+0x1a/0x1f
    [ 367s] [ 34.428066] [<000000000041c6f8>] 0x41c6f7
    [ 371s] [ 34.428066] Rebooting in 1 seconds..No buildstatus set, either the base system is broken (glibc/bash/perl)
    [ 371s] or the build host has a kernel or hardware problem...

  4. #4

    Default Re: Cross Architecture Build

    openSUSE:Factory:ARM/standard repo is for building native on armv7l hardware. You need to build against openSUSE:Factory:ARM/qemu repo instead to be able to build arm on x86_64.

  5. #5

    Default Re: Cross Architecture Build

    Quote Originally Posted by adrianSuSE View Post
    openSUSE:Factory:ARM/standard repo is for building native on armv7l hardware. You need to build against openSUSE:Factory:ARM/qemu repo instead to be able to build arm on x86_64.
    Thank you! Everything works fine know.

  6. #6

    Default Re: Cross Architecture Build

    Houston, we have another problem...

    It's works in build.opensuse.org, but doesn't work in private installation.
    When I tried to build for openSUSE:Factory:ARM/standard, I got a problem, which I described above.
    But when I changed the repo name to "qemu", the task remains in scheduled state forever.

    My project meta:
    Code:
    <project name="qbs">
      <title>qbs</title>
      <description>qbs test</description>
      <person userid="Admin" role="maintainer"/>
      <repository name="openSUSE_Factory_ARM">
        <path project="openSUSE.org:openSUSE:Factory:ARM" repository="qemu"/>
        <arch>armv7l</arch>
      </repository>
    </project>
    My project config:
    Code:
    %ifarch armv7l armv7hl
    Hostarch: x86_64
    Preinstall: qemu-linux-user
    ExportFilter: ^qemu-linux-user.*\.x86_64\.rpm$ . armv7l armv5el
    %endif
    Any suggestions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •