Reputation: 373
I am trying to build mongod from source pulled from their master branch on their github repo but almost immediately get an error when I run scons all
per these instructions:
IndexError: list index out of range:
File "/home/sdause/Downloads/mongo-master/SConstruct", line 2580:
env.SConscript('src/SConscript', variant_dir='$BUILD_DIR', duplicate=False)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
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 "/home/sdause/Downloads/mongo-master/src/SConscript", line 14:
] + module_sconscripts
File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
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 "/home/sdause/Downloads/mongo-master/src/mongo/SConscript", line 40:
'util',
File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
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 "/home/sdause/Downloads/mongo-master/src/mongo/installer/SConscript", line 7:
'msi',
File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
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 "/home/sdause/Downloads/mongo-master/src/mongo/installer/msi/SConscript", line 89:
major_version = "%s.%s" % (mv[0], mv[1])
Similar errors are printed when I run scons mongo
.
Upvotes: 3
Views: 1419
Reputation: 59
This might help you out
https://groups.google.com/forum/#!msg/mongodb-user/noH__CkufmU/1MjlHo5cCAAJ
When you download the zip file from github that way, it doesn't give you the repository metadata, which is what the build system uses to derive a version number.
If you want to build from source, I recommend either:
Finally, if neither of the above is an option for you, you can explicitly pass the version and git hash that you want to set for the build by passing the SCons Variables MONGO_VERSION and MONGO_GITHASH to your SCons invocation:
scons MONGO_VERSION=x.y.z MONGO_GITHASH=none ...
Upvotes: 5