[ https://issues.apache.org/jira/browse/ZOOKEEPER-3303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788728#comment-16788728 ]
Hari Sekhon commented on ZOOKEEPER-3303: ---------------------------------------- Hacky workaround: {code:java} # perl Makefile.PL --zookeeper-include=/usr/local/include --zookeeper-lib=/usr/local/lib # perl -pi -e 's/-Werror=format-security//' Makefile # make{code} which seems to succeed in compile and install: {code:java} # make install make[1]: Entering directory '/github/nagios-plugins/zookeeper-3.4.12/src/contrib/zkperl' "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- ZooKeeper.bs blib/arch/auto/Net/ZooKeeper/ZooKeeper.bs 644 Manifying 1 pod document Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /usr/local/lib64/perl5/auto/Net/ZooKeeper/ZooKeeper.so Installing /usr/local/lib64/perl5/Net/ZooKeeper.pm Installing /usr/local/share/man/man3/Net::ZooKeeper.3pm Appending installation info to /usr/lib64/perl5/perllocal.pod make[1]: Leaving directory '/github/nagios-plugins/zookeeper-3.4.12/src/contrib/zkperl' {code} but when it comes to trying load the Net::ZooKeeper module I get this error: {code:java} # perl -e "use Net::ZooKeeper" Can't load '/usr/local/lib64/perl5/auto/Net/ZooKeeper/ZooKeeper.so' for module Net::ZooKeeper: libzookeeper_mt.so.2: cannot open shared object file: No such file or directory at /usr/share/perl5/XSLoader.pm line 93. at /usr/local/lib64/perl5/Net/ZooKeeper.pm line 109. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. make: *** [Makefile:198: zookeeper] Error 255 # ll /usr/local/lib64/perl5/auto/Net/ZooKeeper/ZooKeeper.so -r-xr-xr-x 1 root root 344592 Mar 9 16:05 /usr/local/lib64/perl5/auto/Net/ZooKeeper/ZooKeeper.so {code} > ZooKeeper Perl client zkperl doesn't compile on newer RHEL systems ie. Fedora > ----------------------------------------------------------------------------- > > Key: ZOOKEEPER-3303 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3303 > Project: ZooKeeper > Issue Type: Bug > Components: c client, contrib > Affects Versions: 3.4.8, 3.4.12, 3.4.13 > Environment: Fedora 29 in docker > Reporter: Hari Sekhon > Priority: Blocker > > ZooKeeper Perl client zkperl fails to compile on Fedora 29 (compiles ok on > CentOS 7 though). I cannot build the project to get the zkperl dependencies > to run on Fedora as it is. This happens on various versions of ZooKeeper 3.4.x > {code:java} > # perl Makefile.PL --zookeeper-include=/usr/local/include > --zookeeper-lib=/usr/local/lib > Generating a Unix-style Makefile > Writing Makefile for Net::ZooKeeper > Writing MYMETA.yml and MYMETA.json > # make > Skip blib/lib/Net/ZooKeeper.pm (unchanged) > Running Mkbootstrap for ZooKeeper () > chmod 644 "ZooKeeper.bs" > "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- ZooKeeper.bs > blib/arch/auto/Net/ZooKeeper/ZooKeeper.bs 644 > gcc -c -I/usr/local/include -I. -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe > -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 > -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong > -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv > -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -g -DVERSION=\"0.36\" -DXS_VERSION=\"0.36\" -fPIC > "-I/usr/lib64/perl5/CORE" ZooKeeper.c > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_acl_constant’: > ZooKeeper.c:784:7: warning: unused variable ‘RETVAL’ [-Wunused-variable] > AV * RETVAL; > ^~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_CLONE’: > ZooKeeper.c:1089:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_CLONE_SKIP’: > ZooKeeper.c:1109:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_TIEHASH’: > ZooKeeper.c:1129:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_UNTIE’: > ZooKeeper.c:1151:5: warning: unused variable ‘ref_count’ [-Wunused-variable] > IV ref_count = (IV)SvIV(ST(1)) > ^~~~~~~~~ > ZooKeeper.c:1150:17: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_SCALAR’: > ZooKeeper.c:1281:17: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_DELETE’: > ZooKeeper.c:1528:7: warning: unused variable ‘attr_key’ [-Wunused-variable] > SV * attr_key = ST(1) > ^~~~~~~~ > ZooKeeper.c:1527:17: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper_CLEAR’: > ZooKeeper.c:1561:17: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper attr_hash; > ^~~~~~~~~ > ZooKeeper.xs: In function ‘XS_Net__ZooKeeper_add_auth’: > ZooKeeper.xs:1206:30: warning: format ‘%u’ expects argument of type ‘unsigned > int’, but argument 3 has type ‘STRLEN’ {aka ‘long unsigned int’} [-Wformat=] > Perl_croak(aTHX_ "invalid certificate length: %u", cert_len); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ > ZooKeeper.xs: In function ‘XS_Net__ZooKeeper_create’: > ZooKeeper.xs:1286:30: warning: format ‘%u’ expects argument of type ‘unsigned > int’, but argument 3 has type ‘STRLEN’ {aka ‘long unsigned int’} [-Wformat=] > Perl_croak(aTHX_ "invalid data length: %u", buf_len); > ^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ > ZooKeeper.xs:1321:21: error: format not a string literal and no format > arguments [-Werror=format-security] > Perl_croak(aTHX_ err); > ^~~~~~~~~~ > ZooKeeper.xs: In function ‘XS_Net__ZooKeeper_set’: > ZooKeeper.xs:1760:30: warning: format ‘%u’ expects argument of type ‘unsigned > int’, but argument 3 has type ‘STRLEN’ {aka ‘long unsigned int’} [-Wformat=] > Perl_croak(aTHX_ "invalid data length: %u", buf_len); > ^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ > ZooKeeper.xs: In function ‘XS_Net__ZooKeeper_set_acl’: > ZooKeeper.xs:1923:13: error: format not a string literal and no format > arguments [-Werror=format-security] > Perl_croak(aTHX_ err); > ^~~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_CLONE’: > ZooKeeper.c:2871:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_CLONE_SKIP’: > ZooKeeper.c:2891:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_TIEHASH’: > ZooKeeper.c:2911:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_UNTIE’: > ZooKeeper.c:2933:5: warning: unused variable ‘ref_count’ [-Wunused-variable] > IV ref_count = (IV)SvIV(ST(1)) > ^~~~~~~~~ > ZooKeeper.c:2932:23: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Stat attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_SCALAR’: > ZooKeeper.c:3065:23: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Stat attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_STORE’: > ZooKeeper.c:3167:7: warning: unused variable ‘attr_val’ [-Wunused-variable] > SV * attr_val = ST(2) > ^~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_DELETE’: > ZooKeeper.c:3271:7: warning: unused variable ‘attr_key’ [-Wunused-variable] > SV * attr_key = ST(1) > ^~~~~~~~ > ZooKeeper.c:3270:23: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Stat attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Stat_CLEAR’: > ZooKeeper.c:3304:23: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Stat attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_CLONE’: > ZooKeeper.c:3405:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_CLONE_SKIP’: > ZooKeeper.c:3425:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_TIEHASH’: > ZooKeeper.c:3445:9: warning: unused variable ‘package’ [-Wunused-variable] > char * package = (char *)SvPV_nolen(ST(0)) > ^~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_UNTIE’: > ZooKeeper.c:3467:5: warning: unused variable ‘ref_count’ [-Wunused-variable] > IV ref_count = (IV)SvIV(ST(1)) > ^~~~~~~~~ > ZooKeeper.c:3466:24: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Watch attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_SCALAR’: > ZooKeeper.c:3599:24: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Watch attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_DELETE’: > ZooKeeper.c:3803:7: warning: unused variable ‘attr_key’ [-Wunused-variable] > SV * attr_key = ST(1) > ^~~~~~~~ > ZooKeeper.c:3802:24: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Watch attr_hash; > ^~~~~~~~~ > ZooKeeper.c: In function ‘XS_Net__ZooKeeper__Watch_CLEAR’: > ZooKeeper.c:3836:24: warning: variable ‘attr_hash’ set but not used > [-Wunused-but-set-variable] > Net__ZooKeeper__Watch attr_hash; > ^~~~~~~~~ > cc1: some warnings being treated as errors > make: *** [Makefile:335: ZooKeeper.o] Error 1 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)