ntrdma/ntrdma

compile libntrdma failed

Closed this issue · 4 comments

hi,

I failed to compile the libntrdma on centos 7. Here is the result:


[root@localhost libntrdma]# git fetch --all
Fetching origin
[root@localhost libntrdma]# ll
total 0
[root@localhost libntrdma]# git reset --hard origin/master
HEAD is now at 3a272bd NTRDMA Initial Commit for Open Source (libntrdma)
[root@localhost libntrdma]# ll
total 40
-rw-r--r-- 1 root root     0 Nov  6 04:32 AUTHORS
-rw-r--r-- 1 root root     0 Nov  6 04:32 ChangeLog
drwxr-xr-x 2 root root    23 Nov  6 04:32 config
-rw-r--r-- 1 root root  1938 Nov  6 04:32 configure.in
-rw-r--r-- 1 root root 19823 Nov  6 04:32 COPYING
-rw-r--r-- 1 root root     0 Nov  6 04:32 INSTALL
-rw-r--r-- 1 root root   605 Nov  6 04:32 libntrdma.spec.in
-rw-r--r-- 1 root root   170 Nov  6 04:32 Makefile.am
-rw-r--r-- 1 root root     0 Nov  6 04:32 NEWS
-rw-r--r-- 1 root root    14 Nov  6 04:32 ntrdma.driver
-rw-r--r-- 1 root root   456 Nov  6 04:32 README
drwxr-xr-x 2 root root    48 Nov  6 04:32 src
[root@localhost libntrdma]# libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: linking file `config/ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
[root@localhost libntrdma]# aclocal
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
[root@localhost libntrdma]# autoconf
[root@localhost libntrdma]# autoheader
[root@localhost libntrdma]# automake
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:8: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.in:8: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.in:9: error: required file 'config/config.guess' not found
configure.in:9:   'automake --add-missing' can install 'config.guess'
configure.in:9: error: required file 'config/config.sub' not found
configure.in:9:   'automake --add-missing' can install 'config.sub'
configure.in:8: error: required file 'config/install-sh' not found
configure.in:8:   'automake --add-missing' can install 'install-sh'
configure.in:8: error: required file 'config/missing' not found
configure.in:8:   'automake --add-missing' can install 'missing'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
Makefile.am: error: required file 'config/depcomp' not found
Makefile.am:   'automake --add-missing' can install 'depcomp'
[root@localhost libntrdma]# automake --add-missing
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:8: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.in:8: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.in:9: installing 'config/config.guess'
configure.in:9: installing 'config/config.sub'
configure.in:8: installing 'config/install-sh'
configure.in:8: installing 'config/missing'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
Makefile.am: installing 'config/depcomp'
[root@localhost libntrdma]# ./configure --libdir=/usr/lib64
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 whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking size of long... 8
checking for ibv_get_device_list in -libverbs... yes
checking sysfs/libsysfs.h usability... no
checking sysfs/libsysfs.h presence... no
checking for sysfs/libsysfs.h... no
checking infiniband/driver.h usability... no
checking infiniband/driver.h presence... no
checking for infiniband/driver.h... no
configure: error: <infiniband/driver.h> not found.  Is libibverbs installed?
[root@localhost libntrdma]# 

I aslo found that the libibverbs was replaced by rdma-core, so the following may be need to be updated:

# Red Hat
sudo yum install libibverbs-devel libibverbs-util

Any help will be appreciated!

Hi @huangqingxin, thanks for the detailed report. Would you try to install the devel package for rdma-core, and see if that resolves the build dependency? Try sudo yum install rdma-core-devel.

