Skip to content

Compilation error in Fedora 31 #4

@akurov

Description

@akurov

Hi,

I tried to compile xrootd-cmstfc under Fedora 31 but compilation failed with this error

  • make VERBOSE=1 -j4
    /usr/bin/cmake -S/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 -B/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 --check-build-system CMakeFiles/Makefile.cmake 0
    /usr/bin/cmake -E cmake_progress_start /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/progress.marks
    make -f CMakeFiles/Makefile2 all
    make[1]: Entering directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    make -f CMakeFiles/XrdCmsTfc.dir/build.make CMakeFiles/XrdCmsTfc.dir/depend
    make[2]: Entering directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    cd /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/XrdCmsTfc.dir/DependInfo.cmake --color=
    Dependee "/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/XrdCmsTfc.dir/DependInfo.cmake" is newer than depender "/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/XrdCmsTfc.dir/depend.internal".
    Dependee "/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/CMakeFiles/XrdCmsTfc.dir/depend.internal".
    Scanning dependencies of target XrdCmsTfc
    make[2]: Leaving directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    make -f CMakeFiles/XrdCmsTfc.dir/build.make CMakeFiles/XrdCmsTfc.dir/build
    make[2]: Entering directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    [ 50%] Building CXX object CMakeFiles/XrdCmsTfc.dir/src/XrdCmsTfc.cc.o
    /usr/bin/c++ -DXrdCmsTfc_EXPORTS -I/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2 -I/usr/include/xrootd -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 -Wall -Werror -O2 -g -DNDEBUG -fPIC -o CMakeFiles/XrdCmsTfc.dir/src/XrdCmsTfc.cc.o -c /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/src/XrdCmsTfc.cc
    /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/src/XrdCmsTfc.cc: In function 'std::string replaceWithRegexp(const int*, int, std::string, std::string)':
    /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/src/XrdCmsTfc.cc:369:19: error: '%i' directive writing between 1 and 10 bytes into a region of size 8 [-Werror=format-overflow=]
    369 | sprintf(buffer, "%i", i);
    | ^~
    /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/src/XrdCmsTfc.cc:369:18: note: directive argument in the range [1, 1073741824]
    369 | sprintf(buffer, "%i", i);
    | ^~~~
    In file included from /usr/include/stdio.h:867,
    from /usr/include/c++/9/cstdio:42,
    from /usr/include/c++/9/ext/string_conversions.h:43,
    from /usr/include/c++/9/bits/basic_string.h:6493,
    from /usr/include/c++/9/string:55,
    from /builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2/src/XrdCmsTfc.cc:11:
    /usr/include/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 2 and 11 bytes into a destination of size 8
    36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
    | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    37 | __bos (__s), __fmt, __va_arg_pack ());
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
    make[2]: *** [CMakeFiles/XrdCmsTfc.dir/build.make:86: CMakeFiles/XrdCmsTfc.dir/src/XrdCmsTfc.cc.o] Error 1
    make[2]: Leaving directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    make[1]: Leaving directory '/builddir/build/BUILD/xrootd-cmstfc-1.5.2/xrootd-cmstfc-1.5.2'
    make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/XrdCmsTfc.dir/all] Error 2
    make: *** [Makefile:153: all] Error 2
    error: Bad exit status from /var/tmp/rpm-tmp.jzqV4u (%build)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions