<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:48:49 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-38389] ccache: error: execv of @/tmp/tmpCwyvtv.lnk failed: No such file or directory</title>
                <link>https://jira.mongodb.org/browse/SERVER-38389</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When trying to crosscompile MongoDB 4.0.4 for arm64/aarch64, the build fails with this rather strange error message:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2018-12-04 15:48:56 (01:41:57.323047)] ccache @/tmp/tmpCwyvtv.lnk&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2018-12-04 15:48:56 (01:41:57.544064)] ccache: error: execv of @/tmp/tmpCwyvtv.lnk failed: No such file or directory&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The command line used for the build was &lt;tt&gt;buildscripts/scons.py AR=&quot;aarch64-linux-gnu-ar&quot; CC=&quot;ccache aarch64-linux-gnu-gcc&quot; CXX=&quot;ccache aarch64-linux-gnu-g++&quot; HOST_ARCH=&quot;x86_64&quot; TARGET_ARCH=&quot;aarch64&quot; CCFLAGS=&quot;-march=armv8-a+crc&quot; --disable-warnings-as-errors -j 6 mongod&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;The complete build log is attached as a file.&lt;br/&gt;
&lt;em&gt;Note that the timestamping is happening through my build system. When running from a normal command line it&apos;s not there.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="642803">SERVER-38389</key>
            <summary>ccache: error: execv of @/tmp/tmpCwyvtv.lnk failed: No such file or directory</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="ConnectingMedia">Connecting Media</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Dec 2018 16:12:35 +0000</created>
                <updated>Fri, 7 Dec 2018 08:57:36 +0000</updated>
                            <resolved>Wed, 5 Dec 2018 18:09:16 +0000</resolved>
                                    <version>4.0.4</version>
                                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2083613" author="connectingmedia" created="Fri, 7 Dec 2018 08:57:36 +0000"  >&lt;p&gt;Awesome.&lt;/p&gt;

&lt;p&gt;One thing I&apos;d like to point out is that I am using &lt;tt&gt;ccache&lt;/tt&gt; because it has already been set up and is properly configured for the entire build system. And I&apos;m building a fair bit more than just MongoDB. So I&apos;d like to keep all caches in one place.&lt;/p&gt;</comment>
                            <comment id="2082877" author="acm" created="Thu, 6 Dec 2018 17:15:12 +0000"  >&lt;p&gt;I&apos;ve started a thread on scons-users to discuss: &lt;a href=&quot;https://pairlist4.pair.net/pipermail/scons-users/2018-December/007468.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://pairlist4.pair.net/pipermail/scons-users/2018-December/007468.html&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2082775" author="acm" created="Thu, 6 Dec 2018 16:18:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ConnectingMedia&quot; class=&quot;user-hover&quot; rel=&quot;ConnectingMedia&quot;&gt;ConnectingMedia&lt;/a&gt; - Yes, thanks.&lt;/p&gt;</comment>
                            <comment id="2082735" author="connectingmedia" created="Thu, 6 Dec 2018 15:57:01 +0000"  >&lt;p&gt;And in case you haven&apos;t seen it I contacted you via email. I put the link in the title and my mail&apos;s domain is connectingmedia.de.&lt;/p&gt;</comment>
                            <comment id="2082572" author="acm" created="Thu, 6 Dec 2018 13:37:15 +0000"  >&lt;p&gt;Yes, probably. I will raise this ticket with one of the SCons developers that I know.&lt;/p&gt;</comment>
                            <comment id="2082442" author="connectingmedia" created="Thu, 6 Dec 2018 09:18:00 +0000"  >&lt;p&gt;Ok. Thanks for your time. Do you think that issue should be reported to SCons?&lt;/p&gt;</comment>
                            <comment id="2081499" author="acm" created="Wed, 5 Dec 2018 18:09:16 +0000"  >&lt;p&gt;I&apos;m closing this as Won&apos;t Fix, because it appears to be actually a bug or limitation in SCons, and there are several viable workarounds.&lt;/p&gt;</comment>
                            <comment id="2081498" author="acm" created="Wed, 5 Dec 2018 18:08:13 +0000"  >&lt;p&gt;Having taken a closer look, I&apos;m fairly sure this is a bug in the SCons implementation of temp files for long command lines, where it assumes that the first token of the command line is the the thing that should interpret the file. That doesn&apos;t seem to be correct when using &lt;tt&gt;ccache&lt;/tt&gt;. On the other hand, it sort of feels like &lt;tt&gt;ccache&lt;/tt&gt; would need to do so, because otherwise how can it know that the compilation is a &quot;match&quot; to a previous invocation, unless it examines the arguments passed to the compiler, which are in the file.&lt;/p&gt;

