Skip to content

Instantly share code, notes, and snippets.

@atomic-penguin
Last active September 25, 2015 18:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save atomic-penguin/966932 to your computer and use it in GitHub Desktop.
Save atomic-penguin/966932 to your computer and use it in GitHub Desktop.
# Install gcc44 package and update-alternatives (in chkconfig)
yum -y install gcc44 gcc44-c++
# Fixed in dep-selector-gecode 1.0.1
# Check if gcc is already a link
# if [ ! -L /usr/bin/gcc ]; then mv /usr/bin/gcc /usr/bin/gcc41; fi
# if [ ! -L /usr/bin/g++ ]; then mv /usr/bin/g++ /usr/bin/g++41; fi
# Install update-alteratives links for gcc41 and gcc44
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc41 60 --slave /usr/bin/g++ g++ /usr/bin/g++41
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc44 40 --slave /usr/bin/g++ g++ /usr/bin/g++44
# Select gcc44 to compile gecode-3.5.0 in chef::bootstrap_server
# update-alternatives --config gcc
# Repeat and select gcc41 after gecode-3.5.0 in chef::bootstrap_server is complete
# update-alternatives --config gcc
[root@chef gecode-3.5.0]# ./configure
checking for the host operating system... Linux
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for diff... ok
checking for tar... ok
checking for make... ok
checking for sed... ok
checking for perl... ok
checking how to run the C++ preprocessor... g++ -E
configure: error: Your version of gcc is too old. You need at least version 4.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment