From v4hn, 7 Years ago, written in Bash.
Embed
  1. if [[ "${OLD_VERSION%%.*}" = 4 ]]; then
  2.  
  3. message "${MESSAGE_COLOR}GCC5 changed the c++11 ABI used to compile new binaries."
  4. message "This breaks the build of all modules that depend on"
  5. message "libraries compiled with GCC4. The best way to avoid this"
  6. message "is to find and rebuild ALL modules that depend on libstd++.so.6${DEFAULT_COLOR}"
  7.  
  8. # rebuilding everything avoids this error in modules
  9. # which depend on modules still using the old ABI:
  10. # > undefined reference to `get_defs[abi:cxx11](unsigned long, bool (*)(unsigned long))'
  11.  
  12. if query "Do you want lunar to attempt to rebuild all affected modules?" ${ASK_FOR_REBUILDS:-y}; then
  13.   CPP_MODULES=$( ( find /usr/lib -name '*.so' ; ls /bin/* /sbin/* /lib/*.so /usr/bin/* /usr/sbin/* ) | while read x
  14.   do
  15.     [[ -n "$(ldd $x | fgrep libstdc++.so.6)" ]] && lvu from $x;
  16.   done | cut -d: -f1 | sort -u )
  17.  
  18.   CPP_MODULES=$(sort_by_dependency $CPP_MODULES)
  19.  
  20.   for m in $CPP_MODULES; do
  21.     lin -c $m
  22.   done
  23. fi
  24.  
  25. fi
  26.