pmem / pmdk

Persistent Memory Development Kit
https://pmem.io
Other
1.34k stars 506 forks source link

PMDK v1.12.1/master compilation error on Rocky Linux 8 and 9 #5540

Closed ldorau closed 1 year ago

ldorau commented 1 year ago

ISSUE: PMDK v1.12.1/master compilation error on Rocky Linux 8 and 9

Environment Information

Please provide a reproduction of the bug:

# PMDK version: 1.12.1
PMDK_VERSION=1.12.1

set -ex

wget https://github.com/pmem/pmdk/releases/download/${PMDK_VERSION}/pmdk-${PMDK_VERSION}.tar.gz
tar -xzf pmdk-${PMDK_VERSION}.tar.gz
cd pmdk-${PMDK_VERSION}
make -j$(nproc) NDCTL_ENABLE=n

How often bug is revealed: always

Actual behavior:

1) for PMDK v1.12.1

https://github.com/ldorau/rpma/actions/runs/4292099863

In file included from libpmem.c:13:
pmem.h: In function 'pmem_inject_fault_at':
pmem.h:41:48: error: unused parameter 'type' [-Werror=unused-parameter]
   41 | pmem_inject_fault_at(enum pmem_allocation_type type, int nth,
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
pmem.h:41:58: error: unused parameter 'nth' [-Werror=unused-parameter]
   41 | pmem_inject_fault_at(enum pmem_allocation_type type, int nth,
      |                                                      ~~~~^~~
pmem.h:42:61: error: unused parameter 'at' [-Werror=unused-parameter]
   42 |                                                 const char *at)
      |                                                 ~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [../Makefile.inc:301: ../nondebug/libpmem/libpmem.o] Error 1
make[2]: Leaving directory '/pmdk-1.12.0/src/libpmem'
make[1]: *** [Makefile:149: libpmem] Error 2
make[1]: *** Waiting for unfinished jobs....

2) for the master branch

https://github.com/ldorau/rpma/actions/runs/4292642589/jobs/7479330718

pmem.c: In function 'memset_nodrain_libc':
pmem.c:797:50: error: unused parameter 'memset_funcs' [-Werror=unused-parameter]
   flush_func flush, const struct memset_nodrain *memset_funcs)
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [../Makefile.inc:297: ../nondebug/libpmem/pmem.o] Error 1
make[2]: Leaving directory '/pmdk/src/libpmem'
make[1]: *** [Makefile:136: libpmem] Error 2
make[1]: *** Waiting for unfinished jobs....

Expected behavior:

PMDK builds correctly

lukaszstolarczuk commented 1 year ago

Can you please try and reproduce this issue on 1.12.1 release and/or on master branch?

ldorau commented 1 year ago

Can you please try and reproduce this issue on 1.12.1 release and/or on master branch?

It occurs on v1.12.1 too (issue updated).

ldorau commented 1 year ago

On the master branch the error is different (issue updated).

wlemkows commented 1 year ago

Did you try to fix the issue using this macro https://github.com/pmem/pmdk/blob/a09e3cea298c601e674aa20fc1159177148d5576/src/core/util.h#L560 ?

ldorau commented 1 year ago

Did you try to fix the issue using this macro

https://github.com/pmem/pmdk/blob/a09e3cea298c601e674aa20fc1159177148d5576/src/core/util.h#L560

?

I did not. I just need to install PMDK when creating a Docker images for Rocky Linux 8 and 9 - see: https://github.com/ldorau/rpma/blob/common-verify-if-PMDK-was-successfully-installed/utils/docker/images/install-pmdk.sh and https://github.com/pmem/rpma/pull/2109

wlemkows commented 1 year ago

Thank you for the Iinks. I checked this error. The error is fixed only on the master. It is not in the latest releases. Can you please check your code for the branch master?

ldorau commented 1 year ago

Thank you for the Iinks. I checked this error. The error is fixed only on the master. It is not in the latest releases. Can you please check your code for the branch master?

I checked the master branch yesterday - see the errors above.

ldorau commented 1 year ago

@wlemkows Here you have the failure for the yesterday master branch: https://github.com/ldorau/rpma/actions/runs/4292642589/jobs/7479330718

wlemkows commented 1 year ago

I did a fix. Please check with this commit https://github.com/pmem/pmdk/pull/5541.

ldorau commented 1 year ago

I did a fix. Please check with this commit #5541.

It still does not build: https://github.com/ldorau/rpma/actions/runs/4302000886/jobs/7499923655

ldorau commented 1 year ago

Fixed by: https://github.com/pmem/pmdk/pull/5541 and https://github.com/pmem/pmdk/pull/5542. Thank you @wlemkows ! :-)

ldorau commented 1 year ago

Waiting for https://github.com/pmem/pmdk/pull/5542 to be merged.

wlemkows commented 1 year ago

@ldorau #5542 Merged.

ldorau commented 1 year ago

Thanks @wlemkows ! Closing this issue.