0

In my Continuous Integration set-up in Jenkins, I have two Cpp projects. One project requires the latest G++ 4.8.2 (already installed in /usr/bin) but the other project requires an older version of G++ 4.6.3 (not yet installed). I am using make file for the build process. The OS running on the server is Linux Mint 17 Qiana. Please advise a suitable method. Any help is appreciated.

Yeshwanth
  • 1
  • 2
  • 1
    What is so peculiar in the other project to require exactly GCC 4.6? I believe it is the symptom of some bug. Can't you correct it? BTW, you could run `make CXX=g++-4.6` if absolutely needed! – Basile Starynkevitch Sep 18 '14 at 05:13
  • Usually I put different builds in a non-system location, and use [environment modules](http://modules.sourceforge.net/) to switch. This is an easy way to set and unset a number of environment variables and check for conflicts. – juanchopanza Sep 18 '14 at 05:14
  • @BasileStarynkevitch: Thank you for your suggestion. The code is a library developed by another team and the instructions are to strictly run on g++version lesser that 4.6.3. so I can't change that and I have to set up the CI for them on the server along with other project which requires 4.8.2 version. we are also expecting more projects to be included in the CI & each may demand a specific version of gcc. A generic solution is more preferable. any best practice that can be followed? – Yeshwanth Sep 18 '14 at 08:30
  • You should try using a more recent version of GCC. It probably should work, even if the other team did not try – Basile Starynkevitch Sep 18 '14 at 11:17
  • @BasileStarynkevitch: Actually there is a read only file in the library which checks for the compiler version and asserts if the version is higher than 4.6. I used your suggestion of make CXX=g++-4.6. it works. But any best practice that can be followed? anyone, any other method? – Yeshwanth Sep 19 '14 at 09:58
  • You should report a bug to the other team. Requiring exactly GCC 4.6 is not reasonable (at least, they should simply *recommend* a [GCC](http://gcc.gnu.org/) as least as recent as 4.6 - or later!), and you should be able to compile with another compiler like [Clang](http://clang.llvm.org/) – Basile Starynkevitch Sep 19 '14 at 10:17

0 Answers0