aboutsummaryrefslogtreecommitdiffstats
path: root/community/julia/find-syslibs
blob: ef252636071df2ec1a4e1c297e08118f62e1c5b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#
# This script adapts output of scanelf to the format produced by
# GNU's "ldconfig -p".
#
# Note: Julia uses "ldconfig -p" as a workaround to find system
# libraries, see https://github.com/JuliaLang/julia/issues/6742.
#
set -e

echo 'libs found on ldpath'
scanelf --ldpath -E ET_DYN -BF '%F %M %S %f' | while read path class soname _; do
	case "$class" in
		ELFCLASS32) arch='i686';;
		ELFCLASS64) arch='x86-64';;
		*) arch="$(uname -m | sed 's/_/-/g')";;
	esac
	printf '\t%s (libc,%s) => %s\n' "$soname" "$arch" "$path"
done