Errors when building glibc on Alpine Linux
我正在尝试在Alpine Linux上安装
--disable-profile --enable-add-ons \\
--libexecdir=/usr/bin --with-headers=/usr/include \\
--enable-static-pie
1 2 3 4 5 6 7 | # Begin /etc/ld.so.conf /usr/local/lib /opt/lib # End /etc/ld.so.conf EOF |
我在第11步遇到以下错误:
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:129: /glibc-2.28/glibc-build/elf/sotruss-lib.so] Error 1
make[2]: Leaving directory '/glibc-2.28/elf'
make[1]: *** [Makefile:258: elf/subdir_lib] Error 2
make[1]: Leaving directory '/glibc-2.28'
make: *** [Makefile:9: all] Error 2
如果我尝试添加
通过使用以下命令添加
更新
如果我运行
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
最终,为了在Alpine Linux上构建
以下是对我有用的步骤:
--disable-profile --enable-add-ons \\
--libexecdir=/usr/lib --with-headers=/usr/include \\
--without-cvs --enable-static-pie
我希望这些步骤也对其他人也有用。
安装
https://pkgs.alpinelinux.org/contents?file=libssp_nonshared.a&path=&name=musl-dev&branch=v3.8&repo=main&arch=x86_64