Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47598

locally installed mongodbtoolchains can affect remote icecream builds

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.1, 4.7.0
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Hide

      Modify a local mongodbtoolchain installation to break behavior.
      In this case, Drew's toolchain contained a patched binutils. I was able to reproduce the bug by running

      $ rm -rf build // from mongo root

      $PY buildscripts/scons.py -j8 \
            --link-model=dynamic \
            --modules=“” \
            --variables-files= --variables-files=./etc/scons/mongodbtoolchain_stable_gcc.vars  \
            ICECC=icecc CCACHE= \
            build/opt/third_party/libshim_unwind.so
      

      The error manifests as

      mkdir -p /home/eric/repos/mongo/build/scons/icecc && ICECC_VERSION_TMP=$(/usr/bin/icecc-create-env --gcc /opt/mongodbtoolchain/v3/bin/gcc /opt/mongodbtoolchain/v3/bin/g++ | awk '/^creating .*\.tar\.gz/ { print $2 }') && mv $ICECC_VERSION_TMP build/scons/icecc/opt_mongodbtoolchain_v3_bin_gcc_opt_mongodbtoolchain_v3_bin_g++.tar.gz
      Compiling build/opt/third_party/shim_unwind.dyn.o
      Linking build/opt/third_party/libshim_unwind.so
      /opt/mongodbtoolchain/revisions/91aa820a4e15ec424e214cdc861c1f4aa575a72c/stow/gcc-v3.fox/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld.gold: warning: build/opt/third_party/shim_unwind.dyn.o: section .debug_str contains incorrectly aligned strings; the alignment of those strings won't be preserved
      /opt/mongodbtoolchain/revisions/91aa820a4e15ec424e214cdc861c1f4aa575a72c/stow/gcc-v3.fox/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld.gold: error: treating warnings as errors
      collect2: error: ld returned 1 exit status
      scons: *** [build/opt/third_party/libshim_unwind.so] Error 1
      scons: building terminated because of errors.
      build/opt/third_party/libshim_unwind.so failed: Error 1 

      Show
      Modify a local mongodbtoolchain installation to break behavior. In this case, Drew's toolchain contained a patched binutils. I was able to reproduce the bug by running $ rm -rf build // from mongo root $PY buildscripts/scons.py -j8 \       --link-model=dynamic \       --modules=“” \       --variables-files= --variables-files=./etc/scons/mongodbtoolchain_stable_gcc.vars  \       ICECC=icecc CCACHE= \       build/opt/third_party/libshim_unwind.so The error manifests as mkdir -p /home/eric/repos/mongo/build/scons/icecc && ICECC_VERSION_TMP=$(/usr/bin/icecc-create-env --gcc /opt/mongodbtoolchain/v3/bin/gcc /opt/mongodbtoolchain/v3/bin/g++ | awk '/^creating .*\.tar\.gz/ { print $2 }' ) && mv $ICECC_VERSION_TMP build/scons/icecc/opt_mongodbtoolchain_v3_bin_gcc_opt_mongodbtoolchain_v3_bin_g++.tar.gz Compiling build/opt/third_party/shim_unwind.dyn.o Linking build/opt/third_party/libshim_unwind.so /opt/mongodbtoolchain/revisions/91aa820a4e15ec424e214cdc861c1f4aa575a72c/stow/gcc-v3.fox/lib/gcc/x86_64-mongodb-linux/ 8.2 . 0 /../../../../x86_64-mongodb-linux/bin/ld.gold: warning: build/opt/third_party/shim_unwind.dyn.o: section .debug_str contains incorrectly aligned strings; the alignment of those strings won't be preserved /opt/mongodbtoolchain/revisions/91aa820a4e15ec424e214cdc861c1f4aa575a72c/stow/gcc-v3.fox/lib/gcc/x86_64-mongodb-linux/ 8.2 . 0 /../../../../x86_64-mongodb-linux/bin/ld.gold: error: treating warnings as errors collect2: error: ld returned 1 exit status scons: *** [build/opt/third_party/libshim_unwind.so] Error 1 scons: building terminated because of errors. build/opt/third_party/libshim_unwind.so failed: Error 1  
    • Dev Platform 2020-05-04, Dev Platform 2020-05-18, Dev Platform 2020-06-01, Dev Platform 2020-06-15, Dev Platform 2020-06-29, Dev Platform 2020-07-13, Dev Platform 2020-07-27, Dev Platform 2020-08-10, Dev Platform 2020-08-24

    Description

      My dynamic build was broken due to warnings being marked as errors. The warnings were showed up as,
      warning: build/opt/third_party/shim_unwind.dyn.o: section .debug_str contains incorrectly aligned strings; the alignment of those strings won't be preserved

      I was able to hack around this by using `--disable-warnings-as-errors` in my scons invocation.

      I am running 
      icecc --version
      ICECC 1.1

      OS

      No LSB modules are available.
      Distributor ID: Ubuntu
      Description: Ubuntu 18.04.4 LTS
      Release: 18.04
      Codename: bionic

      Toolchain version

      91aa820a4e15ec424e214cdc861c1f4aa575a72c
      

      Attachments

        Issue Links

          Activity

            People

              andrew.morrow@mongodb.com Andrew Morrow
              eric.cox@mongodb.com Eric Cox
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: