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

Compiling can fail with an archive error

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Server Development Platform
    • ALL
    • 18

      I'm on Ubuntu 16.04 with the following versions:

      dgottlieb@chimichurri ~/xgen/mongo2[master]$ ccache --version
      ccache version 3.7.7
      
      Copyright (C) 2002-2007 Andrew Tridgell
      Copyright (C) 2009-2020 Joel Rosdahl
      
      This program is free software; you can redistribute it and/or modify it under
      the terms of the GNU General Public License as published by the Free Software
      Foundation; either version 3 of the License, or (at your option) any later
      version.
      dgottlieb@chimichurri ~/xgen/mongo2[master]$ icecc --version
      ICECC 1.1rc2
      
      dgottlieb@chimichurri ~/xgen/mongo2[master]$ git log -1 --format=%H
      61865d1617e39506c9e0c9202ba2bb50217c7c1e
      

      Invoking scons to build a ninja file with:

      /opt/mongodbtoolchain/v3/bin/python3 ./buildscripts/scons.py --dbg --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars VARIANT_DIR=ninja MONGO_VERSION=$(git describe --abbrev=0 | sed -e "s/^r//") MONGO_GIT_HASH="unknown" --modules="" CCACHE=ccache ICECC=icecc --ninja generate-ninja
      

      In addition to the spammy log lines regarding /proc/cpuinfo (that I've concluded are cosmetic only):

      [3389/3421 ( 99%) 102.418s] Compiling build/ninja/mongo/db/repl/replication_coordinator_impl.o
      Can't read /proc/cpuinfo: No such file or directory
      Can't read /proc/cpuinfo: No such file or directory
      

      My compile will fail with an archiving error such as:

      FAILED: build/ninja/mongo/util/liblatch_analyzer.a 
      PATH=/opt/mongodbtoolchain/v3/bin:/usr/local/bin:/opt/bin:/bin:/usr/bin ICECC_CLANG_REMOTE_CPP=1 CCACHE_NOCPP2=1 ICECC_VERSION=/home/dgottlieb/xgen/mongo2/build/scons/icecc/opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz CCACHE_PREFIX=/usr/bin/icecc /usr/bin/icerun /opt/mongodbtoolchain/v3/bin/ar @build/ninja/mongo/util/liblatch_analyzer.a.rsp
      /opt/mongodbtoolchain/v3/bin/ar: build/ninja/mongo/util/liblatch_analyzer.a: File format not recognized
      

      Contents of the file:

      dgottlieb@chimichurri ~/xgen/mongo2[master]$ ll build/ninja/mongo/util/liblatch_analyzer.a.rsp
      .rw-rw-r-- 88 dgottlieb  3 Mar 16:19 build/ninja/mongo/util/liblatch_analyzer.a.rsp
      dgottlieb@chimichurri ~/xgen/mongo2[master]$ hexdump -c build/ninja/mongo/util/liblatch_analyzer.a.rsp
      0000000   r   c   s   T   D       b   u   i   l   d   /   n   i   n   j
      0000010   a   /   m   o   n   g   o   /   u   t   i   l   /   l   i   b
      0000020   l   a   t   c   h   _   a   n   a   l   y   z   e   r   .   a
      0000030       b   u   i   l   d   /   n   i   n   j   a   /   m   o   n
      0000040   g   o   /   u   t   i   l   /   l   a   t   c   h   _   a   n
      0000050   a   l   y   z   e   r   .   o                                
      0000058
      dgottlieb@chimichurri ~/xgen/mongo2[master]$ cat build/ninja/mongo/util/liblatch_analyzer.a.rsp
      rcsTD build/ninja/mongo/util/liblatch_analyzer.a build/ninja/mongo/util/latch_analyzer.odgottlieb@chimichurri ~/xgen/mongo2[master]$ 
      

            Assignee:
            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: