Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd not being recognized by ./glibc_run.sh #203

Open
austinzwile opened this issue Feb 4, 2025 · 1 comment
Open

zstd not being recognized by ./glibc_run.sh #203

austinzwile opened this issue Feb 4, 2025 · 1 comment

Comments

@austinzwile
Copy link

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.

@Kyle-Kyle
Copy link
Contributor

I cannot reproduce this bug in my setup.
Reading the log, it feels like you fail to download the libcs from https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.30-0ubuntu2.2_amd64.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants