"undefined symbol: __res_nsearch" Displayed During BE Compilation
Symptom
When the STRIP_DEBUG_INFO=ON sh build.sh --clean --be command is executed, the error message "undefined symbol: __res_nsearch" is displayed.

Key Process and Cause Analysis
The pre-downloaded libkrb5.a file from the third-party needs to be recompiled.
Conclusion and Solution
- Recompile the third-party libkrb5.a file.
- Open the file.
1vi /opt/tools/installed/doris-2.1.2-rc04/thirdparty/build-thirdparty.sh - Comment out line 1871, add line 1872 to add the packages parameter, and set packages to krb5.
1packages=(krb5)

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Use GCC 12 to compile the third-party krb5.
1 2 3
export DORIS_TOOLCHAIN=gcc cd /opt/tools/installed/doris-2.1.2-rc04/thirdparty sh build-thirdparty.sh
- Run the command again:
1 2 3
export DORIS_TOOLCHAIN=clang cd /opt/tools/installed/doris-2.1.2-rc04 STRIP_DEBUG_INFO=ON sh build.sh --clean --be
Parent topic: Troubleshooting