Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix: zk compile cflag no warn format errors #689

Merged
merged 4 commits into from
Dec 16, 2020

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Dec 16, 2020

#685 introduces a compilation flag "CFLAGS=-Wno-error=format-overflow" to suppress integer overflow errors of zookeeper-c-client.

ExternalProject_Add(zookeeper
        URL ${OSS_URL_PREFIX}/zookeeper-3.4.10.tar.gz
        http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
        URL_MD5 e4cf1b1593ca870bf1c7a75188f09678
        CONFIGURE_COMMAND cd src/c && CFLAGS=-Wno-error=format-overflow ./configure --enable-static=yes --enable-shared=no --prefix=${TP_OUTPUT} --with-pic=yes
        BUILD_COMMAND cd src/c && make
        INSTALL_COMMAND cd src/c && make install
        BUILD_IN_SOURCE 1
        )

"format-overflow" was introduced in gcc-7 https://gcc.gnu.org/gcc-7/changes.html. But lower-version compilers unrecognized with this flag will fail. So I use CFLAGS=-Wno-error=format instead. At this time gcc-7 as well as gcc-4.8.2 all pass.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@neverchanje neverchanje added thirdparty-modified If this PR modified some thirdparties that need to be entirely rebuilt. and removed thirdparty-modified If this PR modified some thirdparties that need to be entirely rebuilt. labels Dec 16, 2020
@levy5307 levy5307 merged commit 8e6a087 into XiaoMi:master Dec 16, 2020
@neverchanje neverchanje deleted the fix-zk branch December 16, 2020 11:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants