[
https://issues.apache.org/jira/browse/ZOOKEEPER-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488910#comment-16488910
]
Andor Molnar commented on ZOOKEEPER-3034:
-----------------------------------------
[~bhavenamrata] No probs.
Are u able to compile and run tests on Ubuntu 18.04? I got the following error
message:
{noformat}
[exec] /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I/home/andor/git/my-zookeeper/src/c
-I/home/andor/git/my-zookeeper/src/c/include
-I/home/andor/git/my-zookeeper/src/c/tests
-I/home/andor/git/my-zookeeper/src/c/generated -Wall -Werror
-Wdeclaration-after-statement -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF
.deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo
'/home/andor/git/my-zookeeper/src/c/'`src/zookeeper.c
[exec] /home/andor/git/my-zookeeper/src/c/src/zookeeper.c: In function
‘print_completion_queue’:
[exec] /home/andor/git/my-zookeeper/src/c/src/zookeeper.c:2530:5: error: null
argument where non-null required (argument 1) [-Werror=nonnull]
[exec] fprintf(LOGSTREAM,"Completion queue: ");
[exec] ^~~~~~~
[exec] /home/andor/git/my-zookeeper/src/c/src/zookeeper.c:2532:9: error: null
argument where non-null required (argument 1) [-Werror=nonnull]
[exec] fprintf(LOGSTREAM,"empty\n");
[exec] ^~~~~~~
[exec] /home/andor/git/my-zookeeper/src/c/src/zookeeper.c:2538:9: error: null
argument where non-null required (argument 1) [-Werror=nonnull]
[exec] fprintf(LOGSTREAM,"%d,",cptr->xid);
[exec] ^~~~~~~
[exec] /home/andor/git/my-zookeeper/src/c/src/zookeeper.c:2541:5: error: null
argument where non-null required (argument 1) [-Werror=nonnull]
[exec] fprintf(LOGSTREAM,"end\n");
[exec] ^~~~~~~
[exec] libtool: compile: gcc -DHAVE_CONFIG_H -I.
-I/home/andor/git/my-zookeeper/src/c
-I/home/andor/git/my-zookeeper/src/c/include
-I/home/andor/git/my-zookeeper/src/c/tests
-I/home/andor/git/my-zookeeper/src/c/generated -Wall -Werror
-Wdeclaration-after-statement -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF
.deps/zookeeper.Tpo -c /home/andor/git/my-zookeeper/src/c/src/zookeeper.c -fPIC
-DPIC -o .libs/zookeeper.o
[exec] Makefile:1030: recipe for target 'zookeeper.lo' failed
[exec] cc1: all warnings being treated as errors
[exec] make: *** [zookeeper.lo] Error 1
{noformat}
{panel:title=GCC version}
$ gcc --version
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
{panel}
Looks like there's some additional plumbing work needed to fully support 18.04
> Facing issues while building from source
> ----------------------------------------
>
> Key: ZOOKEEPER-3034
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3034
> Project: ZooKeeper
> Issue Type: Bug
> Components: build
> Affects Versions: 3.4.11
> Environment: Linux x86_64, Ubuntu 18.04, Ubuntu 17.10.
> Reporter: Namrata Bhave
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Building Zookeeper from source using below steps:
> {{git clone git://github.com/apache/zookeeper}}
> {{cd zookeeper}}
> {{git checkout tags/release-3.4.11}}
> {{ant compile}}
> {{cd src/c}}
> {{sudo apt-get install -y libcppunit-dev}}
> {{ACLOCAL="aclocal -I /usr/share/aclocal" autoreconf -if}}
> {{./configure && make && sudo make install}}
> {{sudo make distclean}}
>
> The 'autoreconf -if' step fails with below error:
> + ACLOCAL='aclocal -I /usr/share/aclocal'
> + autoreconf -if
> configure.ac:37: warning: macro 'AM_PATH_CPPUNIT' not found in library
> libtoolize: putting auxiliary files in '.'.
> libtoolize: copying file './ltmain.sh'
> libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
> libtoolize: and rerunning libtoolize and aclocal.
> libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
> configure.ac:37: warning: macro 'AM_PATH_CPPUNIT' not found in library
> configure.ac:37: error: possibly undefined macro: AM_PATH_CPPUNIT
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
> autoreconf: /usr/bin/autoconf failed with exit status: 1
> Build step 'Execute shell' marked build as failure
>
> This is happening on Ubuntu 18.04. Can someone please help in resolving this
> error?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)