@allenbh Thanks for your response. I try your way on another machine, I found that after installing the rdma-core-devel packages, the header file `<infiniband/driver.h>' which is included by libntrdma is still missed.

By the way , is it necessary to compile libntrdma for running entire ntrdma?

[root@localhost ~]# yum install rdma-core*
Loaded plugins: fastestmirror, langpacks
apache2-ceph-noarch                                                                                                                                                                                                                                    | 2.9 kB  00:00:00     
base                                                                                                                                                                                                                                                   | 3.6 kB  00:00:00     
ceph                                                                                                                                                                                                                                                   | 2.9 kB  00:00:00     
elrepo                                                                                                                                                                                                                                                 | 2.9 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                                                                                                   | 6.2 kB  00:00:00     
epel                                                                                                                                                                                                                                                   | 4.7 kB  00:00:00     
extras                                                                                                                                                                                                                                                 | 3.4 kB  00:00:00     
fastcgi-ceph-basearch                                                                                                                                                                                                                                  |  951 B  00:00:00     
fastcgi-ceph-noarch                                                                                                                                                                                                                                    |  951 B  00:00:00     
nasm                                                                                                                                                                                                                                                   | 3.0 kB  00:00:01     
updates                                                                                                                                                                                                                                                | 3.4 kB  00:00:00     
(1/5): epel/x86_64/updateinfo                                                                                                                                                                                                                          | 841 kB  00:00:17     
(2/5): epel/x86_64/primary_db                                                                                                                                                                                                                          | 6.1 MB  00:00:02     
(3/5): elrepo/primary_db                                                                                                                                                                                                                               | 610 kB  00:00:20     
(4/5): extras/7/x86_64/primary_db                                                                                                                                                                                                                      | 129 kB  00:00:18     
(5/5): updates/7/x86_64/primary_db                                                                                                                                                                                                                     | 3.6 MB  00:00:19     
Loading mirror speeds from cached hostfile
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.ustc.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package libibverbs-devel.x86_64 0:1.2.1-1.el7 will be obsoleted
---> Package librdmacm-devel.x86_64 0:1.1.0-2.el7 will be obsoleted
---> Package rdma.noarch 0:7.3_4.7_rc2-5.el7 will be obsoleted
---> Package rdma-core.x86_64 0:13-7.el7 will be obsoleting
---> Package rdma-core-devel.x86_64 0:13-7.el7 will be obsoleting
--> Processing Dependency: librdmacm = 13-7.el7 for package: rdma-core-devel-13-7.el7.x86_64
--> Processing Dependency: libibverbs = 13-7.el7 for package: rdma-core-devel-13-7.el7.x86_64
--> Processing Dependency: libibumad = 13-7.el7 for package: rdma-core-devel-13-7.el7.x86_64
--> Processing Dependency: libibcm = 13-7.el7 for package: rdma-core-devel-13-7.el7.x86_64
--> Processing Dependency: ibacm = 13-7.el7 for package: rdma-core-devel-13-7.el7.x86_64
--> Processing Dependency: libmlx5.so.1()(64bit) for package: rdma-core-devel-13-7.el7.x86_64
--> Running transaction check
---> Package ibacm.x86_64 0:1.2.0-1.el7 will be updated
---> Package ibacm.x86_64 0:13-7.el7 will be an update
---> Package libcxgb3.x86_64 0:1.3.1-8.el7 will be obsoleted
--> Processing Dependency: libibverbs-driver.x86_64 for package: libibverbs-utils-1.2.1-1.el7.x86_64
---> Package libcxgb4.x86_64 0:1.3.5-3.el7 will be obsoleted
---> Package libi40iw.x86_64 0:0.5.227-2.el7 will be obsoleted
---> Package libibcm.x86_64 0:1.0.5-8.el7 will be updated
---> Package libibcm.x86_64 0:13-7.el7 will be an update
---> Package libibumad.x86_64 0:1.3.10.2-1.el7 will be updated
---> Package libibumad.x86_64 0:13-7.el7 will be an update
---> Package libibverbs.x86_64 0:1.2.1-1.el7 will be updated
---> Package libibverbs.x86_64 0:13-7.el7 will be obsoleting
---> Package libipathverbs.x86_64 0:1.3-2.el7 will be obsoleted
---> Package libmlx4.x86_64 0:1.2.1-1.el7 will be obsoleted
---> Package libmlx5.x86_64 0:1.2.1-8.el7 will be obsoleted
---> Package libmthca.x86_64 0:1.0.6-13.el7 will be obsoleted
---> Package libnes.x86_64 0:1.1.4-2.el7 will be obsoleted
---> Package librdmacm.x86_64 0:1.1.0-2.el7 will be updated
--> Processing Dependency: librdmacm = 1.1.0-2.el7 for package: librdmacm-utils-1.1.0-2.el7.x86_64
---> Package librdmacm.x86_64 0:13-7.el7 will be an update
--> Running transaction check
---> Package libibverbs-utils.x86_64 0:1.2.1-1.el7 will be updated
---> Package libibverbs-utils.x86_64 0:13-7.el7 will be an update
---> Package librdmacm-utils.x86_64 0:1.1.0-2.el7 will be updated
---> Package librdmacm-utils.x86_64 0:13-7.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                  Arch                                                           Version                                                           Repository                                                    Size
==============================================================================================================================================================================================================================================================================
Installing:
 libibverbs                                                               x86_64                                                         13-7.el7                                                          base                                                         194 k
     replacing  libcxgb3.x86_64 1.3.1-8.el7
     replacing  libcxgb4.x86_64 1.3.5-3.el7
     replacing  libi40iw.x86_64 0.5.227-2.el7
     replacing  libipathverbs.x86_64 1.3-2.el7
     replacing  libmlx4.x86_64 1.2.1-1.el7
     replacing  libmlx5.x86_64 1.2.1-8.el7
     replacing  libmthca.x86_64 1.0.6-13.el7
     replacing  libnes.x86_64 1.1.4-2.el7
 rdma-core                                                                x86_64                                                         13-7.el7                                                          base                                                          43 k
     replacing  rdma.noarch 7.3_4.7_rc2-5.el7
 rdma-core-devel                                                          x86_64                                                         13-7.el7                                                          base                                                         194 k
     replacing  libibverbs-devel.x86_64 1.2.1-1.el7
     replacing  librdmacm-devel.x86_64 1.1.0-2.el7
Updating for dependencies:
 ibacm                                                                    x86_64                                                         13-7.el7                                                          base                                                          75 k
 libibcm                                                                  x86_64                                                         13-7.el7                                                          base                                                          14 k
 libibumad                                                                x86_64                                                         13-7.el7                                                          base                                                          20 k
 libibverbs-utils                                                         x86_64                                                         13-7.el7                                                          base                                                          55 k
 librdmacm                                                                x86_64                                                         13-7.el7                                                          base                                                          59 k
 librdmacm-utils                                                          x86_64                                                         13-7.el7                                                          base                                                          77 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  3 Packages
Upgrade             ( 6 Dependent packages)

Total download size: 731 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/9): ibacm-13-7.el7.x86_64.rpm                                                                                                                                                                                                                       |  75 kB  00:00:15     
(2/9): libibumad-13-7.el7.x86_64.rpm                                                                                                                                                                                                                   |  20 kB  00:00:00     
(3/9): libibverbs-13-7.el7.x86_64.rpm                                                                                                                                                                                                                  | 194 kB  00:00:00     
(4/9): libibverbs-utils-13-7.el7.x86_64.rpm                                                                                                                                                                                                            |  55 kB  00:00:00     
(5/9): librdmacm-13-7.el7.x86_64.rpm                                                                                                                                                                                                                   |  59 kB  00:00:00     
(6/9): libibcm-13-7.el7.x86_64.rpm                                                                                                                                                                                                                     |  14 kB  00:00:15     
(7/9): librdmacm-utils-13-7.el7.x86_64.rpm                                                                                                                                                                                                             |  77 kB  00:00:00     
(8/9): rdma-core-13-7.el7.x86_64.rpm                                                                                                                                                                                                                   |  43 kB  00:00:00     
(9/9): rdma-core-devel-13-7.el7.x86_64.rpm                                                                                                                                                                                                             | 194 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                          45 kB/s | 731 kB  00:00:16     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : rdma-core-13-7.el7.x86_64                                                                                                                                                                                                                                 1/27 
  Installing : libibverbs-13-7.el7.x86_64                                                                                                                                                                                                                                2/27 
  Updating   : librdmacm-13-7.el7.x86_64                                                                                                                                                                                                                                 3/27 
  Updating   : libibumad-13-7.el7.x86_64                                                                                                                                                                                                                                 4/27 
  Updating   : ibacm-13-7.el7.x86_64                                                                                                                                                                                                                                     5/27 
  Updating   : libibcm-13-7.el7.x86_64                                                                                                                                                                                                                                   6/27 
  Installing : rdma-core-devel-13-7.el7.x86_64                                                                                                                                                                                                                           7/27 
  Updating   : librdmacm-utils-13-7.el7.x86_64                                                                                                                                                                                                                           8/27 
  Updating   : libibverbs-utils-13-7.el7.x86_64                                                                                                                                                                                                                          9/27 
  Cleanup    : libibverbs-utils-1.2.1-1.el7.x86_64                                                                                                                                                                                                                      10/27 
  Erasing    : librdmacm-devel-1.1.0-2.el7.x86_64                                                                                                                                                                                                                       11/27 
  Erasing    : libcxgb3-1.3.1-8.el7.x86_64                                                                                                                                                                                                                              12/27 
  Erasing    : libnes-1.1.4-2.el7.x86_64                                                                                                                                                                                                                                13/27 
  Erasing    : libmthca-1.0.6-13.el7.x86_64                                                                                                                                                                                                                             14/27 
  Erasing    : libmlx5-1.2.1-8.el7.x86_64                                                                                                                                                                                                                               15/27 
  Erasing    : libmlx4-1.2.1-1.el7.x86_64                                                                                                                                                                                                                               16/27 
  Erasing    : libipathverbs-1.3-2.el7.x86_64                                                                                                                                                                                                                           17/27 
  Erasing    : libcxgb4-1.3.5-3.el7.x86_64                                                                                                                                                                                                                              18/27 
  Cleanup    : ibacm-1.2.0-1.el7.x86_64                                                                                                                                                                                                                                 19/27 
  Cleanup    : librdmacm-utils-1.1.0-2.el7.x86_64                                                                                                                                                                                                                       20/27 
  Erasing    : libibverbs-devel-1.2.1-1.el7.x86_64                                                                                                                                                                                                                      21/27 
  Cleanup    : librdmacm-1.1.0-2.el7.x86_64                                                                                                                                                                                                                             22/27 
  Cleanup    : libibumad-1.3.10.2-1.el7.x86_64                                                                                                                                                                                                                          23/27 
  Cleanup    : libibcm-1.0.5-8.el7.x86_64                                                                                                                                                                                                                               24/27 
  Erasing    : libi40iw-0.5.227-2.el7.x86_64                                                                                                                                                                                                                            25/27 
  Cleanup    : libibverbs-1.2.1-1.el7.x86_64                                                                                                                                                                                                                            26/27 
  Erasing    : rdma-7.3_4.7_rc2-5.el7.noarch                                                                                                                                                                                                                            27/27 
  Verifying  : libibverbs-utils-13-7.el7.x86_64                                                                                                                                                                                                                          1/27 
  Verifying  : rdma-core-13-7.el7.x86_64                                                                                                                                                                                                                                 2/27 
  Verifying  : rdma-core-devel-13-7.el7.x86_64                                                                                                                                                                                                                           3/27 
  Verifying  : librdmacm-13-7.el7.x86_64                                                                                                                                                                                                                                 4/27 
  Verifying  : librdmacm-utils-13-7.el7.x86_64                                                                                                                                                                                                                           5/27 
  Verifying  : ibacm-13-7.el7.x86_64                                                                                                                                                                                                                                     6/27 
  Verifying  : libibverbs-13-7.el7.x86_64                                                                                                                                                                                                                                7/27 
  Verifying  : libibumad-13-7.el7.x86_64                                                                                                                                                                                                                                 8/27 
  Verifying  : libibcm-13-7.el7.x86_64                                                                                                                                                                                                                                   9/27 
  Verifying  : librdmacm-devel-1.1.0-2.el7.x86_64                                                                                                                                                                                                                       10/27 
  Verifying  : libibverbs-devel-1.2.1-1.el7.x86_64                                                                                                                                                                                                                      11/27 
  Verifying  : librdmacm-utils-1.1.0-2.el7.x86_64                                                                                                                                                                                                                       12/27 
  Verifying  : libi40iw-0.5.227-2.el7.x86_64                                                                                                                                                                                                                            13/27 
  Verifying  : libmlx5-1.2.1-8.el7.x86_64                                                                                                                                                                                                                               14/27 
  Verifying  : libibverbs-utils-1.2.1-1.el7.x86_64                                                                                                                                                                                                                      15/27 
  Verifying  : ibacm-1.2.0-1.el7.x86_64                                                                                                                                                                                                                                 16/27 
  Verifying  : libcxgb4-1.3.5-3.el7.x86_64                                                                                                                                                                                                                              17/27 
  Verifying  : libibumad-1.3.10.2-1.el7.x86_64                                                                                                                                                                                                                          18/27 
  Verifying  : libcxgb3-1.3.1-8.el7.x86_64                                                                                                                                                                                                                              19/27 
  Verifying  : libipathverbs-1.3-2.el7.x86_64                                                                                                                                                                                                                           20/27 
  Verifying  : libibverbs-1.2.1-1.el7.x86_64                                                                                                                                                                                                                            21/27 
  Verifying  : librdmacm-1.1.0-2.el7.x86_64                                                                                                                                                                                                                             22/27 
  Verifying  : libmlx4-1.2.1-1.el7.x86_64                                                                                                                                                                                                                               23/27 
  Verifying  : libnes-1.1.4-2.el7.x86_64                                                                                                                                                                                                                                24/27 
  Verifying  : rdma-7.3_4.7_rc2-5.el7.noarch                                                                                                                                                                                                                            25/27 
  Verifying  : libmthca-1.0.6-13.el7.x86_64                                                                                                                                                                                                                             26/27 
  Verifying  : libibcm-1.0.5-8.el7.x86_64                                                                                                                                                                                                                               27/27 

Installed:
  libibverbs.x86_64 0:13-7.el7                                                            rdma-core.x86_64 0:13-7.el7                                                            rdma-core-devel.x86_64 0:13-7.el7                                                           

Dependency Updated:
  ibacm.x86_64 0:13-7.el7                libibcm.x86_64 0:13-7.el7                libibumad.x86_64 0:13-7.el7                libibverbs-utils.x86_64 0:13-7.el7                librdmacm.x86_64 0:13-7.el7                librdmacm-utils.x86_64 0:13-7.el7               

Replaced:
  libcxgb3.x86_64 0:1.3.1-8.el7  libcxgb4.x86_64 0:1.3.5-3.el7         libi40iw.x86_64 0:0.5.227-2.el7  libibverbs-devel.x86_64 0:1.2.1-1.el7  libipathverbs.x86_64 0:1.3-2.el7  libmlx4.x86_64 0:1.2.1-1.el7  libmlx5.x86_64 0:1.2.1-8.el7  libmthca.x86_64 0:1.0.6-13.el7 
  libnes.x86_64 0:1.1.4-2.el7    librdmacm-devel.x86_64 0:1.1.0-2.el7  rdma.noarch 0:7.3_4.7_rc2-5.el7 

Complete!
[root@localhost ~]# find / -name 'driver.h'
/usr/src/kernels/3.10.0-514.el7.x86_64/include/config/hvc/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/config/raw/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/gpio/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/iio/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/mlx4/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/mlx5/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/ulpi/driver.h
/usr/src/kernels/3.10.0-514.el7.x86_64/include/linux/regulator/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/drivers/gpu/drm/nouveau/include/nvif/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/gpio/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/iio/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/mlx4/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/mlx5/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/regulator/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/linux/ulpi/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/config/raw/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/include/config/hvc/driver.h
/usr/src/kernels/Intel_NTB_Kernel_4.2/linux-4.2/sound/usb/line6/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/config/hvc/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/config/raw/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/gpio/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/iio/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/mlx4/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/mlx5/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/ulpi/driver.h
/usr/src/kernels/3.10.0-693.2.2.el7.x86_64/include/linux/regulator/driver.h
/usr/src/linux-4.2/drivers/gpu/drm/nouveau/include/nvif/driver.h
/usr/src/linux-4.2/include/linux/gpio/driver.h
/usr/src/linux-4.2/include/linux/iio/driver.h
/usr/src/linux-4.2/include/linux/mlx4/driver.h
/usr/src/linux-4.2/include/linux/mlx5/driver.h
/usr/src/linux-4.2/include/linux/regulator/driver.h
/usr/src/linux-4.2/include/linux/ulpi/driver.h
/usr/src/linux-4.2/sound/usb/line6/driver.h
[root@localhost ~]# find / -name 'driver.h' | grep infiniband
[root@localhost ~]# 

@allenbh , when i try to compile the libntrdma.so manually(I aslo compile the rdma-core from source), I meet some new errors.

[root@localhost src]# gcc -o libntrdma.so -fPIC -shared ntrdma.c dev.c -I/home/hqx/rdma-core/build/include
ntrdma.c: In function ‘ntrdma_driver_init’:
ntrdma.c:114:9: error: ‘struct ibv_device’ has no member named ‘ops’; did you mean ‘_ops’?
  ibdev->ops.alloc_context = ntrdma_alloc_context;
         ^~~
         _ops
ntrdma.c:115:9: error: ‘struct ibv_device’ has no member named ‘ops’; did you mean ‘_ops’?
  ibdev->ops.free_context  = ntrdma_free_context;
         ^~~
         _ops
ntrdma.c: In function ‘ntrdma_register_driver’:
ntrdma.c:122:2: warning: implicit declaration of function ‘ibv_register_driver’; did you mean ‘verbs_register_driver’? [-Wimplicit-function-declaration]
  ibv_register_driver("ntrdma", ntrdma_driver_init);
  ^~~~~~~~~~~~~~~~~~~
  verbs_register_driver

And when I check the verbs.h in rdma-core package, I found a log which say the ibv_device->ops is unused now.

[root@localhost libibverbs]# git log a9e270ca1b9bef0b2fe05339189c3ae1bd6d3218
commit a9e270ca1b9bef0b2fe05339189c3ae1bd6d3218
Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date:   Tue Feb 28 14:22:40 2017 -0700

    providers: Move all verbs_device ops into struct verbs_device_ops
    
    This makes the **ibv_device->ops** stuff unused, so delete those
    public names to prevent anyone from using it.
    
    Drivers that use ibv_register_driver just get some simple renames,
    drivers that used verbs_register_driver get their ops structure back,
    using the new context API pointers.
    
    This makes further extension of the drivers ops really easy and
    clear. We can use this simple approach now that the provider
    API is private.
    
    Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

So any upgrades for libntrdma is need?

Finally, I get it! Here are the steps.

  1. download old rdma-core code
wget https://github.com/linux-rdma/rdma-core/archive/rdma-core-12.tar.gz
  1. specify the include folder
...
./configure --libdir=/usr/lib64 CFLAGS='-I/home/hqx/rdma-core-rdma-core-12/build/include'
...
  1. success to compile the libntrdma!!