[
https://issues.apache.org/jira/browse/MESOS-2690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528813#comment-14528813
]
Vinod Kone commented on MESOS-2690:
-----------------------------------
Our RPM build fails because it uses mock which sets CXX flags in the
environment.
{code}
DEBUG: + scl enable devtoolset-2 '
DEBUG: autoreconf --install -Wall --verbose &&
DEBUG: export PATH="/usr/local/bin:$PATH"
DEBUG: export PYTHON="python2.7" &&
DEBUG:
DEBUG: CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic}"
; export CFLAGS ;
DEBUG: CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic}"
; export CXXFLAGS ;
DEBUG: FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-I/usr/local/lib64/gfortran/modules}" ; export FFLAGS ;
DEBUG: ./configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu \
DEBUG: --target=x86_64-redhat-linux-gnu \
DEBUG: --program-prefix= \
DEBUG: --prefix=/usr/local \
DEBUG: --exec-prefix=/usr/local \
DEBUG: --bindir=/usr/local/bin \
DEBUG: --sbindir=/usr/local/sbin \
DEBUG: --sysconfdir=/etc \
DEBUG: --datadir=/usr/local/share \
DEBUG: --includedir=/usr/local/include \
DEBUG: --libdir=/usr/local/lib64 \
DEBUG: --libexecdir=/usr/local/libexec \
DEBUG: --localstatedir=/var \
DEBUG: --sharedstatedir=/var/lib \
DEBUG: --mandir=/usr/share/man \
DEBUG: --infodir=/usr/share/info --with-network-isolator &&
DEBUG: make -j6 check GTEST_FILTER=""
{code}
Error
{code}
DEBUG: slave/containerizer/external_containerizer.cpp: In member function 'void
mesos::internal::slave::ExternalContainerizerProcess::unwait(const
mesos::ContainerID&)':
DEBUG: slave/containerizer/external_containerizer.cpp:1046:29: error:
'*((void*)& pid +4)' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
DEBUG: << pid.get() << ": " << trees.error();
DEBUG: ^
DEBUG: cc1plus: all warnings being treated as errors
DEBUG: make[2]: ***
[slave/containerizer/libmesos_no_3rdparty_la-external_containerizer.lo] Error 1
DEBUG: make[2]: *** Waiting for unfinished jobs....
{code}
Should we just prepend 'maybe-uninitialized' to CXXFLAGS always?
> --enable-optimize build fails with maybe-uninitialized
> ------------------------------------------------------
>
> Key: MESOS-2690
> URL: https://issues.apache.org/jira/browse/MESOS-2690
> Project: Mesos
> Issue Type: Bug
> Components: build
> Environment: GCC 4.8 -> 4.9
> Reporter: Joris Van Remoortere
> Assignee: Joris Van Remoortere
> Priority: Blocker
>
> When building with the `enable-optimize` flag, the build fails with
> `maybe-uninitialized' errors.
> This is due to a bug in GCC when building optimized code triggering false
> positives for this warning. Please see:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970
> We can disable this warning when using GCC + --enable-optimize.
> A quick work-around until there is a patch:
> ../configure CXXFLAGS="-Wno-maybe-uninitialized" <your-other-flags-here>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)