[ET Trac] #2822: support full paths to libraries in LIBS variables
Roland Haas
trac-noreply at einsteintoolkit.org
Wed Sep 4 11:33:12 CDT 2024
#2822: support full paths to libraries in LIBS variables
Reporter: Roland Haas
Status: new
Milestone:
Version:
Type: bug
Priority: minor
Component:
Comment (by Roland Haas):
A possible workaround in `bash_utils.sh` is
```shell
# NOTE: This breaks if pkg-config returns quotes strings, i.e., path names
# with strings in them. It doesn't seems to happen in practice.
# If it does: let us know what pkg-config prints in that case, and we
# can try to fix it.
local INC_DIRS=$($PKGCONFIG --cflags-only-I "$STATIC" "$LIBNAME" | perl -pe 's/(^| )+-I/\1/g')
local LIB_DIRS=$($PKGCONFIG --libs-only-L "$STATIC" "$LIBNAME" | perl -pe 's/(^| )+-L/\1/g')
local LIBS=""
local ALLLIBS=$($PKGCONFIG --libs-only-l "$STATIC" "$LIBNAME" | perl -pe 's/(^| )+-l/\1/g')
for lib in $ALLLIBS; do
if [ "${lib%/*}" != "$lib" ] ; then
LIB_DIRS="$LIB_DIRS ${lib%/*}"
lib=${lib##*/lib}
lib=${lib%.*}
fi
LIBS="$LIBS $lib"
done
```
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2822/support-full-paths-to-libraries-in-libs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/trac/attachments/20240904/bd58fc65/attachment-0001.htm>
More information about the Trac
mailing list