gluster / gluster-block

A framework for gluster block storage
GNU General Public License v2.0
74 stars 32 forks source link

configure: error: gfapi library >= 3.6 is required to build gluster-block #282

Closed perrynzhou closed 3 years ago

perrynzhou commented 3 years ago

@pranithk @pkalever pkaleverpkalever i build glusterfs with source,but when i install gluster-block failed?how to solove that?

[root@szdpl1486 gluster-block]# gluster --version
glusterfs 2020.10.15
Repository revision: git://git.gluster.org/glusterfs.git
Copyright (c) 2006-2016 Red Hat, Inc. <https://www.gluster.org/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.
[root@szdpl1486 gluster-block]# ls -l  /usr/local/lib |grep glu
drwxr-xr-x. 3 root root      24 Oct 15 17:53 glusterfs
-rwxr-xr-x. 1 root root     984 Oct 15 17:53 libglusterd.la
lrwxrwxrwx. 1 root root      20 Oct 15 17:53 libglusterd.so -> libglusterd.so.0.0.1
lrwxrwxrwx. 1 root root      20 Oct 15 17:53 libglusterd.so.0 -> libglusterd.so.0.0.1
-rwxr-xr-x. 1 root root  254320 Oct 15 17:53 libglusterd.so.0.0.1
-rwxr-xr-x. 1 root root     990 Oct 15 17:53 libglusterfs.la
lrwxrwxrwx. 1 root root      21 Oct 15 17:53 libglusterfs.so -> libglusterfs.so.0.0.1
lrwxrwxrwx. 1 root root      21 Oct 15 17:53 libglusterfs.so.0 -> libglusterfs.so.0.0.1
-rwxr-xr-x. 1 root root 3676624 Oct 15 17:53 libglusterfs.so.0.0.1
[root@szdpl1486 gluster-block]# 
pkalever commented 3 years ago

@perrynzhou Yeah, I think I have seen this before with some other user too. When you are compiling glusterfs from source please use flag --prefix=/usr at the configure, and then retry compiling gluster-block.

perrynzhou commented 3 years ago

@pkalever the same error

[root@szdpl1486 gluster-block]# ls -l /usr/lib|grep gluster
drwxr-xr-x.  3 root root      24 Oct 15 18:43 glusterfs
-rwxr-xr-x.  1 root root     978 Oct 15 18:43 libglusterd.la
lrwxrwxrwx.  1 root root      20 Oct 15 18:43 libglusterd.so -> libglusterd.so.0.0.1
lrwxrwxrwx.  1 root root      20 Oct 15 18:43 libglusterd.so.0 -> libglusterd.so.0.0.1
-rwxr-xr-x.  1 root root  254312 Oct 15 18:43 libglusterd.so.0.0.1
-rwxr-xr-x.  1 root root     984 Oct 15 18:43 libglusterfs.la
lrwxrwxrwx.  1 root root      21 Oct 15 18:43 libglusterfs.so -> libglusterfs.so.0.0.1
lrwxrwxrwx.  1 root root      21 Oct 15 18:43 libglusterfs.so.0 -> libglusterfs.so.0.0.1
-rwxr-xr-x.  1 root root 3676608 Oct 15 18:43 libglusterfs.so.0.0.1
[root@szdpl1486 gluster-block]# ./autogen.sh && ./configure   --enable-tirpc=no
autogen.sh: start libtoolize to get ltmain.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autogen.sh: reconfigure with autoreconf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --force -I m4
checking for rpc/pmap_clnt.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GFAPI... no
checking for GFAPI... no
configure: error: gfapi library >= 3.6 is required to build gluster-block
pkalever commented 3 years ago

check the location of libgfapi.so library.

If it's not in your standard path, then try exporting through the LD_LIBARARY_PATH variable

perrynzhou commented 3 years ago

@pkalever that is a bug.change LD_LIBRARY_PATH still happen

[root@szdpl1486 gluster-block]# ls -l /usr/lib |grep gluster
drwxr-xr-x.  3 root root      24 Oct 15 18:43 glusterfs
-rwxr-xr-x.  1 root root     978 Oct 15 18:43 libglusterd.la
lrwxrwxrwx.  1 root root      20 Oct 15 18:43 libglusterd.so -> libglusterd.so.0.0.1
lrwxrwxrwx.  1 root root      20 Oct 15 18:43 libglusterd.so.0 -> libglusterd.so.0.0.1
-rwxr-xr-x.  1 root root  254312 Oct 15 18:43 libglusterd.so.0.0.1
-rwxr-xr-x.  1 root root     984 Oct 15 18:43 libglusterfs.la
lrwxrwxrwx.  1 root root      21 Oct 15 18:43 libglusterfs.so -> libglusterfs.so.0.0.1
lrwxrwxrwx.  1 root root      21 Oct 15 18:43 libglusterfs.so.0 -> libglusterfs.so.0.0.1
-rwxr-xr-x.  1 root root 3676608 Oct 15 18:43 libglusterfs.so.0.0.1
[root@szdpl1486 gluster-block]# export LD_LIBRARY_PATH=/usr/lib:/usr/lib64
[root@szdpl1486 gluster-block]# ./configure --enable-tirpc=no                
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking rpc/pmap_clnt.h presence... yes
checking for rpc/pmap_clnt.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GFAPI... no
checking for GFAPI... no
configure: error: gfapi library >= 3.6 is required to build gluster-block
perrynzhou commented 3 years ago

@pkalever may you help me how to solove it?

perrynzhou commented 3 years ago

@pkalever that always has problem?how to fixed that problem

pkalever commented 3 years ago

@perrynzhou this looks like environment-related, can you add details about your working environment and reproducer steps? I will have to try to reproduce it locally.

pkalever commented 3 years ago

Hope you fixed it by now, feel free to reopen as required.