Dear all,

I have an issue with the default opkg version provided by openwrt Chaos Calmer r49404, when I try to update a package on the target, it doesn't download and install its dependencies.
So I tried to install a customized version, but I got an issue while building my rootfs image. The build of the opkg package seems to be good, logs below

install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/usr/lib/opkg
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/bin
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/usr/bin
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/sbin
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg/certs
cp -fpR ./files/opkg.conf /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg/opkg.conf
cp -fpR ./files/arch.conf /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg/arch.conf
cp -fpR ./files/trusted.gpg /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg/trusted.gpg
cp -fpR ./files/root.ca /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/etc/opkg/certs/root.ca
install -m0755 ./files/opkg-un.sh /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/sbin/opkg-un.sh
install -m0755 ./files/opkg-urlkey.sh /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/sbin/opkg-urlkey.sh
install -m0755 ./files/opkg-pwd.sh /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/sbin/opkg-pwd.sh
install -m0755 /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/bin/opkg-cl /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/bin/opkg
install -m0755 /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/bin/opkg-key /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/usr/bin/
install -m0755 /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/bin/update-alternatives /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/usr/bin/
SHELL= /home/sferjani/SmartKey/openwrt.git/staging_dir/host/bin/flock /home/sferjani/SmartKey/openwrt.git/tmp/.root-copy.flock -c 'cp -fpR /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg/. /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/'
rm -rf /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp-opkg
touch /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/stamp/.opkg_installed
if [ -f /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/pkginfo/opkg.unsigned.install.clean ]; then rm -f /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/pkginfo/opkg.unsigned.install /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/pkginfo/opkg.unsigned.install.clean; fi; echo "opkg" >> /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/pkginfo/opkg.unsigned.install
rm -rf /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg
mkdir -p /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/host /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/packages /home/sferjani/SmartKey/openwrt.git/staging_dir/host/packages
mkdir -p /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/include
cp -fpR /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/include/libopkg /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/include/
install -d -m0755  /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/lib
cp -fpR /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/lib/lib*.so* /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/lib
cp -fpR /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/lib/lib*.{a,la} /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/lib
install -d -m0755 /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/lib/pkgconfig
cp -fpR /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/opkg-unsigned/opkg-0.1.8/ipkg-install/usr/lib/pkgconfig/* /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/usr/lib/pkgconfig
find /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg -name '*.la' | xargs -r rm -f;       find /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg -name '*.la' | xargs -r rm -f; 
if [ -f /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/packages/opkg.unsigned.list ]; then /home/sferjani/SmartKey/openwrt.git/scripts/clean-package.sh "/home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/packages/opkg.unsigned.list" "/home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21"; fi
if [ -d /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg ]; then (cd /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg; find ./ > /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg.files);     SHELL= /home/sferjani/SmartKey/openwrt.git/staging_dir/host/bin/flock /home/sferjani/SmartKey/openwrt.git/tmp/.staging-dir.flock -c ' mv /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg.files /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/packages/opkg.unsigned.list && cp -fpR /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg/* /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/; '; fi
rm -rf /home/sferjani/SmartKey/openwrt.git/tmp/stage-opkg
touch /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/stamp/.opkg.unsigned_installed
make[3]: Leaving directory `/home/sferjani/SmartKey/openwrt.git/package/system/opkg'

but later I got this error :

 
make[2]: Entering directory `/home/sferjani/SmartKey/openwrt.git'
find /home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips -type d | xargs -r chmod 0755
rm -rf /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips
[ -d /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp ] || mkdir -p /home/sferjani/SmartKey/openwrt.git/build_dir/target-mipsel_24kec+dsp_glibc-2.21/root-ramips/tmp
/home/sferjani/SmartKey/openwrt.git/staging_dir/host/bin/.libs/lt-opkg-cl: error while loading shared libraries: libopkg.so.0: cannot open shared object file: No such file or directory
make[2]: *** [package/install] Error 127
make[2]: Leaving directory `/home/sferjani/SmartKey/openwrt.git'
make[1]: *** [/home/sferjani/SmartKey/openwrt.git/staging_dir/target-mipsel_24kec+dsp_glibc-2.21/stamp/.package_install] Error 2
make[1]: Leaving directory `/home/sferjani/SmartKey/openwrt.git'
make: *** [world] Error 2

Can somebody  give me some hint to fix this issue ?