amosbird / ldb_toolchain_gen

MIT License
66 stars 21 forks source link

Error installing ldb_toolchain on CentOS: GLIBC_2.32 not found #34

Closed Baymine closed 2 months ago

Baymine commented 2 months ago

I'm encountering an issue while installing the ldb_toolchain (Swift) on my CentOS machine. When running the installation script, I receive the following error:

$ ./ldb_toolchain_gen.sh $(pwd)/ldb_toolchain

$DORIS_HOME/thirdparty/ldb_toolchain/bin/ld.lld: /$DORIS_HOME/thirdparty/ldb_toolchain/bin/../lib/libc.so.6: version `GLIBC_2.32' not found (required by /path/to/gcc14.1.0/lib64/libstdc++.so.6)
collect2: error: ld returned 1 exit status
Generated toolchain cannot compile a simple program.

Environment details:

Steps to reproduce:

  1. Run ./ldb_toolchain_gen.sh $(pwd)/ldb_toolchain

Questions:

  1. Is there a minimum GLIBC version required for the ldb_toolchain?
  2. Are there any known workarounds for this issue on CentOS?
  3. Is there additional information I can provide to help diagnose this problem?

Thank you for your assistance.

amosbird commented 2 months ago

Is there a minimum GLIBC version required for the ldb_toolchain?

Nope.

Is there additional information I can provide to help diagnose this problem?

Which version of ldb_toolchain are you using? Please also provide your environment via env command. Some linker or loader flags are probably causing the issue

Baymine commented 2 months ago

Thank you for your quick response. I appreciate your willingness to help diagnose the issue. As requested, I'm providing additional information:

Regarding the ldb_toolchain version: I am using the latest version, Swift.

Environment information: I've run the env command as suggested. Below is a sanitized version of the output to protect sensitive information:

TMPDIR=/var/folders/xx/xxxxxxxxxxxxxxxxxxxxxxxxxxx/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.xxxxxxxxxxxx/Listeners
SECURITYSESSIONID=xxxxx
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=453
TERM_SESSION_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
SHELL=/bin/zsh
HOME=/Users/username
LOGNAME=username
USER=username
PATH=[standard macOS paths]:/usr/local/go/bin
SHLVL=1
PWD=/Users/username
OLDPWD=/Users/username
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
INFOPATH=/opt/homebrew/share/info:
HOMEBREW_API_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/api
HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/bottles
HOMEBREW_PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
ZSH=/Users/username/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
AUTOJUMP_SOURCED=1
AUTOJUMP_ERROR_PATH=/Users/username/Library/autojump/errors.log
VIRTUAL_ENV_DISABLE_PROMPT=1
NVM_DIR=/Users/username/.nvm
JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
NVM_CD_FLAGS=-q
NVM_RC_VERSION=
DORIS_HOME=/Users/username/code/doris_local
CC=/opt/homebrew/Cellar/gcc/14.1.0_1/bin/gcc-14
CXX=/opt/homebrew/Cellar/gcc/14.1.0_1/bin/g++-14
DORIS_THRIFT=/Users/username/doris/doris_local/thirdparty
LANG=zh_CN.UTF-8

Please let me know if you need any specific details from this output or if there's any other information that would be helpful.

I'm happy to provide any further details or run additional commands if needed. Thank you again for your assistance in resolving this issue.

amosbird commented 2 months ago

It appears you're using macOS. ldb_toolchain is only supported on Linux.

Baymine commented 2 months ago

I apologize for the confusion earlier. Due to SSH timeout issues, I initially ran the command on my local machine. I've now run the env command on the CentOS machine where I'm experiencing the issue. Here's the sanitized output with key information preserved:

HOSTNAME=SERVER.DOMAIN.LOCAL
XDG_SESSION_ID=525482
GUESTFISH_INIT=\e[1;34m
TERM=xterm-256color
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=[MASKED IP] [MASKED PORT] 443
SSH_TTY=/dev/pts/3
GOPRIVATE=*.com
LC_ALL=en_US.UTF-8
USER=[MASKED]
LD_LIBRARY_PATH=/home/[MASKED]/[MASKED]/code/tools/gcc14.1.0/lib64:
LS_COLORS=[LONG LS_COLORS STRING PRESERVED]
TMOUT=900
GUESTFISH_PS1=\[\e[1;32m\]><fs>\[\e[0;31m\] 
MAIL=/var/spool/mail/[MASKED]
PATH=/home/[MASKED]/[MASKED]/code/tools/cmake-3.30.0-linux-x86_64/bin:/home/[MASKED]/[MASKED]/code/tools/gcc14.1.0/bin:/usr/lib/jvm/jdk-17.0.6/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/Arcconf:/usr/local/go/bin:usr/local/bin/apt-get:/usr/local/sql-replay/sql-replay-1.0/bin:/usr/local/ck2:/usr/local/git/bin:/usr/local/apache-maven-3.9.1/bin:/home/[MASKED]/.local/bin:/home/[MASKED]/bin
GOPROXY=https://goproxy.io,https://goproxy.cn,direct
PWD=/home/[MASKED]/[MASKED]
JAVA_HOME=/usr/lib/jvm/jdk-17.0.6
LANG=en_US.UTF-8
GUESTFISH_OUTPUT=\e[0m
HISTCONTROL=ignoredups
GOSUMDB=offexport
SHLVL=1
HOME=/home/[MASKED]
LOGNAME=[MASKED]
CLASSPATH=.:/usr/lib/jvm/jdk-17.0.6/lib/dt.jar:/usr/lib/jvm/jdk-17.0.6/lib/tools.jar
SSH_CONNECTION=[MASKED IP] [MASKED PORT] [MASKED IP] 443
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/1040
GUESTFISH_RESTORE=\e[0m
_=/usr/bin/env
OLDPWD=/home/[MASKED]
amosbird commented 2 months ago

unset LD_LIBRARY_PATH and then rerun the ldb_toolchain installation. It's already mentioned in the FAQ.