forked from slic3r/Slic3r
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GCC8 instead of 4.9 for travis (slic3r#4666)
* Use GCC8 toolchain * Allow appimage to preload included libgcc_s and stdc++ if necessary. * Need to add header for boost::noncopyable * use const strings for exceptions. * use right header dir for shim * Only use swrast_dri from appimage if it's old or doesn't exist. * added note about where the apprun script was source from, thanks @darealshinji
- Loading branch information
1 parent
8e5a9cb
commit 90f108a
Showing
8 changed files
with
90 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
# Cribbed from https://github.com/darealshinji/AppImageKit-checkrt/blob/master/AppRun.sh | ||
|
||
# some magic to find out the real location of this script dealing with symlinks | ||
DIR=`readlink "$0"` || DIR="$0"; | ||
DIR=`dirname "$DIR"`; | ||
cd "$DIR" | ||
DIR=`pwd` | ||
cd - > /dev/null | ||
|
||
cxxpre="" | ||
gccpre="" | ||
execpre="" | ||
libc6arch="libc6,x86-64" | ||
if [ -n "$APPIMAGE" ] && [ "$(file -b "$APPIMAGE" | cut -d, -f2)" != " x86-64" ]; then | ||
libc6arch="libc6" | ||
fi | ||
|
||
cd "${DIR}/usr" | ||
|
||
if [ -e "./optional/libstdc++/libstdc++.so.6" ]; then | ||
lib="$(PATH="/sbin:$PATH" ldconfig -p | grep "libstdc++\.so\.6 ($libc6arch)" | awk 'NR==1{print $NF}')" | ||
sym_sys=$(tr '\0' '\n' < "$lib" | grep -e '^GLIBCXX_3\.4' | tail -n1) | ||
sym_app=$(tr '\0' '\n' < "./optional/libstdc++/libstdc++.so.6" | grep -e '^GLIBCXX_3\.4' | tail -n1) | ||
if [ "$(printf "${sym_sys}\n${sym_app}"| sort -V | tail -1)" != "$sym_sys" ]; then | ||
cxxpath="./optional/libstdc++:" | ||
fi | ||
fi | ||
|
||
if [ -e "./optional/libgcc/libgcc_s.so.1" ]; then | ||
lib="$(PATH="/sbin:$PATH" ldconfig -p | grep "libgcc_s\.so\.1 ($libc6arch)" | awk 'NR==1{print $NF}')" | ||
sym_sys=$(tr '\0' '\n' < "$lib" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1) | ||
sym_app=$(tr '\0' '\n' < "./optional/libgcc/libgcc_s.so.1" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1) | ||
if [ "$(printf "${sym_sys}\n${sym_app}"| sort -V | tail -1)" != "$sym_sys" ]; then | ||
gccpath="./optional/libgcc:" | ||
fi | ||
fi | ||
|
||
if [ -e "./optional/swrast_dri/swrast_dri.so" ]; then | ||
lib="$(PATH="/sbin:$PATH" ldconfig -p | grep "swrast_dri\.so\ ($libc6arch)" | awk 'NR==1{print $NF}')" | ||
sym_sys=$(tr '\0' '\n' < "$lib" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1) | ||
sym_app=$(tr '\0' '\n' < "./optional/swrast_dri/swrast_dri.so" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1) | ||
if [ "$(printf "${sym_sys}\n${sym_app}"| sort -V | tail -1)" != "$sym_sys" ]; then | ||
swrastpath="./optional/swrast_dri:" | ||
fi | ||
fi | ||
|
||
if [ -n "$cxxpath" ] || [ -n "$gccpath" ] || [ -n "$swrastpath" ]; then | ||
if [ -e "./optional/exec.so" ]; then | ||
execpre="" | ||
export LD_PRELOAD="./optional/exec.so:${LD_PRELOAD}" | ||
fi | ||
export LD_LIBRARY_PATH="${cxxpath}${gccpath}${swrastpath}${LD_LIBRARY_PATH}" | ||
fi | ||
|
||
# disable parameter expansion to forward all arguments unprocessed to the VM | ||
set -f | ||
# run the VM and pass along all arguments as is | ||
LD_LIBRARY_PATH="$DIR/usr/lib:${LD_LIBRARY_PATH}" "${DIR}/usr/bin/perl-local" -I"${DIR}/usr/lib/local-lib/lib/perl5" "${DIR}/usr/bin/slic3r.pl" --gui "$@" | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#/usr/lib/x86_64-linux-gnu/libstdc++.so.6 # needed because of ancient distros and slic3r (and perl for perl reasons) needs modern c++. | ||
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so # Missing? | ||
#/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so # Missing? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters