You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Enrico Olivelli (JIRA)" <ji...@apache.org> on 2019/06/02 22:21:00 UTC

[jira] [Comment Edited] (ZOOKEEPER-3303) ZooKeeper Perl client zkperl doesn't compile on newer RHEL systems ie. Fedora

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790978#comment-16790978 ] 

Enrico Olivelli edited comment on ZOOKEEPER-3303 at 6/2/19 10:20 PM:
---------------------------------------------------------------------

Okay.
Now it is clear to me.

I wonder why this part of the build is not regularly tests.
I am on fedora as you and I got into the other problem

Honestly I wasn't aware of the perl module, it is not compiled using neither ant nor the new maven build.

We should definitely and automatic build and tests for the perl module.

Do you have time to try to fix the warnings reported by gcc? 
I am not a C expert but the warnings seem simple to fix at a first glance


was (Author: eolivelli):
Okay.
Now it is clear to me.

I wonder why this part of the build is not regularly tests.
I am on fedora as you and I got into the other problem

Honestly I was aware of the perl module, it is not compiled using neither ant nor the new maven build.

We should definitely and automatic build and tests for the perl module.

Do you have time to try to fix the warnings reported by gcc? 
I am not a C expert but the warnings seem simple to fix at a first glance

> 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)