-
-
Notifications
You must be signed in to change notification settings - Fork 859
fix(steamcmd): add libtinfo.so.5 symlink fix for readline warning #4899
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -113,6 +113,25 @@ if [ ! -f "${steamclientsdk32}" ]; then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fn_fix_msg_end | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Helps fix: WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # On distros that ship libtinfo.so.6 (e.g. Ubuntu 22.04+, Debian 12+) but not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # libtinfo.so.5, SteamCMD prints this warning and loses readline support. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Creating a symlink from .so.5 -> .so.6 resolves the warning without root. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| libtinfo32dir="${HOME}/.steam/steamcmd" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| libtinfo32so="${libtinfo32dir}/libtinfo.so.5" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Find the .so.6 in the system 32-bit lib paths | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -f "${libtinfo32so6}" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fixname="libtinfo.so.5 32-bit symlink" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fn_fix_msg_start | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ln -sf "${libtinfo32so6}" "${libtinfo32so}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+127
to
+128
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fn_fix_msg_start | |
| ln -sf "${libtinfo32so6}" "${libtinfo32so}" | |
| fn_fix_msg_start | |
| if [ ! -d "${libtinfo32dir}" ]; then | |
| mkdir -p "${libtinfo32dir}" | |
| fi | |
| ln -sf "${libtinfo32so6}" "${libtinfo32so}" | |
| exitcode=$? |
Copilot
AI
Apr 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new libtinfo fix hard-codes ${HOME}/.steam/steamcmd, but elsewhere in this module SteamCMD artifacts are searched in multiple locations (e.g. ${steamcmddir} and ${HOME}/.local/share/Steam/steamcmd). To ensure the warning is actually resolved in all supported setups, consider applying the symlink fix to the active SteamCMD directory (or iterating through the same candidate directories used for steamclient.so).
| libtinfo32dir="${HOME}/.steam/steamcmd" | |
| libtinfo32so="${libtinfo32dir}/libtinfo.so.5" | |
| if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then | |
| # Find the .so.6 in the system 32-bit lib paths | |
| for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do | |
| if [ -f "${libtinfo32so6}" ]; then | |
| fixname="libtinfo.so.5 32-bit symlink" | |
| fn_fix_msg_start | |
| ln -sf "${libtinfo32so6}" "${libtinfo32so}" | |
| fn_fix_msg_end | |
| break | |
| fi | |
| done | |
| fi | |
| for libtinfo32dir in "${HOME}/.steam/steamcmd" "${steamcmddir}" "${HOME}/.local/share/Steam/steamcmd"; do | |
| if [ -d "${libtinfo32dir}" ]; then | |
| libtinfo32so="${libtinfo32dir}/libtinfo.so.5" | |
| if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then | |
| # Find the .so.6 in the system 32-bit lib paths | |
| for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do | |
| if [ -f "${libtinfo32so6}" ]; then | |
| fixname="libtinfo.so.5 32-bit symlink" | |
| fn_fix_msg_start | |
| ln -sf "${libtinfo32so6}" "${libtinfo32so}" | |
| fn_fix_msg_end | |
| break | |
| fi | |
| done | |
| fi | |
| fi | |
| done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guard
if [ ! -f ... ] && [ ! -L ... ]skips the fix whenlibtinfo.so.5exists as a broken symlink (-Ltrue but target missing). Using an existence check like! -e(or explicitly handling-L+! -e) would let the script repair broken links and still avoid overwriting valid files.