Re: Re: GCC Issue: Compiling Mongodb 3.0 from source

From: Andrew Morrow <andrew.morrow@xxxxxxxxxxx>
To: "mongodb-user@xxxxxxxxxxxxxxxx" <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Wed, 11 May 2016 08:45:12 -0400
Why ads?
Hi -

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:

- Making a complete git clone of the repository and checking out the
version you are interested in building, or
- Downloading a source archive
<https://www.mongodb.com/download-center#community>, which will contain a
pre-interpolated version number.

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 ...

Thanks,
Andrew




On Wed, May 11, 2016 at 12:31 AM, Astro <andhareatish@xxxxxxxxx> wrote:

Thanks for looking into it.


Following are the steps to reproduce the issue:

*wget https://github.com/mongodb/mongo/archive/v3.0.zip
<https://github.com/mongodb/mongo/archive/v3.0.zip>*
*unzip v3.0.zip*
*scons mongod mongos mongo *

I ran into another issue, below is the stacktrace:

scons: Reading SConscript files ...
scons version: 2.3.0
python version: 2 7 6 'final' 0
Checking whether the C++ compiler worksyes
Checking whether the C compiler worksyes
Checking if C++ compiler "g++" is GCC... yes
Checking if C compiler "gcc" is GCC... 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 target architecture is 32-bit x86...no
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 we are using libstdc++... yes
Checking for libstdc++ 4.6.0 or better... yes
Checking if C++ compiler supports -std=c++11... yes
Checking if C compiler supports -std=c99... yes
Checking if we are on a POSIX system... yes
Checking if the POSIX monotonic clock is supported... yes
Checking if C compiler supports -fno-builtin-memcmp... yes
Checking for __thread... yes
Checking for C++11 <atomic> support... yes
Checking for C++11 is_trivially_copyable 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 __malloc_hook is declared volatile... yes
IndexError: list index out of range:
  File "/xvdh/git-debug/mongo-3.0/SConstruct", line 2576:
    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 "/xvdh/git-debug/mongo-3.0/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 "/xvdh/git-debug/mongo-3.0/src/mongo/SConscript", line 57:
    'util/mongoutils/SConscript'])
  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 "/xvdh/git-debug/mongo-3.0/src/mongo/installer/msi/SConscript",
line 90:
    major_version = "%s.%s" % (mv[0], mv[1])

--
You received this message because you are subscribed to the Google Groups
"mongodb-user"
group.

For other MongoDB technical support options, see:
https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/6c920fa4-803c-44d8-ad91-a95395db1ec1%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/6c920fa4-803c-44d8-ad91-a95395db1ec1%40googlegroups.com?utm_medium=email&utm_source=footer>
.

For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHX05qE8mqdoVymN16cKX3a6oMbaNCAcA-3TdCR0ifn9fOjK-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?