matrix1001 / glibc-all-in-one Goto Github PK
View Code? Open in Web Editor NEW🎁A convenient glibc binary and debug file downloader and source code auto builder
License: MIT License
🎁A convenient glibc binary and debug file downloader and source code auto builder
License: MIT License
how to install glibc 2.25 in ubuntu20
why can't debug when libc >=2.34
I noticed that the project lacks a license.
I want to use some code of this project in another project.
I hope this project can add a license to express the rules that "modify or use the code of this project".
diff --git a/update_list b/update_list
index 0551dff..b78f3cb 100755
--- a/update_list
+++ b/update_list
@@ -9,7 +9,7 @@ old_url = 'http://old-releases.ubuntu.com/ubuntu/pool/main/g/glibc/'
def get_list(url, arch):
content = requests.get(url).content
Please merge to main branch
I got this when downloading. I reckon that the source may not has this glibcxx.deb. The list maybe wrong
Getting 2.29-0ubuntu2_amd64
-> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.29-0ubuntu2_amd64.deb
-> Downloading libc binary package
Failed to download package from https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.29-0ubuntu2_amd64.deb
To avoid certificate problems, need to add '--no-check-certificate' in the download script:
wget --no-check-certificate "$url" -O debs/$deb_name || die "Failed to download package from $url"
echo " -> Extracting libc binary package"
mkdir libs/$id
./extract debs/$deb_name libs/$id
echo " -> Package saved to libs/$id"
# download debug info package
local url="$SOURCE/$dbg_name"
echo " -> Location: $url"
echo " -> Downloading libc debug package"
wget --no-check-certificate "$url" 2>/dev/null -O debs/$dbg_name || die "Failed to download package from $url"
Add cp -r $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null
to the line above the rm -rf $tmp
command of the extract file.
--- extract 2022-10-31 15:36:48.748430597 +0800
+++ extract-patch 2022-10-31 15:42:27.990103399 +0800
@@ -33,8 +33,9 @@
|| cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
- || die "Failed to save. Check it manually $tmp"
+ || die "Failed to save. Check it manually $tmp"
+ cp -r $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null
rm -rf $tmp
}
The extract script after patch is as follows
#!/bin/bash
cd "$(dirname "$0")"
die() {
echo >&2 $1
exit 1
}
usage() {
echo -e >&2 "Usage: $0 deb output"
exit 2
}
extract() {
local deb=`readlink -f $1`
local out=$2
if [ ! -d "$out" ]; then
mkdir $out
fi
local tmp=`mktemp -d`
cd $tmp
ar xv $deb || die "ar failed"
if [ -f "data.tar.zst" ];then
tar -I zstd -xf data.tar.* || die "tar failed"
else
tar xf data.tar.* || die "tar failed"
fi
cd -
cp -rP $tmp/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
|| die "Failed to save. Check it manually $tmp"
cp -r $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null
rm -rf $tmp
}
if [[ $# -ne 2 ]]; then
usage
fi
extract "$1" "$2"
Note: Because files will be copied to the .build-id
directory of the system, root privileges are required every time you run ./download
.
If your environment is ubuntu16 or 18, then the default GDB version is lower (GDB < 8.3) and does not support parsing the symbol files in .build-id. In this case, you need to upgrade the GDB version.
Version 9.2 is recommended, use the following methods to complete the upgrade
apt install texinfo
cp `which gdb` `which gdb`-old
cp `which gdbserver` `which gdbserver`-old
wegt http://ftp.gnu.org/gnu/gdb/gdb-9.2.tar.gz
tar -xzvf gdb-9.2.tar.gz
cd gdb-9.2 && mkdir build && cd build
../configure --with-python=`which python3` --enable-targets=all
make && make install
I faced this error when trying to download the Glibc libraries whose versions are larger than 2.34.
┌──(kali㉿kali-linux)-[~/Downloads/glibc-all-in-one]
└─$ sudo ./download 2.35-0ubuntu3_amd64
Getting 2.35-0ubuntu3_amd64
-> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.35-0ubuntu3_amd64.deb
-> Downloading libc binary package
-> Extracting libc binary package
x - debian-binary
x - control.tar.zst
x - data.tar.zst
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar failed
-> Package saved to libs/2.35-0ubuntu3_amd64
-> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6-dbg_2.35-0ubuntu3_amd64.deb
-> Downloading libc debug package
-> Extracting libc debug package
x - debian-binary
x - control.tar.zst
x - data.tar.zst
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar failed
-> Package saved to libs/2.35-0ubuntu3_amd64/.debug
The default build target path is /glibc.
It will put the file to the root.
So we should let the user to input the target path not to build to the root path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.