bmanojlovic / rpi-cross-compile

Raspbian cross compile chroot creator
10 stars 7 forks source link

script fail on Opensuse 13.1 #2

Closed ghost closed 10 years ago

ghost commented 10 years ago

latest pull fixes the fails/aborts. stiff have a symlink issue,

cd opensuse-rpi-cross-compile
git log | head
    commit 75451876386048ce499e25b6807f6e2300d4e2b7
    Author: Boris Manojlovic <boris.manojlovic@zis.co.rs>
    Date:   Tue Apr 8 15:14:46 2014 +0200

        real support for debian wheezy

    commit 5d7d1727a04369e67ada92da680c461de223d9db
    Author: Boris Manojlovic <boris.manojlovic@zis.co.rs>
    Date:   Wed Nov 6 11:35:48 2013 +0100

rm -rf /opt/db_raspbian/*
./debootstrap_raspbian_chroot
    ...
    + DNAME=/opt/db_raspbian//lib64
    + mkdir -p /opt/db_raspbian//lib64
    + cp /lib64/ld-linux-x86-64.so.2 /opt/db_raspbian//lib64
    + sed -i s,/lib,/lab,g /opt/db_raspbian/lib64/ld-linux-x86-64.so.2
    + cd /opt/db_raspbian/lib64
    + ln -s /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2
    ln: failed to create symbolic link 'ld-linux-x86-64.so.2': File exists
    + cat

find /opt/db_raspbian -type f -name "*ld-linux*"
    /opt/db_raspbian/lab64/ld-linux-x86-64.so.2
    /opt/db_raspbian/lab/ld-linux.so.2
    /opt/db_raspbian/lib/ld-linux.so.2
    /opt/db_raspbian/lib64/ld-linux-x86-64.so.2

chroot is now funtional,

chroot /opt/db_raspbian/
uname -a
    Linux desk6 3.14.0-2.gfa168d7-desktop #1 SMP PREEMPT Tue Apr 1 12:54:08 UTC 2014 (fa168d7) armv6l GNU/Linux
apt-get update
    Hit http://mirrordirector.raspbian.org wheezy Release.gpg
    Hit http://mirrordirector.raspbian.org wheezy Release
    Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
    Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
    Reading package lists... Done
bmanojlovic commented 10 years ago

Short explanation: it is not a bug it is a feature :) Longer explanation: Debian has moved to so called multiarch system that now only have ld-linux-x86_64.so.2 in /lib64 and all other libs in /lib/x86_64-linux-gnu/ as by default my script cannot see that link (ldconfig -p does not see it there) so i just try creating link and on debian it will point to correct location. On openSUSE it will "fail" which is expected as there is already library in place. So maybe I should add "echo this will fail on non debian" (comment is in script stating that already)

ghost commented 10 years ago

noted. I see the "will fail" comment in the script. thanks.

once IN the chroot, if I exec

ldconfig

it returns

ldconfig: /lib/ld-linux.so.2 is for unknown machine 3.

checking

ls -al /lib/ld-linux.so*
    -rwxr-xr-x+ 1 root root 152418 Apr  8 10:52 /lib/ld-linux.so.2

file /lib/ld-linux.so.2
    /lib/ld-linux.so.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xfa97022309e1748552b2d492f78c1439bbfdc9f5, not stripped

it does NOT seem to interfere with ldconfig execution and its cache creation

rm -f /etc/ld.so.cache 
ldconfig
    ldconfig: /lib/ld-linux.so.2 is for unknown machine 3.
ls -al /etc/ld.so.cache
    -rw-r--r--+ 1 root root 14659 Apr  8 16:18 /etc/ld.so.cache

this

https://bugs.launchpad.net/linaro-aarch64/+bug/1074313

may be relevant ...

bmanojlovic commented 10 years ago

i'm closing issue as i hope you agree there is no any issue (maybe only cosmetic) :)