<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:03:50 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>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-108] configure --prefix broken for libcfs.ko on master</title>
                <link>https://jira.whamcloud.com/browse/LU-108</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;On master, &quot;configure --prefix=/some/path&quot; appears to be broken for at least libcfs.ko.  I wanted to &quot;make install&quot; into a subdirectory in my home directory, and it failed at this point:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;test -z &lt;span class=&quot;code-quote&quot;&gt;&quot;/bghome/morrone/local/lib&quot;&lt;/span&gt; || /bin/mkdir -p &lt;span class=&quot;code-quote&quot;&gt;&quot;/bghome/morrone/local/lib&quot;&lt;/span&gt;
 /usr/bin/install -c -m 644  libcfsutil.a &lt;span class=&quot;code-quote&quot;&gt;&apos;/bghome/morrone/local/lib&apos;&lt;/span&gt;
 ( cd &lt;span class=&quot;code-quote&quot;&gt;&apos;/bghome/morrone/local/lib&apos;&lt;/span&gt; &amp;amp;&amp;amp; ranlib libcfsutil.a )
test -z &lt;span class=&quot;code-quote&quot;&gt;&quot;&quot; || /bin/mkdir -p &quot;&lt;/span&gt;&quot;
test -z &lt;span class=&quot;code-quote&quot;&gt;&quot;/lib/modules/2.6.32-71.el6.ppc64/updates/kernel/net/lustre&quot;&lt;/span&gt; || /bin/mkdir -p &lt;span class=&quot;code-quote&quot;&gt;&quot;/lib/modules/2.6.32-71.el6.ppc64/updates/kernel/net/lustre&quot;&lt;/span&gt;
 /usr/bin/install -c -m 644 libcfs.ko &lt;span class=&quot;code-quote&quot;&gt;&apos;/lib/modules/2.6.32-71.el6.ppc64/updates/kernel/net/lustre&apos;&lt;/span&gt;
/usr/bin/install: cannot remove `/lib/modules/2.6.32-71.el6.ppc64/updates/kernel/net/lustre/libcfs.ko&apos;: Permission denied
make[4]: *** [install-modulenetDATA] Error 1
make[4]: Leaving directory `/bghome/morrone/lustre/libcfs/libcfs&apos;
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/bghome/morrone/lustre/libcfs/libcfs&apos;
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/bghome/morrone/lustre/libcfs/libcfs&apos;
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/bghome/morrone/lustre/libcfs&apos;
make: *** [install-recursive] Error 1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice it tried to install libcfs.ko into /lib instead of /bghome/morrone/local/lib.  (I had specified --prefix=/bghome/morrone/local).&lt;/p&gt;</description>
                <environment></environment>
        <key id="10418">LU-108</key>
            <summary>configure --prefix broken for libcfs.ko on master</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="5">Cannot Reproduce</resolution>
                                        <assignee username="brian">Brian Murrell</assignee>
                                    <reporter username="morrone">Christopher Morrone</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Mar 2011 15:56:38 +0000</created>
                <updated>Fri, 4 Mar 2011 18:32:57 +0000</updated>
                            <resolved>Fri, 4 Mar 2011 18:32:57 +0000</resolved>
                                    <version>Lustre 2.1.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                            <comments>
                            <comment id="10876" author="pjones" created="Fri, 4 Mar 2011 12:08:04 +0000"  >&lt;p&gt;Brian&lt;/p&gt;

&lt;p&gt;Could you please look at this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="10877" author="brian" created="Fri, 4 Mar 2011 12:28:18 +0000"  >&lt;p&gt;Chris,&lt;/p&gt;

&lt;p&gt;configure&apos;s --prefix is not meant to influence where the modules go &amp;#8211; only the stuff that would normally be in one&apos;s /usr (i/e/ /usr/lib, /usr/bin, etc.)&lt;/p&gt;

&lt;p&gt;What you are looking for is typically implemented in Makefiles as &quot;DESTDIR&quot;.  i.e. &quot;make install DESTDIR=/bghome/morrone/local.  This something that is typically created for packaging systems so that they can install into a given tree and package it up without polluting the system tree.&lt;/p&gt;

&lt;p&gt;So looking to our lustre.spec.in for guidance, we can see in the %install scriptlet:&lt;/p&gt;

&lt;p&gt;make install DESTDIR=$RPM_BUILD_ROOT&lt;/p&gt;

&lt;p&gt;So, indeed our Makefiles use DESTDIR to install &lt;b&gt;everything&lt;/b&gt; under another directory.&lt;/p&gt;

&lt;p&gt;Let me know if that resolves your issue.&lt;/p&gt;</comment>
                            <comment id="10880" author="morrone" created="Fri, 4 Mar 2011 13:55:56 +0000"  >&lt;p&gt;Well, it doesn&apos;t change the fact that &quot;make install&quot; just plain doesn&apos;t work when --prefix is used by itself.  If nothing else, that seems to break the principle of least surprise.&lt;/p&gt;

&lt;p&gt;If --prefix is not functional, then perhaps it should be disabled...but thats pretty standard to autoconf, so that would be pretty odd.&lt;/p&gt;

&lt;p&gt;Is there a reason that --prefix can&apos;t set DESTDIR globally?&lt;/p&gt;

&lt;p&gt;Actually, right now --prefix and DESTDIR don&apos;t play well together, which seems to argue&lt;br/&gt;
 that it really SHOULD be disabled.  If I specify the same path with both --prefix and DESTDIR, they will be concatonated for the non-modules, which is completely wrong.&lt;/p&gt;</comment>
                            <comment id="10883" author="brian" created="Fri, 4 Mar 2011 14:25:19 +0000"  >&lt;p&gt;make install works just fine when configure is given a --prefix because configure&apos;s --prefix is only meant to relocate things that would usually go in /usr.  An example of what configure&apos;s --prefix is for is if you wanted to install the libraries and binaries in /usr/local instead of /usr.  Of course, in such a situation, installing the kernel modules in /usr/local/lib/modules would be wrong since the kernel would then not be able to find them.&lt;/p&gt;

&lt;p&gt;What you are looking to do, relocate the entire installation to a root other than /, really is exactly what make&apos;s DESTDIR is for.&lt;/p&gt;

&lt;p&gt;configure&apos;s --prefix shouldn&apos;t set DESTDIR because they are used for two different things.&lt;/p&gt;

&lt;p&gt;Per your example of setting --prefix and DESTDIR to the same thing and having them concatenated for non-modules... this is entirely the expected behavior given what configure&apos;s --prefix and make&apos;s DESTDIR are for.&lt;/p&gt;

&lt;p&gt;To further exemplify, Imagine you wanted your binaries and libraries, etc. in /usr/local/&lt;/p&gt;
{bin,lib,...}
&lt;p&gt; and you wanted to stage an installation in &quot;/var/tmp/install&quot; (where you want the modules in /var/tmp/install/lib/modules/$(uname -r)/ because /var/tmp/install acts as the &quot;virtual root&quot; of your installation &amp;#8211; i.e. somewhere you could to a &quot;tar -C /var/tmp/install -cvf ... to tar it all up for relocation), you would do:&lt;/p&gt;

&lt;p&gt;$ configure --prefix=/usr/local ...&lt;br/&gt;
$ make&lt;br/&gt;
$ make install DESTDIR=/var/tmp/install&lt;/p&gt;

&lt;p&gt;Here you can see how --prefix and DESTDIR are used together to achieve different goals.&lt;/p&gt;</comment>
                            <comment id="10889" author="morrone" created="Fri, 4 Mar 2011 15:44:34 +0000"  >&lt;blockquote&gt;
&lt;p&gt;$ configure --prefix=/usr/local ...&lt;br/&gt;
$ make&lt;br/&gt;
$ make install DESTDIR=/var/tmp/install&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is broken.  I did this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$ configure --prefix=/bgusr/morrone/local
$ make
$ make install DESTDIR=/bgusr/morrone/local
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And things that should appear under /usr wound up here:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/bgusr/morrone/local/bgusr/morrone/local
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="10891" author="morrone" created="Fri, 4 Mar 2011 15:52:19 +0000"  >&lt;p&gt;Oh wait, I think I see what you meant by &quot;stage&quot; now.&lt;/p&gt;

&lt;p&gt;Seems odd for something that uses configure to work that way.  Usually --prefix has the meaning that DESTDIR does in Lustre, and things like --prefix-exec are used to change various parts.&lt;/p&gt;

&lt;p&gt;But I suppose it&apos;ll do.&lt;/p&gt;</comment>
                            <comment id="10893" author="brian" created="Fri, 4 Mar 2011 16:08:16 +0000"  >&lt;p&gt;I think you see the difference betwen --prefix and DESTDIR now but just to be pedantic about it...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Seems odd for something that uses configure to work that way. Usually --prefix has the meaning that DESTDIR does in Lustre, and things like --prefix-exec are used to change various parts.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;All of this is really not unique to Lustre but actually how most (autoconf based at least) FOSS packages work.  If you look in just about any rpm SPEC file you will see this use of DESTDIR in the %install scriptlet.  If you look at rpmbuild&apos;s output for any such packages (not just lustre) you will also see that rpmbuild typically calls configure explicitly with --prefix=/usr (and typically a ton of other location directives).  i.e. Redhat&apos;s RPM calls configure with:&lt;/p&gt;

&lt;p&gt;+ ./configure ... --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info ...&lt;/p&gt;

&lt;p&gt;So using DESTDIR is a workable solution for you?&lt;/p&gt;</comment>
                            <comment id="10899" author="morrone" created="Fri, 4 Mar 2011 18:14:09 +0000"  >&lt;p&gt;Yes, thanks, that is fine.&lt;/p&gt;</comment>
                            <comment id="10900" author="brian" created="Fri, 4 Mar 2011 18:32:57 +0000"  >&lt;p&gt;Great.  I just wanted to make sure my proposed solution was workable for you before I closed the ticket.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzw17z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10279</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

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