Code Monkey home page Code Monkey logo

glibc-all-in-one's Introduction

glibc-all-in-one

this repo helps you to download & debug & complie glibc easily.

feature

  • download glibc binary
  • download glibc debug file
  • extract custom glibc
  • download & complie glibc source code

usage

download

check supported packages. remember to run update_list at first.

➜  glibc-all-in-one ./update_list
[+] Common list has been save to "list"
[+] Old-release list has been save to "old_list"

➜  glibc-all-in-one cat list
2.23-0ubuntu10_amd64
2.23-0ubuntu10_i386
2.23-0ubuntu11_amd64
2.23-0ubuntu11_i386
2.23-0ubuntu3_amd64
2.23-0ubuntu3_i386
2.27-3ubuntu1_amd64
2.27-3ubuntu1_i386
2.28-0ubuntu1_amd64
2.28-0ubuntu1_i386
......

➜  glibc-all-in-one cat old_list
2.21-0ubuntu4.3_amd64
2.21-0ubuntu4.3_amd64
2.21-0ubuntu4_amd64
2.21-0ubuntu4_amd64
2.24-3ubuntu1_amd64
2.24-3ubuntu1_amd64
2.24-3ubuntu2.2_amd64
2.24-3ubuntu2.2_amd64
2.24-9ubuntu2.2_amd64
2.24-9ubuntu2.2_amd64
......

download.

Note: use download for packages in the list; use download_old for packages in the old_list.

➜  glibc-all-in-one ./download 2.23-0ubuntu10_i386
Getting 2.23-0ubuntu10_i386
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.23-0ubuntu10_i386.deb
  -> Downloading libc binary package
  -> Extracting libc binary package
  -> Package saved to libs/2.23-0ubuntu10_i386
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6-dbg_2.23-0ubuntu10_i386.deb
  -> Downloading libc debug package
  -> Extracting libc debug package
  -> Package saved to libs/2.23-0ubuntu10_i386/dbg
➜  glibc-all-in-one ls libs/2.23-0ubuntu10_i386
. .. .debug  ld-2.23.so  libc-2.23.so  libpthread.so.0   ......
➜  glibc-all-in-one ls libs/2.23-0ubuntu10_i386/.debug
ld-2.23.so  libc-2.23.so   ......
➜  glibc-all-in-one ./download_old 2.24-3ubuntu2.2_amd64
......

needed glibc not in my list ?

you can download the debs on your own, then use extract.

./extract ~/libc6_2.26-0ubuntu2_i386.deb /tmp/test
./extract ~/libc6-dbg_2.26-0ubuntu2_i386.deb /tmp/test_dbg

compile

supported version: 2.19, 2.23-2.29

supported arch: i686, amd64

note: you may fail to build older version of glibc. ( not my problem ) . my friend says that ubuntu 16.04 is perfect to build all of them.

note: change the GLIBC_DIR in the build, if you don't want to build them on /glibc.

./build 2.29 i686

glibc-all-in-one's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glibc-all-in-one's Issues

support python3

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

  • return re.findall('libc6_(2.[0-9][0-9]-[0-9]ubuntu[0-9.]*_{}).deb'.format(arch), content)
  • return re.findall('libc6_(2.[0-9][0-9]-[0-9]ubuntu[0-9.]*_{}).deb'.format(arch), content.decode('utf-8'))

Please merge to main branch

Extract error "Failed to save. Check it manually" in Glibc 2.39

$ ./download 2.39-0ubuntu8.1_amd64
Getting 2.39-0ubuntu8.1_amd64
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.39-0ubuntu8.1_amd64.deb
  -> Downloading libc binary package
  -> Extracting libc binary package
x - debian-binary
x - control.tar.zst
x - data.tar.zst
/xxxxxxx/glibc-all-in-one-master
Failed to save. Check it manually /tmp/tmp.OY5Lb8MtBS

the file tree of /tmp/tmp.OY5Lb8MtBS is

