build error in "Fast memcpy with SPDK and Intel® I/OAT DMA Engine"

build error in "Fast memcpy with SPDK and Intel® I/OAT DMA Engine"

Hi,

I've followed the steps in Article "Fast memcpy with SPDK and Intel® I/OAT DMA Engine" but meet an error in the last make command:

 

  • mkdir <build-dir>
  • cd <build-dir>
  • cmake -DCMAKE_BUILD_TYPE=Release $OLDPWD
  • make

 

 

 

root@ubuntu:/opt/ex4/build# cmake -DCMAKE_BUILD_TYPE=Release $OLDPWD

-- Configuring done

-- Generating done

-- Build files have been written to: /opt/ex4/build

 

 

root@ubuntu:/opt/ex4/build# make

[ 11%] Building CXX object CMakeFiles/ex4.dir/src/par_spdk.cpp.o

/opt/ex4/src/par_spdk.cpp: In function ‘benchmark par_spdk(uint64_t, uint64_t, spdk_ioat_chan*)’:

/opt/ex4/src/par_spdk.cpp:46:87: error: too few arguments to function ‘void* spdk_malloc(size_t, size_t, uint64_t*, int, uint32_t)’

     uint64_t* buffer64 = (uint64_t*)spdk_malloc(buffer_size, sizeof(uint64_t), nullptr);

                                                                                       ^

In file included from /opt/ex4/./spdk/include/spdk/ioat.h:47:0,

                 from /opt/ex4/src/par_spdk.hpp:35,

                 from /opt/ex4/src/par_spdk.cpp:29:

/opt/ex4/./spdk/include/spdk/env.h:101:7: note: declared here

 void *spdk_malloc(size_t size, size_t align, uint64_t *phys_addr, int socket_id, uint32_t flags);

       ^

CMakeFiles/ex4.dir/build.make:62: recipe for target 'CMakeFiles/ex4.dir/src/par_spdk.cpp.o' failed

make[2]: *** [CMakeFiles/ex4.dir/src/par_spdk.cpp.o] Error 1

CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ex4.dir/all' failed

make[1]: *** [CMakeFiles/ex4.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

 

Is it caused by the latest spdk tools which change the function spdk_malloc syntax?  

I wonder if there is any walk-around that I could do?

 

Best Regards,

Martin Wang

 

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.