&lt;p&gt;Overall, I&apos;d suggest just avoiding this situation, by either adjusting the &lt;tt&gt;MAXLINELENGTH&lt;/tt&gt; as you have done, or by using the &quot;symlink&quot; method for &lt;tt&gt;ccache&lt;/tt&gt;, or by abandoning &lt;tt&gt;ccache&lt;/tt&gt; and using the built-in SCons caching.&lt;/p&gt;</comment>
                            <comment id="2081264" author="acm" created="Wed, 5 Dec 2018 15:43:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ConnectingMedia&quot; class=&quot;user-hover&quot; rel=&quot;ConnectingMedia&quot;&gt;ConnectingMedia&lt;/a&gt; - Good observation, I&apos;ll take another look. Perhaps there is a bug in SCons where it is assuming that only the first argument of the &quot;compiler&quot; should be propagated to the response file investigation (or in our setup for using response files).&lt;/p&gt;

&lt;p&gt;Regarding your other notes:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Yes, using `getconf` is a fine way. Anything that works for you really.&lt;/li&gt;
	&lt;li&gt;Regarding your question about installation, I think it really depends on whether &lt;tt&gt;/path/to/install&lt;/tt&gt; is writable by the user running SCons to do the overall build. If so, sure, the one shot build should just work. If not, you probably want to do two invocations, so that you don&apos;t run the whole compile step under &lt;tt&gt;sudo&lt;/tt&gt;. The overall &quot;installation&quot; setup for our builds is something we are looking to improve, so behavior here is likely to change in the future.&lt;/li&gt;
	&lt;li&gt;It is normal that the binaries are that large, but the majority of it is debugging information. If you don&apos;t need that, you can &lt;tt&gt;strip&lt;/tt&gt; the binaries, or manually use &lt;tt&gt;objcopy&lt;/tt&gt; to strip the debug info to another file and add the necessary &lt;tt&gt;.gnu_debuglink&lt;/tt&gt; section.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In the future, if you have build system questions, you can reach out on &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-dev&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-dev&lt;/a&gt; first and we can discuss. It is moderated so your posts won&apos;t be immediately visible. I&apos;m also happy to see that you were able to figure out how to get an aarch64 cross of MongoDB going!&lt;/p&gt;

&lt;p&gt;Finally, would you mind sharing some information on your plans regarding MongoDB on ARM? It is an area of personal interest for me. Feel free to reach out via email (it is in my JIRA profile).&lt;/p&gt;

&lt;p&gt;I&apos;m going to leave this ticket open while I take another look at the temp file handling when the &quot;compiler&quot; is two arguments, but given that you have a workaround, I may decide not to fix it.&lt;/p&gt;</comment>
                            <comment id="2081205" author="connectingmedia" created="Wed, 5 Dec 2018 15:15:03 +0000"  >&lt;p&gt;And is it normal the &lt;tt&gt;mongod&lt;/tt&gt; binary is 1GiB in size? &lt;em&gt;(&lt;tt&gt;mongo&lt;/tt&gt; and &lt;tt&gt;mongos&lt;/tt&gt; are several hundred MiB too)&lt;/em&gt;&lt;/p&gt;</comment>
                            <comment id="2080943" author="connectingmedia" created="Wed, 5 Dec 2018 10:57:50 +0000"  >&lt;p&gt;From the looks of it, adding &lt;tt&gt;MAXLINELENGTH=&quot;$(getconf ARG_MAX)&quot;&lt;/tt&gt; solved the issue.&lt;/p&gt;</comment>
                            <comment id="2080821" author="connectingmedia" created="Wed, 5 Dec 2018 07:57:50 +0000"  >&lt;p&gt;Interesting. From what I saw in my build it called &lt;tt&gt;aarch64-linux-gnu-g++ @/tmp/tmp3QOOvI.lnk&lt;/tt&gt;. That worked fine. However in the build where it fails it&apos;s just &lt;tt&gt;ccache @/tmp/tmpCwyvtv.lnk&lt;/tt&gt; instead of the correct compiler call which should be &lt;tt&gt;ccache aarch64-linux-gnu-g++ @/tmp/tmpCwyvtv.lnk&lt;/tt&gt;. So to it looks like that the script isn&apos;t using the right call at the end.&lt;br/&gt;
