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

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

Open
davidwudv opened this issue Jan 19, 2024 · 3 comments
Open

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

davidwudv opened this issue Jan 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@davidwudv
Copy link

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 davidwudv added the bug Something isn't working label Jan 19, 2024
@linrunqi08
Copy link
Collaborator

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

@davidwudv
Copy link
Author

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

arm的,MacBook Pro m1

@linrunqi08
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants