Skip to content

Commit

Permalink
configure-system-libraries.sh: Skip 32bit libraries during lookup on …
Browse files Browse the repository at this point in the history
…x64 Linux. OpenRA#21353
  • Loading branch information
tinix0 committed Apr 1, 2024
1 parent 0c43801 commit 661ed1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure-system-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ patch_config()
for DIR in ${SEARCHDIRS} ; do
for LIB in ${SEARCH}; do
if [ -f "${DIR}/${LIB}" ]; then
# x86-64 Linux might have 32-bit libraries present, link against the 64 bit libraries since there is no 32-bit Linux release of dotnet
if [ "$(uname -s)" = "Linux" ] && [ "$(arch)" = "x86_64" ]; then
if [ "$(LANG=C readelf -h "${DIR}/${LIB}" | grep Class | cut -d":" -f2 | tr -d "[:blank:]")" != "ELF64" ]; then
continue
fi
fi
echo "${LIB}"
ln -s "${DIR}/${LIB}" "bin/${REPLACE}"
return 0
Expand Down

0 comments on commit 661ed1f

Please sign in to comment.