axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.28k stars 1.26k forks source link

FIO - Windows build with libpmem #645

Closed pradeep-bose closed 6 years ago

pradeep-bose commented 6 years ago

The goal is to use FIO tool along with the libmem(ioengine) libraries to perform tests.

But unable to build FIO windows with the libpmem library.

1) Tried building with cygwin from source cygwin has the mingw64 tool chain installed and the mysys 64 binaries. pre-requisites needed are the build ndctl -> dependant on kmod library , which is not avialable on cygwin for building / already built from mysys / minhw64

2) another approach was to use the build with the exisitng libraries

https://github.com/pmem/pmdk/releases/download/1.4/pmdk-1.4-win-x64-Setup.msi

We have installed the pmdk msi on the windows platform Im assuming there are the run-time c++ shared libraries to to be used in the application.

These windows builds are avaiable at below URL are not built with the libpmem https://ci.appveyor.com/project/axboe/fio

These builds do not support libpmem in the native builds. So we trying to build FIO with the libpmem libraries, linked.

Tried using the Cygwin build environment , but were unable to get the libpmem linked.


Administrator@WIN-OPQATGND0T7 MINGW64 /c/Users/Administrator/Desktop/fio-master/fio-master

# ./configure

Forcing some known good options on Windows

Operating system              CYGWIN

CPU                           x86_64

Big endian                    no

Target Windows version        7

Compiler                      x86_64-w64-mingw32-gcc

Cross compile                 no

Static build                  no

Wordsize                      32

zlib                          yes

Linux AIO support             no

POSIX AIO support             no

POSIX AIO support needs -lrt  no

POSIX AIO fsync               no

POSIX pshared support         no

Solaris AIO support           no

__sync_fetch_and_add          yes

__sync_synchronize            yes

__sync_val_compare_and_swap   yes

libverbs                      no

rdmacm                        no

asprintf()                    yes

vasprintf()                   yes

Linux fallocate               no

POSIX fadvise                 no

POSIX fallocate               no

sched_setaffinity(3 arg)      no

sched_setaffinity(2 arg)      no

clock_gettime                 yes

CLOCK_MONOTONIC               yes

CLOCK_MONOTONIC_RAW           no

CLOCK_MONOTONIC_PRECISE       no

clockid_t                     yes

gettimeofday                  yes

fdatasync                     yes

sync_file_range               no

EXT4 move extent              no

Linux splice(2)               no

GUASI                         no

Fusion-io atomic engine       no

libnuma                       no

strsep                        no

strcasestr                    no

strlcat                       no

getopt_long_only()            yes

inet_aton                     no

socklen_t                     yes

__thread                      yes

RUSAGE_THREAD                 yes

SCHED_IDLE                    yes

TCP_NODELAY                   yes

Net engine window_size        no

TCP_MAXSEG                    no

RLIMIT_MEMLOCK                no

pwritev/preadv                no

pwritev2/preadv2              no

IPv6 helpers                  yes

Rados engine                  no

Rados Block Device engine     no

setvbuf                       yes

Gluster API engine            no

s390_z196_facilities          no

HDFS engine                   no

MTD                           no

**libpmem                       no**

libpmemblk                    no

PMDK pmemblk engine           no

PMDK dev-dax engine           no

PMDK libpmem engine           no

lex/yacc for arithmetic       no

getmntent                     no

getmntinfo                    no

Static Assert                 yes

bool                          yes

strndup                       no

Valgrind headers              no

march_armv8_a_crc_crypto      no

cuda                          no

mkdir(a, b)                   no

Build march=native            yes

**The Path variable too points to the  the binary location of libpmem dlls from the msi package above **

Administrator@WIN-OPQATGND0T7 MINGW64 /c/Users/Administrator/Desktop/fio-master/fio-master

# echo $PATH

**/c/Program Files/Intel/PMDK/Release/bin**:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
sitsofe commented 6 years ago

@pradeep-bose You might find get a better answer from the Windows folks who are part of the libpmem project (e.g. does using cygwin with it work for them). You can see what fio does in order to test for libpmem over here: https://github.com/axboe/fio/blob/ae48493039f833119126ef979dbe86aee2c05557/configure#L1843 . From a quick glance you'll need fio to be able to

  1. Find the libpmem headers
  2. Find and link against the libpmem libraries

If it can't do both of those then you won't get far. You may need to mess about with BUILD_CFLAGS and the LIBS variables (as demonstrated by the bits in red over on https://github.com/axboe/fio/commit/b86770c69424d82449ce7e61a4e1b04ba1295f83#diff-e2d5a00791bce9a01f99bc6fd613a39d ) to get it going. Good luck!

sitsofe commented 6 years ago

As this isn't so much a bug in fio and is more of a "How to build things on Windows?" question (and I'm not a Windows expert) I'm going to close this issue (but feel free to continue it on the fio mailing list).

If someone does find a reliable (not to arduous) way of building against libpmem on Windows let us know...