[Solved by using Ubuntu instead or Arch] lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64 "Inconsistency detected by ld.so"

Hi guys.

Thanks for the Lede/OpenWRT project - this is just a great piece of software which I am using for a long time already on various devices.

However, with the just released 17.01.5 version I have a problem using the imagebuilder.

I am trying to build an image for the Archer C7 v2 using the below commands:

$ tar xJpf lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64.tar.xz
$ cd lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/
$ make image PROFILE=archer-c7-v2 PACKAGES="kmod-fs-ext4 kmod-usb-storage block-mount luci luci-ssl adblock luci-app-adblock"

When it comes to the image build phase it bails out with the following error:

Building images...
19+1 records in
20+0 records out
1310720 bytes (1.3 MB, 1.2 MiB) copied, 0.00538319 s, 243 MB/s
Image Name:   MIPS OpenWrt Linux-4.4.140
Created:      Mon Jul 16 10:03:35 2018
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    1272581 Bytes = 1242.75 kB = 1.21 MB
Load Address: 80060000
Entry Point:  80060000
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/stephan/Downloads/lede/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/linux-ar71xx_generic/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/stephan/Downloads/lede/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/dev".
Ignoring, exclude it (-e/-ef) to override.
[=============================================================================================================================================================================\] 962/962 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
        compressed data, compressed metadata, compressed fragments, no xattrs
        duplicates are removed
Filesystem size 2939.77 Kbytes (2.87 Mbytes)
        34.56% of uncompressed filesystem size (8505.51 Kbytes)
Inode table size 9644 bytes (9.42 Kbytes)
        23.00% of uncompressed inode table size (41939 bytes)
Directory table size 12596 bytes (12.30 Kbytes)
        46.66% of uncompressed directory table size (26995 bytes)
Number of duplicate files found 114
Number of inodes 1269
Number of files 961
Number of fragments 23
Number of symbolic links  198
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 109
Number of ids (unique uids + gids) 1
Number of uids 1
Inconsistency detected by ld.so: dl-open.c: 689: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
make[3]: *** [/home/stephan/Downloads/lede/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/include/image.mk:310: /home/stephan/Downloads/lede/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/linux-ar71xx_generic/root.squashfs] Error 127
make[2]: *** [Makefile:178: build_image] Error 2
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:203: image] Error 2

I have no idea how to debug or fix this, any hints are appreciated.
Note: I am on Arch Linux.

Many thanks,
Stephan

try export LC_ALL=C before invoking the IB.

I did but it comes back with the same error.
I'll try IB on Ubuntu now, let's see if that works.

On Ubuntu xenial (16.04) it just works.
Not solved, but for me this is a suitable workaround.

1 Like

Same error here on Manjaro 17.1.11
imagebuilder-17.01.4 works fine.

Please run the following command once within the ImageBuilder (or SDK) directory to fix:
sed -i -e 's,/\(usr\|lib\|etc\)/,/###/,g' ./staging_dir/host/lib/libc.so.6