From 1ef17e58134247d8de5d00a83da3a1009cec641d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 11 Sep 2015 18:46:23 +0200 Subject: [PATCH] linux-installer: gcc4/5 warning. --- tools/linux_packaging/build | 12 +++++++++- tools/linux_packaging/stage2.run.in | 35 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 27d53f0d2d..eeef42f129 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -32,6 +32,7 @@ WITH_NLS= EXTERNAL_JACK= VENDOR=Ardour ; EXENAME=ardour +GCC5ABI=false BUILDTYPE="" @@ -86,6 +87,7 @@ while [ $# -gt 0 ] ; do --sysdeps) PRINT_SYSDEPS=1; shift ;; --nls) WITH_NLS=1 ; shift ;; --harvid) WITH_HARVID=1 ; shift ;; + --gcc5abi) GCC5ABI=true ; shift ;; *) #catch all for unknown arguments @@ -655,10 +657,18 @@ chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh # # Add the stage2.run script # -sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/" < stage2.run.in > stage2.run +sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}" < stage2.run.in > stage2.run chmod a+x stage2.run +# gcc4/5 ABI test tool +if [ -e $BUILD_ROOT/tools/gccabicheck/gcc-glibmm-abi-check]; then + cp $BUILD_ROOT/tools/gccabicheck/gcc-glibmm-abi-check $APPBIN +else + echo "!!!ERROR !!! gcc-glibmm-abi-check program is missing. packager will exit without being complete" + exit 1 +fi + #Sanity Check file if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN diff --git a/tools/linux_packaging/stage2.run.in b/tools/linux_packaging/stage2.run.in index f3ea8424f1..6918242adf 100755 --- a/tools/linux_packaging/stage2.run.in +++ b/tools/linux_packaging/stage2.run.in @@ -229,6 +229,41 @@ case `uname -m` in ;; esac +############################# +# Determine C11 stdlibc++ ABI +############################# + +if %REPLACE_GCC5%; then + # Ardour was compiled with gcc5, warn on gcc4 systems + if ! ${NORM_USER} "${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/gcc-glibmm-abi-check --gcc5 > /dev/null"; then + echo "" + echo "WARNING: GCC4/5 libstdc++ ABI Mismatch" + echo "" + echo "Ardour was compiled with gcc5, your system uses an older version of the" + echo "standard c++ library. Plugins on your system may not load or plugin-UIs" + echo "may cause crashes." + echo "" + ANSWER=$(VaildateYesNoQuestion "Continue anyway?") + if test "n" = $ANSWER; then + exit 1 + fi +else + # Ardour was compiled with gcc4, warn on gcc5 systems + if ! ${NORM_USER} "${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/gcc-glibmm-abi-check --gcc4 > /dev/null"; then + echo "" + echo "WARNING: GCC4/5 libstdc++ ABI Mismatch" + echo "" + echo "Ardour was compiled with gcc4, your system uses a newer version of the" + echo "standard c++ library. Plugins on your system may not load or plugin-UIs" + echo "may cause crashes." + echo "" + ANSWER=$(VaildateYesNoQuestion "Continue anyway?") + if test "n" = $ANSWER; then + exit 1 + fi + fi +fi + #################### # Check disk space ####################