alibaba / ilogtail

Fast and Lightweight Observability Data Collector

Home Page:https://ilogtail.gitbook.io/ilogtail-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]:最新开发镜像无法编译glibc

davidwudv opened this issue · comments

Image: sls-opensource-registry.cn-shanghai.cr.aliyuncs.com/ilogtail-community-edition/ilogtail-build-linux:2.0
Image ID: 955eb184275a
错误信息如下:

make[3]: Leaving directory `/home/admin/glibc-2.18/elf'
gcc   -nostdlib -nostartfiles -r -o /home/admin/glibc-2.18/build/elf/librtld.os '-Wl,-(' /home/admin/glibc-2.18/build/elf/dl-allobjs.os /home/admin/glibc-2.18/build/elf/rtld-libc.a -lgcc '-Wl,-)' \
          -Wl,-Map,/home/admin/glibc-2.18/build/elf/librtld.os.map
gcc   -nostdlib -nostartfiles -shared -o /home/admin/glibc-2.18/build/elf/ld.so.new             \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs       \
          /home/admin/glibc-2.18/build/elf/librtld.os -Wl,--version-script=/home/admin/glibc-2.18/build/ld.map          \
          -Wl,-soname=ld-linux-aarch64.so.1                     \
          -Wl,-defsym=_begin=0
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: /home/admin/glibc-2.18/build/elf/librtld.os: relocation R_AARCH64_ABS32 against `a local symbol' can not be used when making a shared object
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: /home/admin/glibc-2.18/build/elf/librtld.os: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_dl_argv' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/admin/glibc-2.18/build/elf/librtld.os: in function `_dl_start_user':
rtld-setitimer.os:(.text+0x64): dangerous relocation: unsupported relocation
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/home/admin/glibc-2.18/build/elf/librtld.os: in function `do_lookup_x.isra.0':
rtld-setitimer.os:(.text+0x7e54): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `free' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
rtld-setitimer.os:(.text+0x8058): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `free' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/home/admin/glibc-2.18/build/elf/librtld.os: in function `_dl_relocate_object':
rtld-setitimer.os:(.text+0x992c): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `_dl_runtime_profile' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
rtld-setitimer.os:(.text+0xa08c): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `_dl_runtime_resolve' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/home/admin/glibc-2.18/build/elf/librtld.os: in function `_dl_debug_initialize':
rtld-setitimer.os:(.text+0xd114): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `_r_debug' defined in COMMON section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
rtld-setitimer.os:(.text+0xd130): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `_r_debug' defined in COMMON section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/home/admin/glibc-2.18/build/elf/librtld.os: in function `_dl_make_tlsdesc_dynamic':
rtld-setitimer.os:(.text+0x14138): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `free' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
/opt/rh/devtoolset-9/root/usr/libexec/gcc/aarch64-redhat-linux/9/ld: BFD version 2.32-16.el7 assertion fail ./elfnn-aarch64.c:4666
rtld-setitimer.os:(.text+0x14174): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `free' defined in .text section in /home/admin/glibc-2.18/build/elf/librtld.os
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x178): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x180): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x188): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x190): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x198): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x1a0): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x1a8): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x1b0): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x1b8): dangerous relocation: unsupported relocation
/home/admin/glibc-2.18/build/elf/librtld.os:(.data.rel.ro+0x1c0): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make[2]: *** [/home/admin/glibc-2.18/build/elf/ld.so] Error 1
make[2]: Leaving directory `/home/admin/glibc-2.18/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/admin/glibc-2.18'
make: *** [all] Error 2
  • 尝试过更新glibc版本,无法解决
  • 尝试过根据提示增加-fPIC编译选项,无法解决

@davidwudv 你的机器是arm的机器还是x86的机器?

@davidwudv 你的机器是arm的机器还是x86的机器?

arm的,MacBook Pro m1

@davidwudv 你是在vs code中使用开发镜像编译吗?可能跟这个pr有关:https://github.com/alibaba/ilogtail/pull/1219/files ,你可以先把这部分改动去掉试试。