check flags: building check-recursive Making check in src make[1]: Entering directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/src' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/src' Making check in tests make[1]: Entering directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' building check-am make main main-scoped simple big-dynstr make[2]: Entering directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' building main.o gcc -fpic -o main.o -c main.c building foo.o gcc -fpic -o foo.o -c foo.c building bar.o gcc -fpic -o bar.o -c bar.c building libbar.so NIX_DONT_SET_RPATH=1 gcc -Wl,--disable-new-dtags -shared -o libbar.so bar.o -L . -Wl,-rpath,`pwd`/no-such-path building libfoo.so NIX_DONT_SET_RPATH=1 gcc -Wl,--disable-new-dtags -shared -o libfoo.so foo.o -L . -lbar building main LD_LIBRARY_PATH=. gcc -Wl,--disable-new-dtags -o main main.o -L . -lfoo building libbar-scoped.so NIX_DONT_SET_RPATH=1 gcc -Wl,--enable-new-dtags -shared -o libbar-scoped.so bar.o building libfoo-scoped.so NIX_DONT_SET_RPATH=1 gcc -Wl,--enable-new-dtags -shared -o libfoo-scoped.so foo.o -L . -lbar-scoped building main-scoped LD_LIBRARY_PATH=. gcc -Wl,--enable-new-dtags -o main-scoped main.o -L . -lfoo-scoped building simple.o gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"\"0.4\"\" -DPACKAGE_STRING=\"patchelf\ \"0.4\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"\"0.4\"\" -I. -I. -O0 -c simple.c building simple gcc -O0 -o simple simple.o  building big-dynstr.o gcc -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"\"0.4\"\" -DPACKAGE_STRING=\"patchelf\ \"0.4\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"\"0.4\"\" -I. -I. -O0 -c big-dynstr.c building big-dynstr LD_LIBRARY_PATH=. gcc -Wl,--disable-new-dtags -o big-dynstr big-dynstr.o -L . -lfoo make[2]: Leaving directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' make check-TESTS make[2]: Entering directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' building check-TESTS ./main: error while loading shared libraries: libfoo.so: cannot open shared object file: No such file or directory PASS: plain-fail.sh Hello World This is foo()! This is bar()! Result is 46 PASS: plain-run.sh RPATH before: /tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/no-such-path:/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib patching ELF file `scratch/libbar.so' removing directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/no-such-path' from RPATH removing directory `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib' from RPATH new rpath is `' RPATH after: Hello World This is foo()! This is bar()! Result is 46 PASS: shrink-rpath.sh Hello World current interpreter is /nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib/ld-linux.so.2 patching ELF file `scratch/simple' replacing section `.interp' with size 6 found .interp section; this is an executable using replaced section `.interp' last replaced is 1 looking at section `.interp' first reserved offset/addr is 0x15c/0x804815c first page is 0x8048000 needed space is 284 clearing first 72 bytes rewriting section `.interp' from offset 276 (size 72) to offset 276 (size 6) running with missing interpreter... ./set-interpreter-short.sh: line 15: scratch/simple: No such file or directory PASS: set-interpreter-short.sh Hello World current interpreter is /nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib/ld-linux.so.2 patching ELF file `scratch/simple' replacing section `.interp' with size 192 found .interp section; this is an executable using replaced section `.interp' last replaced is 1 looking at section `.interp' first reserved offset/addr is 0x15c/0x804815c first page is 0x8048000 needed space is 468 needed space is 500 needed pages is 1 clearing first 4136 bytes rewriting section `.interp' from offset 4372 (size 72) to offset 308 (size 192) running with missing interpreter... ./set-interpreter-long.sh: line 16: scratch/simple: No such file or directory running with new interpreter... Hello World PASS: set-interpreter-long.sh patching ELF file `scratch/main' new rpath is `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib:/nix/store/hzav3wkr2cj3lfs894ian58az0bv6jnx-gcc-4.2.3/lib:/nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsA:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsB' rpath is too long, resizing... replacing section `.dynstr' with size 882 found .interp section; this is an executable using replaced section `.dynstr' last replaced is 5 looking at section `.interp' replacing section `.interp' which is in the way looking at section `.note.ABI-tag' replacing section `.note.ABI-tag' which is in the way looking at section `.hash' replacing section `.hash' which is in the way looking at section `.dynsym' replacing section `.dynsym' which is in the way looking at section `.dynstr' first reserved offset/addr is 0x712/0x8048712 first page is 0x8048000 needed space is 2180 needed space is 2212 needed pages is 1 clearing first 5598 bytes rewriting section `.dynstr' from offset 5392 (size 514) to offset 308 (size 882) rewriting section `.dynsym' from offset 4784 (size 608) to offset 1192 (size 608) rewriting section `.hash' from offset 4476 (size 308) to offset 1800 (size 308) rewriting section `.interp' from offset 4372 (size 72) to offset 2108 (size 72) rewriting section `.note.ABI-tag' from offset 4444 (size 32) to offset 2180 (size 32) Hello World This is foo()! This is bar()! Result is 46 PASS: set-rpath.sh patching ELF file `scratch/no-rpath' new rpath is `/foo:/bar:/xxxxxxxxxxxxxxx' rpath is too long, resizing... DT_NULL index is 19 replacing section `.dynamic' with size 208 replacing section `.dynstr' with size 103 replacing section `.interp' with size 72 found .interp section; this is an executable using replaced section `.interp' using replaced section `.dynstr' using replaced section `.dynamic' last replaced is 17 looking at section `.interp' looking at section `.note.ABI-tag' replacing section `.note.ABI-tag' which is in the way looking at section `.hash' replacing section `.hash' which is in the way looking at section `.dynsym' replacing section `.dynsym' which is in the way looking at section `.dynstr' looking at section `.gnu.version' first reserved offset/addr is 0x1ec/0x80481ec first page is 0x8048000 needed space is 780 needed space is 812 needed pages is 1 clearing first 4312 bytes rewriting section `.dynamic' from offset 5288 (size 200) to offset 276 (size 208) rewriting section `.dynstr' from offset 4512 (size 76) to offset 484 (size 103) rewriting section `.dynsym' from offset 4432 (size 80) to offset 588 (size 80) rewriting section `.hash' from offset 4392 (size 40) to offset 668 (size 40) rewriting section `.interp' from offset 4340 (size 19) to offset 708 (size 72) rewriting section `.note.ABI-tag' from offset 4360 (size 32) to offset 780 (size 32) PASS: no-rpath.sh patching ELF file `scratch/big-dynstr' new rpath is `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib:/nix/store/hzav3wkr2cj3lfs894ian58az0bv6jnx-gcc-4.2.3/lib:/nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsA:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsB' rpath is too long, resizing... replacing section `.dynstr' with size 882 found .interp section; this is an executable using replaced section `.dynstr' last replaced is 5 looking at section `.interp' replacing section `.interp' which is in the way looking at section `.note.ABI-tag' replacing section `.note.ABI-tag' which is in the way looking at section `.hash' replacing section `.hash' which is in the way looking at section `.dynsym' replacing section `.dynsym' which is in the way looking at section `.dynstr' first reserved offset/addr is 0x712/0x8048712 first page is 0x8048000 needed space is 2180 needed space is 2212 needed pages is 1 clearing first 5598 bytes rewriting section `.dynstr' from offset 5392 (size 514) to offset 308 (size 882) rewriting section `.dynsym' from offset 4784 (size 608) to offset 1192 (size 608) rewriting section `.hash' from offset 4476 (size 308) to offset 1800 (size 308) rewriting section `.interp' from offset 4372 (size 72) to offset 2108 (size 72) rewriting section `.note.ABI-tag' from offset 4444 (size 32) to offset 2180 (size 32) Hello World This is foo()! This is bar()! Result is 46 PASS: big-dynstr.sh patching ELF file `scratch/main-scoped' new rpath is `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib:/nix/store/hzav3wkr2cj3lfs894ian58az0bv6jnx-gcc-4.2.3/lib:/nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsA:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsB' rpath is too long, resizing... replacing section `.dynstr' with size 889 found .interp section; this is an executable using replaced section `.dynstr' last replaced is 5 looking at section `.interp' replacing section `.interp' which is in the way looking at section `.note.ABI-tag' replacing section `.note.ABI-tag' which is in the way looking at section `.hash' replacing section `.hash' which is in the way looking at section `.dynsym' replacing section `.dynsym' which is in the way looking at section `.dynstr' first reserved offset/addr is 0x71a/0x804871a first page is 0x8048000 needed space is 2188 needed space is 2220 needed pages is 1 clearing first 5606 bytes rewriting section `.dynstr' from offset 5392 (size 521) to offset 308 (size 889) rewriting section `.dynsym' from offset 4784 (size 608) to offset 1200 (size 608) rewriting section `.hash' from offset 4476 (size 308) to offset 1808 (size 308) rewriting section `.interp' from offset 4372 (size 72) to offset 2116 (size 72) rewriting section `.note.ABI-tag' from offset 4444 (size 32) to offset 2188 (size 32) ./main-scoped: error while loading shared libraries: libbar-scoped.so: cannot open shared object file: No such file or directory patching ELF file `scratch/libsA/libfoo-scoped.so' new rpath is `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsB' rpath is too long, resizing... replacing section `.dynstr' with size 546 no .interp section; this is a dynamic library last page is 0x5000 needed space is 708 rewriting section `.dynstr' from offset 996 (size 391) to offset 16544 (size 546) Hello World This is foo()! This is bar()! Result is 46 patching ELF file `scratch/main-scoped' removing directory `/nix/store/idgcaf0jnvs7mb04k3g7b4j5f8v21kiw-nix-build/lib' from RPATH removing directory `/nix/store/hzav3wkr2cj3lfs894ian58az0bv6jnx-gcc-4.2.3/lib' from RPATH removing directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsB' from RPATH new rpath is `/nix/store/zahfcxzylmadvaj865j5xmm1dsvs03r7-glibc-2.7/lib:/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests/scratch/libsA' Hello World This is foo()! This is bar()! Result is 46 PASS: set-rpath-library.sh ================== All 9 tests passed ================== make[2]: Leaving directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' make[1]: Leaving directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4/tests' make[1]: Entering directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4' make[1]: Nothing to be done for `check-am'. make[1]: Leaving directory `/tmp/nix-build-ychv4bkdi06rvxqvi40pjh9xpi69cy45-nix-build.drv-0/patchelf-0.4'