Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4655

Avoid C and C++ compiler incompatibilities

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.0, 4.1.10
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage Engines 2019-03-25

      Description

      When we switched to the new AWS Jenkins test infrastructure, we lost our compiler testing: the Jenkins test looks for paths like /usr/local/clang40, and if they're not found, they skip the tests. The install on the new AWS boxes is in /usr/bin and so we're skipping builds.

      We've installed a reasonable suite of compilers on the new AWS machines, but we're not building with them.

      An additional problem is that workgen won't build with the standard Ubuntu install, we get an error because the install doesn't find the standard include files:

          $ clang++ -o helloworld helloworld.cxx
      helloworld.cxx:1:10: fatal error: 'iostream' file not found
      #include <iostream>
               ^~~~~~~~~~
      1 error generated.
      

      The problem is the C++ include files:

      From Luke Chen: clang++ is not smart enough (or not notified when the standard c++ libraries are installed): https://askubuntu.com/questions/516801/clang-fails-to-compile-simple-hello-world-c-program

      I don't want to limit our builds to the standard MongoDB toolchain, I want the better static analysis we'll get from using lots of compilers (and the MongoDB toolchain usually lags current compiler releases, so we'd never be testing with the most up-to-date compiler releases).

      The standard Ubuntu workaround is to mess with the -I and -L compiler/loader options, but I'm not excited about doing that for a whole list of compilers.

      Absent a better idea, I'm inclined to NOT build workgen by default, that is, add a --enable-c++ option to the build that will skip workgen when building. I don't like that at all, but I'm not willing to give up building with every compiler we can.

      Luke Chen, Alexander Gorrod: I know the goal is to eventually switch all our Jenkins testing to Evergreen. Any thoughts about how we could fix this to make that transition easier?

      tl;dr: Unless someone has a better solution, I'm going to push a branch to disable building workgen by default and update the Jenkins compiler test to build with a complete set of compilers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: