<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
On Jul 29, 2024, at 12:32, Apostolis Stamatis via lustre-discuss <<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>> wrote:<br class="">
<div>
<blockquote type="cite" class=""><br class="Apple-interchange-newline">
<div class="">
<div class="">Hello all,<br class="">
<br class="">
I am trying to use the lustreapi in a project and I need to build it without sudo privileges in order to compile code that uses it. I don't need to build the whole client support, my end goal is only to compile code using lustreapi.h<br class="">
<br class="">
What I am doing is:<br class="">
<br class="">
```<br class="">
<br class="">
sh autogen.sh<br class="">
<br class="">
./configure --disable-server --disable-modules --disable-tests --prefix=/home/user/thirdparty/<br class="">
<br class="">
make install<br class="">
<br class="">
```<br class="">
<br class="">
This fails with the error (output shortened to what I think is relevant)<br class="">
<br class="">
```<br class="">
<br class="">
make[3]: Entering directory '/home/user/lustre-release/libcfs/libcfs'<br class="">
/bin/bash ../../libtool --tag=CC --mode=link gcc -fPIC -g -O2 -Wall -Werror -o
<a href="http://libcfs.la" class="">libcfs.la</a> util/libcfs_la-string.lo util/libcfs_la-nidstrings.lo util/libcfs_la-param.lo util/libcfs_la-parser.lo util/libcfs_la-l_ioctl.lo -lkeyutils<br class="">
libtool: link: rm -fr .libs/libcfs.a .libs/<a href="http://libcfs.la" class="">libcfs.la</a><br class="">
rm: cannot remove '.libs/libcfs.a': Permission denied<br class="">
rm: cannot remove '.libs/<a href="http://libcfs.la" class="">libcfs.la</a>': Permission denied<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
It looks like these files are not owned by the user running this command. Maybe there was previously a "sudo make" or similar run, and these directories/files are owned by root?</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class="">libtool: link: ar cr .libs/libcfs.a util/.libs/libcfs_la-string.o util/.libs/libcfs_la-nidstrings.o util/.libs/libcfs_la-param.o util/.libs/libcfs_la-parser.o util/.libs/libcfs_la-l_ioctl.o<br class="">
ar: could not create temporary file whilst writing archive: no more archived files<br class="">
<br class="">
```<br class="">
<br class="">
When running `sudo make install`, it works<br class="">
<br class="">
<br class="">
So my questions are:<br class="">
<br class="">
1) Is it possible to run make install without sudo for my use case<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
I think yes, though I haven't tested this myself. The errors above indicate a permission error and not something wrong with the build.<br class="">
<div class="">
<div class=""><br class="">
</div>
</div>
<blockquote type="cite" class="">
<div class="">
<div class="">2) Is there a better way to only build the support for using lustreapi (assuming that what is required is only the library liblustreapi.a and the include headers)<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
It would make more sense to build and install the libraries together with the modules so that they are a consistent version.</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Lustre Principal Architect</div>
<div>Whamcloud</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</body>
</html>