byoungb byoungb - 27 days ago 8
C++ Question

Get libsass-python to use system libsass library instead of compiling it

Not sure if this is possible but with libsass requiring gcc-c++ >= 4.7 and Centos 6 not having it, I was curious if libsass-python could use the system's libsass instead of compiling it if it exists. I have been able to build a libsass rpm for Centos 6 but python-libsass still tries to compile it itself.

I know that I can use devtoolset-1.1 to install python-libsass (that is how I managed to build the libsass rpm) but I am trying to do all of this with puppet. So I thought if the system had libsass then python-libsass wouldn't have to install it.

I considered adding an issue in the python-libsass git project but thought I should ask here first.

Answer

I did come up with a solution. I created my own packages to install gcc-4.8.2. It was a lot of work and I am not sure if it breaks a bunch of other dependencies down the line. But it worked for the server stack that I needed at the time. I had to create all of the the following packages to get it to work.

  • cpp-4.8.2-8.el6.x86_64.rpm
  • gcc-4.8.2-8.el6.x86_64.rpm
  • gcc-c++-4.8.2-8.el6.x86_64.rpm
  • gcc-gfortran-4.8.2-8.el6.x86_64.rpm
  • libgcc-4.8.2-8.el6.x86_64.rpm
  • libgfortran-4.8.2-8.el6.x86_64.rpm
  • libgomp-4.8.2-8.el6.x86_64.rpm
  • libquadmath-4.8.2-8.el6.x86_64.rpm
  • libquadmath-devel-4.8.2-8.el6.x86_64.rpm
  • libstdc++-4.8.2-8.el6.x86_64.rpm
  • libstdc++-devel-4.8.2-8.el6.x86_64.rpm

So again it was a lot of work, but it did work. But after figuring this out a few months later I was able to just upgrade to Centos 7.

Comments