how2heap icon indicating copy to clipboard operation
how2heap copied to clipboard

zstd not being recognized by ./glibc_run.sh

Open austinzwile opened this issue 3 weeks ago • 1 comments

When attempting to run tools under a certain glibc version with ./glibc_run.sh I am getting an error saying zstd is not found. This is after running:

root@52bd1267a6cb:~/how2heap# apt install zstd -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zstd is already the newest version (1.4.4+dfsg-3ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@52bd1267a6cb:~/how2heap# make clean
all the built binaries are removed.
root@52bd1267a6cb:~/how2heap# make base
version=calc_tcache_idx; \
if [ "Y" = "Y" ]; \
then \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  calc_tcache_idx.c -o calc_tcache_idx -ldl; \
else \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  calc_tcache_idx.c -o calc_tcache_idx -ldl \
	-Xlinker -rpath=$(realpath glibc-all-in-one/libs/$version*) \
	-Xlinker -I$(realpath glibc-all-in-one/libs/$version*/ld-linux-x86-64.so.2) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libc.so.6) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libdl.so.2); \
fi
version=malloc_playground; \
if [ "Y" = "Y" ]; \
then \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  malloc_playground.c -o malloc_playground -ldl; \
else \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  malloc_playground.c -o malloc_playground -ldl \
	-Xlinker -rpath=$(realpath glibc-all-in-one/libs/$version*) \
	-Xlinker -I$(realpath glibc-all-in-one/libs/$version*/ld-linux-x86-64.so.2) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libc.so.6) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libdl.so.2); \
fi
version=first_fit; \
if [ "Y" = "Y" ]; \
then \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  first_fit.c -o first_fit -ldl; \
else \
	cc -std=c99 -g -Wno-unused-result -Wno-free-nonheap-object  first_fit.c -o first_fit -ldl \
	-Xlinker -rpath=$(realpath glibc-all-in-one/libs/$version*) \
	-Xlinker -I$(realpath glibc-all-in-one/libs/$version*/ld-linux-x86-64.so.2) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libc.so.6) \
	-Xlinker $(realpath glibc-all-in-one/libs/$version*/libdl.so.2); \
fi
root@52bd1267a6cb:~/how2heap# ./glibc_run.sh 2.30 ./malloc_playground -d -p
Getting 2.30-0ubuntu2.2_amd64
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.30-0ubuntu2.2_amd64.deb
  -> Downloading libc binary package
Failed to download package from https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.30-0ubuntu2.2_amd64.deb
Getting 2.30-0ubuntu2.2_amd64
  -> Location: http://old-releases.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.30-0ubuntu2.2_amd64.deb
  -> Downloading libc binary package
Failed to download package from http://old-releases.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.30-0ubuntu2.2_amd64.deb
/root/how2heap
cp: cannot stat 'glibc-all-in-one/libs/2.30-0ubuntu2.2_amd64/*': No such file or directory
cp: cannot stat 'glibc-all-in-one/libs/2.30-0ubuntu2.2_amd64/.debug': No such file or directory
Couldn't download and extract glibc.
Check you have installed zstd

This was done inside the docker. Any thoughts on how to remediate? Thank you in advance.

austinzwile avatar Feb 04 '25 18:02 austinzwile