Skip to content

Instantly share code, notes, and snippets.

@gqmelo
gqmelo / libstdcxx_wrapper.sh
Last active June 29, 2017 18:09
Wrapper which chooses the newest libstdc++ and execute a command
#!/usr/bin/env bash
# BUNDLED_LIBSTDCXX_DIR=DIR_TO_BUNDLED_LIBSTDCXX
print_info() {
echo "$1" >&2
}
print_info "Looking for libstdc++ ..."
SYSTEM_LIBSTDCXX="`/sbin/ldconfig -p | grep x86-64 | grep libstdc++ | awk '{print $4}'`"