OpenWrt Forum Archive

Topic: SOLVED: Update leads to: make[2]: *** [package_index] Error 126

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I maintain an old version of firmware for a router I use and accidentally updated the OS which is Debian Linux 7.
Since then, I can no longer build the firmware and after searching and trying things for two days, it's time to ask for leads here.

Based on what I've read, it could be related to libc* but I've tried downgrading and other things I've found and nothing works. Can someone please help me figure this out.

# make image profile=GL-MT300N
make[1]: Entering directory `/clients/cc-15.05-ramips-gl-net-mt300n'
echo 'Building images for ramips - Default Profile'
Building images for ramips - Default Profile
echo 'Packages: base-files busybox dnsmasq dropbear firewall fstools ip6tables iptables kernel kmod-gpio-button-hotplug kmod-leds-gpio kmod-ledtrig-usbdev kmod-nf-nathelper kmod-rt2800-pci kmod-rt2800-soc kmod-usb-core kmod-usb-ohci kmod-usb2 libc libgcc mtd netifd odhcp6c odhcpd opkg ppp ppp-mod-pppoe swconfig uci wpad-mini'
Packages: base-files busybox dnsmasq dropbear firewall fstools ip6tables iptables kernel kmod-gpio-button-hotplug kmod-leds-gpio kmod-ledtrig-usbdev kmod-nf-nathelper kmod-rt2800-pci kmod-rt2800-soc kmod-usb-core kmod-usb-ohci kmod-usb2 libc libgcc mtd netifd odhcp6c odhcpd opkg ppp ppp-mod-pppoe swconfig uci wpad-mini
echo

rm -rf /clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips
mkdir -p /clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips /clients/cc-15.05-ramips-gl-net-mt300n/bin/ramips /clients/cc-15.05-ramips-gl-net-mt300n/tmp /clients/cc-15.05-ramips-gl-net-mt300n/dl
if [ ! -f "/clients/cc-15.05-ramips-gl-net-mt300n/packages/Packages" ] || [ ! -f "/clients/cc-15.05-ramips-gl-net-mt300n/packages/Packages.gz" ] || [ "`find /clients/cc-15.05-ramips-gl-net-mt300n/packages -cnewer /clients/cc-15.05-ramips-gl-net-mt300n/packages/Packages.gz`" ]; then \
                echo "Package list missing or not up-to-date, generating it.";\
                make package_index; \
        else \
                mkdir -p /clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips/tmp; \
                IPKG_NO_SCRIPT=1 IPKG_TMP="/clients/cc-15.05-ramips-gl-net-mt300n/tmp/ipkgtmp" IPKG_INSTROOT="/clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips" IPKG_CONF_DIR="/clients/cc-15.05-ramips-gl-net-mt300n/tmp" IPKG_OFFLINE_ROOT="/clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips" /clients/cc-15.05-ramips-gl-net-mt300n/staging_dir/host/bin/opkg -f /clients/cc-15.05-ramips-gl-net-mt300n/repositories.conf --force-depends --force-overwrite --force-postinstall --cache /clients/cc-15.05-ramips-gl-net-mt300n/dl --offline-root /clients/cc-15.05-ramips-gl-net-mt300n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips --add-dest root:/ --add-arch all:100 --add-arch ramips_24kec:200 update || true; \
        fi
Package list missing or not up-to-date, generating it.
make[2]: Entering directory `/clients/cc-15.05-ramips-gl-net-mt300n'

Building package index...
(cd /clients/cc-15.05-ramips-gl-net-mt300n/packages; /clients/cc-15.05-ramips-gl-net-mt300n/scripts/ipkg-make-index.sh . > Packages && \
                gzip -9c Packages > Packages.gz \
        ) >/dev/null 2>/dev/null
make[2]: *** [package_index] Error 126
make[2]: Leaving directory `/clients/cc-15.05-ramips-gl-net-mt300n'
make[1]: *** [_call_image] Error 2
make[1]: Leaving directory `/clients/cc-15.05-ramips-gl-net-mt300n'
make: *** [image] Error 2

(Last edited by projects on 26 Aug 2017, 16:41)

projects wrote:

accidentally updated the OS which is Debian Linux 7.

You updated to or from Debian 7?
32 or 64bit?

The OS was Debian Linux 7, I just ran apt-get update/upgrade.
It is a vm dedicated to one version of my build, nothing else and I completely forgot and updated.
Since then, the build no longer works.

(Last edited by projects on 23 Aug 2017, 00:20)

Sorry, yes, it was always 64bit.

Are these forums no longer active or are people simply not interested in helping others anymore?
I could use help from someone in the community on this, I've not been able to find a solution so posting is all I have left.

There's always the possibility that none of the readers knows the answer. Keep trying.

In case you don't get an answer, try to go a different way, e.g. setup a fresh system to compile the firmware, or even setup a different system (Ubuntu i/o Debian). This might be tedious work, but in the absence of other solutions, it might be your last resort, and eventually lead to a working image.

True, I was hoping not to have to do that as I would like to know what happened first but as you say, if no one knows.

Thanks I'll get on that.

Oddly enough, the build does exactly the same thing on a centos7 vm I built to test this.
I'll have to download the latest image builder I guess and see if it still happens.

I think I found the problem.

During the build, the script cannot download the files so there are errors. Glinet doesn't seem to maintain all of the versions. I know there is a way to bypass downloading the files but I cannot find the info on how to do that.

wget http://www.gl-inet.com/openwrt/ramips/2 … ackages.gz
--2017-08-25 19:09:10--  http://www.gl-inet.com/openwrt/ramips/2 … ackages.gz
Resolving www.gl-inet.com (www.gl-inet.com)... 52.68.43.214
Connecting to www.gl-inet.com (www.gl-inet.com)|52.68.43.214|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-08-25 19:09:10 ERROR 404: Not Found.

I was going to delete this topic as useless since the answer is not that interesting but it could prove useful to someone else.

Yes, you are right, they no longer support 2.20 and simply removed it which does not seem like the best way to handle code if you are going to be offering it.

I ended up downloading the 2.261 builder and testing it now. So far, this seems to work.

Thanks for the help on this, it is appreciated.

I came back to an old tp-link build and am seeing the exact same problem again.
I maintain an older build bb.14.07 and I can see that the files are on openwrt but getting the same errors.

Building package index...
(cd /clients/bb-14.07-ar71xx-tp-link-703/packages; /clients/bb-14.07-ar71xx-tp-link-703/scripts/ipkg-make-index.sh . > Packages && \
        gzip -9c Packages > Packages.gz \
) >/dev/null 2>/dev/null
make[2]: *** [package_index] Error 126
make[2]: Leaving directory `/clients/bb-14.07-ar71xx-tp-link-703'
make[1]: *** [_call_image] Error 2
make[1]: Leaving directory `/clients/bb-14.07-ar71xx-tp-link-703'
make: *** [image] Error 2

I guess I'm learning that I cannot maintain older versions because some things in the builder seem to need external files or something. In this case I updated image builder to cc 15.05 and now it builds.

Why, what is causing this so that I can understand the reasons.

The discussion might have continued from here.