[SERVER-21791] Failure to compile mongod server and mongo shell from 3.2 sources Created: 08/Dec/15  Updated: 08/Dec/15  Resolved: 08/Dec/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Patrick Perroud Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File config.log    
Operating System: ALL
Steps To Reproduce:

Platform: Ubuntu 15.10 64bit
Steps:
1 - got latest sources from mongo github repository at https://github.com/mongodb/mongo
2 - compile sources following instructions from https://docs.mongodb.org/manual/contributors/tutorial/build-mongodb-from-source/

Participants:

 Description   

$ sudo scons mongod mongo --disable-warnings-as-errors

scons: Reading SConscript files ...
. . .
IndexError: list index out of range:
File "/opt/local/mongodb/mongo-r3.2.0/SConstruct", line 2518:
env.SConscript('src/SConscript', variant_dir='$BUILD_DIR', duplicate=False)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)

etc...



 Comments   
Comment by Ramon Fernandez Marina [ 08/Dec/15 ]

The sources tarball from our downloads page contains a version.json, so that should not be an issue. The only thing I can think of is a transient problem with cloning that prevented the tags from being downloaded...

In any event, I'm glad to hear that you're able to compile, so I'm going to resolve this ticket.

Cheers,
Ramón.

Comment by Patrick Perroud [ 08/Dec/15 ]

I have cloned the repo and restarted compilation: the tests sequence was completed this time and it's now compiling (that will take some time . . .)
So it seems you were correct about a SERVER-21317 duplicate. Thank you to handle this case status as it best fits.

Comment by Patrick Perroud [ 08/Dec/15 ]

I am not sure I did a `git clone` as it was late last night - and I still have a .tar.gz file on my desktop . . .

So - I'll try again - cloning the repository for sure . . .

Comment by Ramon Fernandez Marina [ 08/Dec/15 ]

How did you "download the sources"? Did you clone the repository? What happens when you run "git describe"? Do you have a version.json file?

Without a git repository or a version.json file this is a known issue, and SERVER-21317 is open to address it.

Comment by Patrick Perroud [ 08/Dec/15 ]

And there is the full console output:

$ sudo scons mongod mongo --disable-warnings-as-errors
scons: Reading SConscript files ...
scons version: 2.3.6
python version: 2 7 10 'final' 0
Checking whether the C++ compiler works... yes
Checking whether the C compiler works... yes
Checking if C++ compiler "g++" is GCC... yes
Checking if C compiler "gcc" is GCC... yes
Detected a x86_64 processor
Checking if target OS linux is supported by the toolchain yes
Checking if C compiler is GCC 4.8.2 or newer...yes
Checking if C++ compiler is GCC 4.8.2 or newer...yes
Checking if C compiler supports -Wno-unused-local-typedefs... yes
Checking if C compiler supports -Wno-unused-function... yes
Checking if C compiler supports -Wno-unused-private-field... no
Checking if C compiler supports -Wno-deprecated-declarations... yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... no
Checking if C compiler supports -Wno-unused-const-variable... no
Checking if C compiler supports -Wno-unused-but-set-variable... yes
Checking if C compiler supports -Wno-missing-braces... yes
Checking if C compiler supports -Wno-inconsistent-missing-override... no
Checking if C compiler supports -Wno-potentially-evaluated-expression... no
Checking if C++ compiler supports -Wpessimizing-move... no
Checking if C++ compiler supports -Wredundant-move... no
Checking if we are using libstdc++... yes
Checking if C++ compiler supports -std=c++11... yes
Checking if C compiler supports -std=c99... yes
Checking for C++11... yes
Checking for memset_s... no
Checking for C function strnlen()... yes
Checking for libstdc++ 4.8.2 or better... yes
Checking if we are on a POSIX system... yes
Checking if the POSIX monotonic clock is supported... yes
Checking off_t is 8 bytes... yes
Checking if linker supports -fuse-ld=gold... yes
Checking if C compiler supports -fno-builtin-memcmp... yes
Checking for storage class thread_local yes
Checking for storage class __thread yes
Checking for storage class __declspec(thread) no
Checking for C++11 is_trivially_copyable support... yes
Checking for C++14 std::make_unique support... no
Checking for C library rt... yes
Checking for C library dl... yes
Checking for C++ header file execinfo.h... yes
Checking whether backtrace is declared... yes
Checking whether backtrace_symbols is declared... yes
Checking whether backtrace_symbols_fd is declared... yes
Checking for C library pcap... no
Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... yes
Checking if std::atomic<uint64_t> works... yes
Checking if std::atomic<int32_t> works... yes
Checking if std::atomic<uint32_t> works... yes
Checking if __malloc_hook is declared volatile... yes
Checking for C function fallocate()... yes
Checking for C function sync_file_range()... yes
Checking for C header file x86intrin.h... yes
IndexError: list index out of range:
File "/opt/local/mongodb/mongo-r3.2.0/SConstruct", line 2518:
env.SConscript('src/SConscript', variant_dir='$BUILD_DIR', duplicate=False)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
exec file in call_stack[-1].globals
File "/opt/local/mongodb/mongo-r3.2.0/src/SConscript", line 14:
] + module_sconscripts
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
exec file in call_stack[-1].globals
File "/opt/local/mongodb/mongo-r3.2.0/src/mongo/SConscript", line 40:
'util',
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
exec file in call_stack[-1].globals
File "/opt/local/mongodb/mongo-r3.2.0/src/mongo/installer/SConscript", line 7:
'msi',
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
exec file in call_stack[-1].globals
File "/opt/local/mongodb/mongo-r3.2.0/src/mongo/installer/msi/SConscript", line 89:
major_version = "%s.%s" % (mv[0], mv[1])

Comment by Patrick Perroud [ 08/Dec/15 ]

@Ramon Fernandez: I am using:

$ clang --version
Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/final) (based on LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

$ python --version
Python 2.7.10

$ scons --version
SCons by Steven Knight et al.:
script: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED], 2015/07/31 14:36:10, by bdbaddog on hpmicrodog
engine: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED], 2015/07/31 14:36:10, by bdbaddog on hpmicrodog
engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation

Comment by Patrick Perroud [ 08/Dec/15 ]

@Ramon Fernandez: which "full compilation log" is that? Assuming it was the one in build/scons/config.log, there it is attached. If it was some other log file then please let me know which one . . .

Comment by Ramon Fernandez Marina [ 08/Dec/15 ]

I'm not able to reproduce this error. Can you please upload the full compilation log?

Thanks,
Ramón.

Generated at Thu Feb 08 03:58:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.