<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:19:19 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-28879] MongoDB failed to build due to ImportError: No module named typing. </title>
                <link>https://jira.mongodb.org/browse/SERVER-28879</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I tried to build MongoDB with master branch latest revision on Windows. It failed to build due to ImportError: No module named typing. This issue can be repro from revision c776e095 (&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c776e095ac25d0426624f4a84c03f0094c3c661f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c776e095ac25d0426624f4a84c03f0094c3c661f&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Python module typing is supported from python 3.5. But SCons does not run under Python version 3.5. Python 3 and above are not yet supported. Could you please take a look at this? Thanks!&lt;/p&gt;

&lt;p&gt;You can repro this issue as the steps below:&lt;br/&gt;
1. git clone -c core.autocrlf=true &lt;a href=&quot;https://github.com/mongodb/mongo&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo&lt;/a&gt; D:\MongoDB\src&lt;br/&gt;
2. Open a VS 2015 x64 command prompt and browse to D:\MongoDB\src&lt;br/&gt;
3. scons all -j4&lt;/p&gt;

&lt;p&gt;Error info:&lt;br/&gt;
C:\tools\Python2\python.exe buildscripts/idl/idlc.py --base_dir build/opt --header build\opt\mongo\idl\unittest_gen.h --output build\opt\mongo\idl\unittest_gen.cpp src\mongo\idl\unittest.idl&lt;br/&gt;
Traceback (most recent call last):&lt;br/&gt;
  File &quot;buildscripts/idl/idlc.py&quot;, line 23, in &amp;lt;module&amp;gt;&lt;br/&gt;
    import idl.compiler&lt;br/&gt;
  File &quot;D:\MongoDB\src\buildscripts\idl\idl\compiler.py&quot;, line 26, in &amp;lt;module&amp;gt;&lt;br/&gt;
    from typing import Any, List&lt;br/&gt;
&lt;font color=&quot;red&quot;&gt;ImportError: No module named typing&lt;/font&gt;&lt;br/&gt;
scons: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;build\opt\mongo\idl\unittest_gen.cpp&amp;#93;&lt;/span&gt; Error 1&lt;/p&gt;
</description>
                <environment>Windows Server 2012 R2 + VS2017 RTM + Python 2.7 + SCons 2.5.1</environment>
        <key id="375785">SERVER-28879</key>
            <summary>MongoDB failed to build due to ImportError: No module named typing. </summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="mark.benvenuto@mongodb.com">Mark Benvenuto</assignee>
                                    <reporter username="KarenHuang2017">KarenHuang [X]</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Apr 2017 10:36:42 +0000</created>
                <updated>Fri, 28 Jul 2017 18:49:44 +0000</updated>
                            <resolved>Fri, 28 Jul 2017 18:49:44 +0000</resolved>
                                                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1554408" author="karenhuang2017" created="Fri, 21 Apr 2017 05:42:02 +0000"  >&lt;p&gt;Thanks for your quick response! Running command &quot;pip.exe install -r buildscripts\requirements.txt&quot; can install typing module. And this resolved my problem. Thank you again!&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="1553642" author="mark.benvenuto" created="Thu, 20 Apr 2017 14:48:56 +0000"  >&lt;p&gt;Yes, I could just import typing and yaml. These are the only two strictly needed, and I do not believe these requirements are going to grow any time soon. This would work as long as scons and the idl compiler use the same version of python.&lt;/p&gt;</comment>
                            <comment id="1553639" author="behackett" created="Thu, 20 Apr 2017 14:44:41 +0000"  >&lt;p&gt;It looks like you could attempt to import all necessary modules in idl.py&lt;/p&gt;</comment>
                            <comment id="1553636" author="behackett" created="Thu, 20 Apr 2017 14:41:11 +0000"  >&lt;p&gt;Can you import packages during the build process? Most of those requirements aren&apos;t actually needed to build the server. You could just try to import typing and re-raise ImportError with a more helpful error message if it&apos;s not available.&lt;/p&gt;</comment>
                            <comment id="1553627" author="mark.benvenuto" created="Thu, 20 Apr 2017 14:35:23 +0000"  >&lt;p&gt;There are a few options:&lt;br/&gt;
You could use &lt;a href=&quot;http://stackoverflow.com/questions/16294819/how-to-check-if-my-python-has-all-required-packages&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pkg_resources&lt;/a&gt; if the &lt;tt&gt;setuptools&lt;/tt&gt; is installed. This is an optional site-package, and you would need to duplicate the contents of &lt;tt&gt;requirements.txt&lt;/tt&gt; into python code.&lt;/p&gt;

&lt;p&gt;You could runl &lt;tt&gt;pip check&lt;/tt&gt; if &lt;tt&gt;pip&lt;/tt&gt; is installed and the user has a recent version (&amp;gt; 8.0 I believe is the minimum, 1.x does not work). This is also optional site-package. You would then either try to search for the pip executable or try to load the pip program into the current python interpreter.&lt;/p&gt;</comment>
                            <comment id="1553590" author="acm" created="Thu, 20 Apr 2017 14:13:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mark.benvenuto&quot; class=&quot;user-hover&quot; rel=&quot;mark.benvenuto&quot;&gt;mark.benvenuto&lt;/a&gt; - Can we look into having SCons at startup probe the python environment for the requirements in the requirements.txt file and give a helpful error if they are not satisfied?&lt;/p&gt;</comment>
                            <comment id="1553583" author="mark.benvenuto" created="Thu, 20 Apr 2017 14:04:39 +0000"  >&lt;p&gt;We have a python requirements file here: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/buildscripts/requirements.txt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/buildscripts/requirements.txt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can setup the necessary python modules for building by running:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;pip.exe install -r buildscripts\requirements.txt&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Also, please note that only VS 2015 is supported at this time. VS 2017 RTM is not supported by either SCons or the MongoDB source code.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="375734">SERVER-28881</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 20 Apr 2017 14:04:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 42 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 42 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[Windows]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>bernie@mongodb.com</customfieldvalue>
            <customfieldvalue>KarenHuang2017</customfieldvalue>
            <customfieldvalue>mark.benvenuto@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht63rj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraenr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrktcf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>