/tmp/tmp.OY5Lb8MtBS
β”œβ”€β”€ control.tar.zst
β”œβ”€β”€ data.tar.zst
β”œβ”€β”€ debian-binary
β”œβ”€β”€ etc
β”‚Β Β  └── ld.so.conf.d
β”‚Β Β      └── x86_64-linux-gnu.conf
└── usr
    β”œβ”€β”€ lib
    β”‚Β Β  └── x86_64-linux-gnu
    β”‚Β Β      β”œβ”€β”€ gconv
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ANSI_X3.110.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ARMSCII-8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ASMO_449.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ BIG5.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ BIG5HKSCS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ BRF.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP10007.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1125.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1250.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1251.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1252.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1253.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1254.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1255.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1256.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1257.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP1258.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP737.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP770.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP771.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP772.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP773.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP774.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP775.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CP932.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CSN_369103.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ CWI.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ DEC-MCS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-AT-DE-A.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-AT-DE.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-CA-FR.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-DK-NO-A.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-DK-NO.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-ES-A.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-ES-S.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-ES.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-FI-SE-A.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-FI-SE.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-FR.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-IS-FRISS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-IT.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-PT.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-UK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EBCDIC-US.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ECMA-CYRILLIC.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-CN.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-JISX0213.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-JP-MS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-JP.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-KR.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ EUC-TW.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GB18030.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GBBIG5.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GBGBK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GBK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GEORGIAN-ACADEMY.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GEORGIAN-PS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GOST_19768-74.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GREEK-CCITT.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GREEK7-OLD.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ GREEK7.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ HP-GREEK8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ HP-ROMAN8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ HP-ROMAN9.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ HP-THAI8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ HP-TURKISH8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM037.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM038.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1004.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1008.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1008_420.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1025.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1026.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1046.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1047.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1097.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1112.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1122.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1123.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1124.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1129.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1130.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1132.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1133.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1137.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1140.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1141.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1142.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1143.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1144.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1145.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1146.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1147.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1148.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1149.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1153.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1154.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1155.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1156.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1157.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1158.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1160.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1161.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1162.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1163.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1164.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1166.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1167.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM12712.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1364.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1371.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1388.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1390.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM1399.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM16804.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM256.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM273.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM274.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM275.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM277.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM278.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM280.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM281.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM284.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM285.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM290.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM297.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM420.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM423.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM424.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM437.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM4517.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM4899.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM4909.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM4971.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM500.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM5347.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM803.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM850.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM851.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM852.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM855.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM856.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM857.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM858.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM860.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM861.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM862.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM863.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM864.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM865.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM866.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM866NAV.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM868.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM869.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM870.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM871.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM874.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM875.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM880.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM891.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM901.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM902.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM903.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM9030.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM904.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM905.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM9066.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM918.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM921.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM922.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM930.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM932.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM933.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM935.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM937.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM939.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM943.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IBM9448.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ IEC_P27-1.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ INIS-8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ INIS-CYRILLIC.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ INIS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISIRI-3342.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-2022-CN-EXT.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-2022-CN.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-2022-JP-3.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-2022-JP.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-2022-KR.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-IR-197.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO-IR-209.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO646.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-1.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-10.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-11.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-13.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-14.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-15.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-16.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-2.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-3.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-4.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-5.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-6.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-7.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-9.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO8859-9E.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_10367-BOX.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_11548-1.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_2033.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_5427-EXT.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_5427.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_5428.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_6937-2.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ISO_6937.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ JOHAB.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ KOI-8.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ KOI8-R.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ KOI8-RU.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ KOI8-T.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ KOI8-U.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ LATIN-GREEK-1.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ LATIN-GREEK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MAC-CENTRALEUROPE.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MAC-IS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MAC-SAMI.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MAC-UK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MACINTOSH.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ MIK.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ NATS-DANO.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ NATS-SEFI.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ PT154.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ RK1048.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SAMI-WS2.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SHIFT_JISX0213.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SJIS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ T.61.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ TCVN5712-1.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ TIS-620.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ TSCII.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ UHC.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ UNICODE.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ UTF-16.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ UTF-32.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ UTF-7.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ VISCII.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ gconv-modules
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ gconv-modules.cache
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ gconv-modules.d
    β”‚Β Β      β”‚Β Β  β”‚Β Β  └── gconv-modules-extra.conf
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ libCNS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ libGB.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ libISOIR165.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ libJIS.so
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ libJISX0213.so
    β”‚Β Β      β”‚Β Β  └── libKSC.so
    β”‚Β Β      β”œβ”€β”€ ld-linux-x86-64.so.2
    β”‚Β Β      β”œβ”€β”€ libBrokenLocale.so.1
    β”‚Β Β      β”œβ”€β”€ libanl.so.1
    β”‚Β Β      β”œβ”€β”€ libc.so.6
    β”‚Β Β      β”œβ”€β”€ libc_malloc_debug.so.0
    β”‚Β Β      β”œβ”€β”€ libdl.so.2
    β”‚Β Β      β”œβ”€β”€ libm.so.6
    β”‚Β Β      β”œβ”€β”€ libmemusage.so
    β”‚Β Β      β”œβ”€β”€ libmvec.so.1
    β”‚Β Β      β”œβ”€β”€ libnsl.so.1
    β”‚Β Β      β”œβ”€β”€ libnss_compat.so.2
    β”‚Β Β      β”œβ”€β”€ libnss_dns.so.2
    β”‚Β Β      β”œβ”€β”€ libnss_files.so.2
    β”‚Β Β      β”œβ”€β”€ libnss_hesiod.so.2
    β”‚Β Β      β”œβ”€β”€ libpcprofile.so
    β”‚Β Β      β”œβ”€β”€ libpthread.so.0
    β”‚Β Β      β”œβ”€β”€ libresolv.so.2
    β”‚Β Β      β”œβ”€β”€ librt.so.1
    β”‚Β Β      β”œβ”€β”€ libthread_db.so.1
    β”‚Β Β      └── libutil.so.1
    β”œβ”€β”€ lib64
    β”‚Β Β  └── ld-linux-x86-64.so.2 -> ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
    └── share
        β”œβ”€β”€ doc
        β”‚Β Β  └── libc6
        β”‚Β Β      β”œβ”€β”€ NEWS.Debian.gz
        β”‚Β Β      β”œβ”€β”€ NEWS.gz
        β”‚Β Β      β”œβ”€β”€ README.Debian.gz
        β”‚Β Β      β”œβ”€β”€ README.hesiod.gz
        β”‚Β Β      β”œβ”€β”€ changelog.Debian.gz
        β”‚Β Β      └── copyright
        └── lintian
            └── overrides
                └── libc6

13 directories, 288 files

I modify the extract script, add a line, then it work.

|| cp -rP $tmp/usr/lib/*/* $out 2>/dev/null \

A Little Advice

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.

tar fail error when downloading glibc >= 2.34

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

Add a License

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".

add --no-check-certificate in download

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"

Solve the problem of no debugging symbols in high versions of glibc

Solve the problem of no debugging symbols in high versions of glibc

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.

Upgrade GDB version (may be required)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.