Closed garlick closed 6 years ago
@ofaaland - I'm only finding lustre RPMs to download. Is there a release tarball, preferably client only, that one can grab from some official source? Barring that, where's the current public git repo? Thanks...
Objective is to build a "side installed" liblustre to build rquota against, in travis, and other places like my desktop or c9.io.
Hallway conversation - lustre repos are in trasition but ours is https://github.com/LLNL/lustre.git
With this script I can build lustre without the kernel modules, however make install
fails.
#!/bin/bash -e
SIDEROOT=/home/garlick/local
URL=https://github.com/LLNL/lustre/archive/2.10.4_1.chaos.tar.gz
TARBALL=$(basename $URL)
DIR=lustre-$(basename $URL | sed -e s/.tar.gz//)
wget $URL
tar xzf $TARBALL
pushd $DIR
. ./autogen.sh
sed --in-place -e 's/^rootsbin_/sbin_/' lustre/utils/Makefile.am
./configure --disable-modules --prefix=${SIDEROOT} \
--with-systemdsystemunitdir=${SIDEROOT}/etc/systemd \
--sysconfdir=${SIDEROOT}/etc
touch undef.h
make
make install
popd
It fails because it seems like sysconfdir must be hardwired somewhere:
make[3]: Entering directory '/home/garlick/proj/lustre/lustre-2.10.4_1.chaos/lustre/conf'
/bin/mkdir -p '/etc'
/usr/bin/install -c -m 644 ldev.conf lnet_routes.conf lnet.conf '/etc'
/usr/bin/install: cannot create regular file '/etc/ldev.conf': Permission denied
/usr/bin/install: cannot create regular file '/etc/lnet_routes.conf': Permission denied
/usr/bin/install: cannot create regular file '/etc/lnet.conf': Permission denied
Makefile:473: recipe for target 'install-sysconfDATA' failed
make[3]: *** [install-sysconfDATA] Error 1
make[3]: Leaving directory '/home/garlick/proj/lustre/lustre-2.10.4_1.chaos/lustre/conf'
Makefile:585: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/home/garlick/proj/lustre/lustre-2.10.4_1.chaos/lustre/conf'
autoMakefile:485: recipe for target 'install-recursive' failed
It fails because it seems like sysconfdir must be hardwired somewhere
It does look like that. I'll track that down this afternoon.
I did find these:
$ find . -name \*.m4 |xargs grep ^sysconf
./aclocal.m4:sysconfdir='/etc'
./config/lustre-build.m4:sysconfdir='/etc'
Commenting out that line in lustre-build.m4
didn't help. aclocal.m4
is generated, so I assume that's just symptomatic of a problem in the machinery that generates it. That's as far as I got yesterday.
Oh, actually lustre-build.m4
looks like it is the problem. I just needed to edit it before autogen.sh ran aclocal
not after.
Oh, actually lustre-build.m4 looks like it is the problem. I just needed to edit it before autogen.sh ran aclocal not after.
OK, that makes sense. I'll have to figure out how that assignment got in there and push a fix to lustre.
Thanks. For upstream concerns, note the other two workarounds:
mount.lustre
is hardwired to /sbinundef.h
must exist (if not, make fails and my lxterminal window closes!)As mentioned offline, clang found this to complain about when compiling lustre:
clang -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -include /home/travis/build/garlick/rquota/lustre/undef.h -include /home/travis/build/garlick/rquota/lustre/config.h -I/home/travis/build/garlick/rquota/lustre/libcfs/include -I/home/travis/build/garlick/rquota/lustre/lnet/include -I/home/travis/build/garlick/rquota/lustre/lustre/include -I/home/travis/build/garlick/rquota/lustre/lustre/include/uapi -Wno-error -fPIC -g -O2 -Wall -Werror -MT libcfsutil_a-parser.o -MD -MP -MF .deps/libcfsutil_a-parser.Tpo -c -o libcfsutil_a-parser.o `test -f 'util/parser.c' || echo './'`util/parser.c
util/parser.c:485:26: error: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Werror,-Wstrncat-size]
strncat(line, argv[i], sizeof(line) - strlen(line));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
util/parser.c:485:26: note: change the argument to be the free space in the destination buffer minus the terminating null byte
strncat(line, argv[i], sizeof(line) - strlen(line));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(line) - strlen(line) - 1
util/parser.c:835:14: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign]
argc = argc;
~~~~ ^ ~~~~
util/parser.c:836:14: error: explicitly assigning value of variable of type 'char **' to itself [-Werror,-Wself-assign]
argv = argv;
~~~~ ^ ~~~~
3 errors generated.
I'm just going to force the use of gcc to compile lustre, but maybe that's a useful thing to fix upstream.
Not sure if it's feasible to get a lustre filesystem mounted in test, but it may be possible to at least get the library installed and test compilation.