And I think &lt;tt&gt;MAXLINELENGTH=&quot;$(getconf ARG_MAX)&quot;&lt;/tt&gt; should work nicely, so I don&apos;t have to hardcode a random value but instead can use the actual systems limit.&lt;/p&gt;

&lt;p&gt;Another slightly unrelated question &lt;em&gt;(I haven&apos;t really found a good place to ask about build stuff anywhere besides this place. So my apologies if it&apos;s inappropriate to ask that here)&lt;/em&gt; is if it&apos;s possible to call &lt;tt&gt;buildscripts/scons.py &amp;lt;parameters&amp;gt; --prefix /path/to/install mongod install&lt;/tt&gt; or if they need to be two different calls.&lt;/p&gt;</comment>
                            <comment id="2080111" author="acm" created="Tue, 4 Dec 2018 17:51:17 +0000"  >&lt;p&gt;OK, I can reproduce this. It appears that &lt;tt&gt;ccache&lt;/tt&gt; simply doesn&apos;t understand response files, which is a little weird. You can work around this by adding&lt;br/&gt;
&lt;tt&gt;MAXLINELENGTH=&amp;lt;some-very-big-number&amp;gt;&lt;/tt&gt; to your SCons invocation, and it won&apos;t try to use them. If that works, great. But if you do run into the maximum command line length on your local system, then it won&apos;t. At that point, you would just need to not use &lt;tt&gt;ccache&lt;/tt&gt;. As I mentioned, SCons has its own cache, so you can use that too.&lt;/p&gt;</comment>
                            <comment id="2079938" author="acm" created="Tue, 4 Dec 2018 16:28:12 +0000"  >&lt;p&gt;Sounds good. Meanwhile I&apos;ll see if I can reproduce your problem when using &lt;tt&gt;ccache&lt;/tt&gt; or not.&lt;/p&gt;</comment>
                            <comment id="2079933" author="connectingmedia" created="Tue, 4 Dec 2018 16:25:45 +0000"  >&lt;p&gt;I will try it without &lt;tt&gt;ccache&lt;/tt&gt;. Will get back to you tomorrow, as I&apos;ll leave work before the build will finish (or fail).&lt;/p&gt;</comment>
                            <comment id="2079928" author="acm" created="Tue, 4 Dec 2018 16:18:15 +0000"  >&lt;p&gt;Does the build work if you stop using &lt;tt&gt;ccache&lt;/tt&gt;? Note that SCons has its own caching subsystem, which you can enable with &lt;tt&gt;&amp;#45;&amp;#45;cache&lt;/tt&gt;. You can control where it caches with &lt;tt&gt;&amp;#45;&amp;#45;cache-dir&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="202599" name="build.log" size="2502367" author="ConnectingMedia" created="Tue, 4 Dec 2018 16:06:11 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>16.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 4 Dec 2018 16:18:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 9 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>ConnectingMedia</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 9 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="10026"><![CDATA[ALL]]></customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu4hkn:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2634">Dev Tools 2018-12-17</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ul&gt;
	&lt;li&gt;Try to build version 4.0.4 with the command {
{buildscripts/scons.py AR=&quot;aarch64-linux-gnu-ar&quot; CC=&quot;ccache aarch64-linux-gnu-gcc&quot; CXX=&quot;ccache aarch64-linux-gnu-g++&quot; HOST_ARCH=&quot;x86_64&quot; TARGET_ARCH=&quot;aarch64&quot; CCFLAGS=&quot;-march=armv8-a+crc&quot; --disable-warnings-as-errors -j 6 mongod}
&lt;p&gt;}&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</customfieldvalue>

                        </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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hue0xr:</customfieldvalue>

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