Practical way to build nfs-ganesha from source on Ubuntu 16.04 Linux


Practical way to build nfs-ganesha from source on Ubuntu 16.04 Linux

This post is motivated from the issues faced while building nfs-ganesha from sources.
Refer to link https://github.com/nfs-ganesha/nfs-ganesha/wiki/Compiling for official steps.

I faced issues while compling on Ubuntu 16.04 and after lot of debugging come up with below steps to build nfs-ganesha on Ubuntu 16.04

# git clone https://github.com/nfs-ganesha/nfs-ganesha.git
# cd nfs-ganesha
# git submodule update --init --recursive
# apt-get install g++ libboost-dev cmake make git doxygen
# apt-get install  build-essential libglu1-mesa-dev libc6-dev
# cmake $PWD/src
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

# make
Scanning dependencies of target ntirpc
[  0%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/auth_none.c.o
[  0%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/auth_unix.c.o
[  1%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/authunix_prot.c.o
[  1%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/bindresvport.c.o
[  1%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/bsd_epoll.c.o
[  1%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/city.c.o
[  2%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_bcast.c.o
[  2%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_dg.c.o
[  2%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_generic.c.o
[  2%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_perror.c.o
[  2%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_raw.c.o
[  3%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_simple.c.o
[  3%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/clnt_vc.c.o
[  3%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/getnetconfig.c.o
[  3%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/getnetpath.c.o
[  4%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/getpeereid.c.o
[  4%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/getrpcent.c.o
[  4%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/getrpcport.c.o
[  4%] Building C object libntirpc/src/CMakeFiles/ntirpc.dir/mt_misc.c.o

.
.
.
.
[ 96%] Built target FsalCore
Scanning dependencies of target ganesha.nfsd
[ 96%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/nfs_main.c.o
[ 96%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/fsal_convert.c.o
[ 96%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/commonlib.c.o
[ 97%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/fsal_manager.c.o
[ 97%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/access_check.c.o
[ 97%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/fsal_config.c.o
[ 97%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/default_methods.c.o
[ 98%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/common_pnfs.c.o
[ 98%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/fsal_destroyer.c.o
[ 98%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL/fsal_helper.c.o
[ 98%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL_UP/fsal_up_top.c.o
[100%] Building C object MainNFSD/CMakeFiles/ganesha.nfsd.dir/__/FSAL_UP/fsal_up_async.c.o
[100%] Linking C executable ganesha.nfsd
[100%] Built target ganesha.nfsd

# make install
[ 17%] Built target ntirpc
[ 17%] Built target log
[ 19%] Built target config_parsing
[ 22%] Built target cidr
[ 23%] Built target avltree
[ 25%] Built target hashtable
[ 29%] Built target sal
[ 30%] Built target rpcal
[ 52%] Built target nfsproto
[ 52%] Built target nfs4callbacks
[ 54%] Built target nfs_mnt_xdr
[ 55%] Built target gos
[ 58%] Built target nlm
[ 59%] Built target string_utils
[ 60%] Built target rquota
[ 68%] Built target 9p
[ 69%] Built target sm_notify.ganesha
[ 70%] Built target netgroup_cache
[ 70%] Built target hash
[ 73%] Built target support
[ 75%] Built target uid2grp
[ 77%] Built target fsalnull
[ 80%] Built target fsalmdcache
[ 81%] Built target fsalpseudo
[ 82%] Built target fsalproxy
[ 87%] Built target fsalgpfs
[ 87%] Built target fsal_os
[ 90%] Built target fsalvfs
[ 91%] Built target fsalmem
[ 91%] Built target idmap
[ 94%] Built target MainServices
[ 96%] Built target FsalCore
[100%] Built target ganesha.nfsd
Linking C shared library CMakeFiles/CMakeRelink.dir/libntirpc.so
Linking C shared module CMakeFiles/CMakeRelink.dir/libfsalnull.so
Linking C shared module CMakeFiles/CMakeRelink.dir/libfsalproxy.so
Linking C shared module CMakeFiles/CMakeRelink.dir/libfsalgpfs.so
Linking C shared module CMakeFiles/CMakeRelink.dir/libfsalvfs.so
Linking C shared library CMakeFiles/CMakeRelink.dir/libfsalmem.so
Linking C executable CMakeFiles/CMakeRelink.dir/ganesha.nfsd
Install the project...

Install the project...
-- Install configuration: "Debug"
-- Installing: /etc/ganesha/ganesha.conf
-- Installing: /usr/share/doc/ganesha/config_samples
-- Installing: /usr/share/doc/ganesha/config_samples/gpfs.ganesha.nfsd.conf
-- Installing: /usr/share/doc/ganesha/config_samples/gpfs.conf
-- Installing: /usr/share/doc/ganesha/config_samples/rgw_bucket.conf
-- Installing: /usr/share/doc/ganesha/config_samples/xfs.conf

.
.
.
.
.
.
-- Installing: /usr/include/ntirpc/namespace.h
-- Installing: /usr/include/ntirpc/fpmath.h
-- Installing: /usr/include/ntirpc/version.h
-- Installing: /usr/lib/libntirpc.so.1.5.1
-- Installing: /usr/lib/libntirpc.so.1.5
-- Installing: /usr/lib/libntirpc.so
-- Installing: /usr/lib/ganesha/libfsalnull.so
-- Installing: /usr/lib/ganesha/libfsalproxy.so
-- Installing: /usr/lib/ganesha/libfsalgpfs.so
-- Installing: /usr/lib/ganesha/libfsalvfs.so
-- Installing: /usr/lib/ganesha/libfsalmem.so.4.2.0
-- Installing: /usr/lib/ganesha/libfsalmem.so.4
-- Installing: /usr/lib/ganesha/libfsalmem.so
-- Installing: /usr/bin/ganesha.nfsd

#
#echo That's it.
That's it.


Leave comments if this post helps in any ways.

Note: We at TechSutram take our ethics very seriously. More information about it can be found here.
Mandar Pise Opinions expressed by techsutram contributors are their own. More details

Mandar is a seasoned software professional for more than a decade. He is Cloud, AI, IoT, Blockchain and Fintech enthusiast. He writes to benefit others from his experiences. His overall goal is to help people learn about the Cloud, AI, IoT, Blockchain and Fintech and the effects they will have economically and socially in the future.

1 comment:

  1. Thank you for this post, really save-me a lots of time on research how to compile this on Debian 8(jessie).
    You would like ta add an extra step to checkout the latest (or desired) code release, like:

    # git checkout V2.7.0.1

    This should be executed prior cmake command.
    All releases are listed at https://github.com/nfs-ganesha/nfs-ganesha/releases

    ReplyDelete

    Your valuable comments are welcome. (Moderated)