Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fortify related build failures on Ubuntu 19.04 #1568

Closed
akshatsikarwar opened this issue May 12, 2019 · 0 comments
Closed

Fortify related build failures on Ubuntu 19.04 #1568

akshatsikarwar opened this issue May 12, 2019 · 0 comments

Comments

@akshatsikarwar
Copy link
Contributor

[1/351] Building C object berkdb/CMakeFiles/db.dir/hash/hash_func.c.o
FAILED: berkdb/CMakeFiles/db.dir/hash/hash_func.c.o
/usr/bin/cc -DCOMDB2_ROOT=/opt/bb -DCOMDB2_VERSION=\"2\" -DPER_THREAD_MALLOC -DSTDC_HEADERS -DWITH_SSL=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LINUX_SOURCE -I../berkdb/build -I../berkdb -Iberkdb -I../util -I../bbinc -I../comdb2rle -I../crc32c -I../dlmalloc -I../mem -Imem -Wall -Werror -Wno-unused-function -Wno-switch -Wignored-qualifiers -pthread -fno-strict-aliasing -O2 -g -DNDEBUG -fPIC   -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-label -std=gnu99 -MD -MT berkdb/CMakeFiles/db.dir/hash/hash_func.c.o -MF berkdb/CMakeFiles/db.dir/hash/hash_func.c.o.d -o berkdb/CMakeFiles/db.dir/hash/hash_func.c.o   -c ../berkdb/hash/hash_func.c
In file included from ../berkdb/build/db_int.h:460,
                 from ../berkdb/hash/hash_func.c:53:
../berkdb/hash/hash_func.c: In function ‘__ham_func2’:
../berkdb/dbinc/debug.h:49:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
  (n) = (v);       \
  ^
../berkdb/hash/hash_func.c:79:3: note: in expansion of macro ‘COMPQUIET’
   COMPQUIET(dbp, NULL);
   ^~~~~~~~~
../berkdb/hash/hash_func.c:78:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
  if (dbp != NULL)
  ^~
In file included from ../berkdb/build/db_int.h:460,
                 from ../berkdb/hash/hash_func.c:53:
../berkdb/hash/hash_func.c: In function ‘__ham_func3’:
../berkdb/dbinc/debug.h:49:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
  (n) = (v);       \
  ^
../berkdb/hash/hash_func.c:113:3: note: in expansion of macro ‘COMPQUIET’
   COMPQUIET(dbp, NULL);
   ^~~~~~~~~
../berkdb/hash/hash_func.c:112:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
  if (dbp != NULL)
  ^~
In file included from ../berkdb/build/db_int.h:460,
                 from ../berkdb/hash/hash_func.c:53:
../berkdb/hash/hash_func.c: In function ‘__ham_func4_resume’:
../berkdb/dbinc/debug.h:49:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
  (n) = (v);       \
  ^
../berkdb/hash/hash_func.c:167:3: note: in expansion of macro ‘COMPQUIET’
   COMPQUIET(dbp, NULL);
   ^~~~~~~~~
../berkdb/hash/hash_func.c:166:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
  if (dbp != NULL)
  ^~
In file included from ../berkdb/build/db_int.h:460,
                 from ../berkdb/hash/hash_func.c:53:
../berkdb/hash/hash_func.c: In function ‘__ham_func4’:
../berkdb/dbinc/debug.h:49:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
  (n) = (v);       \
  ^
../berkdb/hash/hash_func.c:220:3: note: in expansion of macro ‘COMPQUIET’
   COMPQUIET(dbp, NULL);
   ^~~~~~~~~
../berkdb/hash/hash_func.c:219:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
  if (dbp != NULL)
  ^~
In file included from ../berkdb/build/db_int.h:460,
                 from ../berkdb/hash/hash_func.c:53:
../berkdb/hash/hash_func.c: In function ‘__ham_func5’:
../berkdb/dbinc/debug.h:49:2: error: macro expands to multiple statements [-Werror=multistatement-macros]
  (n) = (v);       \
  ^
../berkdb/hash/hash_func.c:281:3: note: in expansion of macro ‘COMPQUIET’
   COMPQUIET(dbp, NULL);
   ^~~~~~~~~
../berkdb/hash/hash_func.c:280:2: note: some parts of macro expansion are not guarded by this ‘if’ clause
  if (dbp != NULL)
  ^~
cc1: all warnings being treated as errors
[2/351] Building C object net/CMakeFiles/net.dir/info.c.o
FAILED: net/CMakeFiles/net.dir/info.c.o
/usr/bin/cc -DCOMDB2_ROOT=/opt/bb -DCOMDB2_VERSION=\"2\" -DPER_THREAD_MALLOC -DWITH_SSL=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LINUX_SOURCE -I../net -Inet -I../util -I../crc32c -I../bbinc -I../bdb -I../dlmalloc -I../berkdb -I../mem -Imem -Wall -Werror -Wno-unused-function -Wno-switch -Wignored-qualifiers -pthread -fno-strict-aliasing -O2 -g -DNDEBUG -fPIC   -std=gnu99 -MD -MT net/CMakeFiles/net.dir/info.c.o -MF net/CMakeFiles/net.dir/info.c.o.d -o net/CMakeFiles/net.dir/info.c.o   -c ../net/info.c
../net/info.c: In function ‘fmt_time’:
../net/info.c:46:49: error: ‘%02d’ directive output may be truncated writing between 2 and 11 bytes into a region of size between 0 and 9 [-Werror=format-truncation=]
         snprintf(b->s, sizeof(b->s), "%02d/%02d %02d:%02d:%02d",
                                                 ^~~~
In file included from /usr/include/stdio.h:867,
                 from ../net/info.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 15 and 60 bytes into a destination of size 15
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[3/351] Building C object util/CMakeFiles/util.dir/xstring.c.o
FAILED: util/CMakeFiles/util.dir/xstring.c.o
/usr/bin/cc -DCOMDB2_ROOT=/opt/bb -DCOMDB2_VERSION=\"2\" -DPER_THREAD_MALLOC -DWITH_SSL=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LINUX_SOURCE -I../util -Iutil -I../bbinc -I../cdb2api -I../dlmalloc -I../mem -Imem -I../sockpool -I../berkdb -I/usr/include/x86_64-linux-gnu -I../db -Wall -Werror -Wno-unused-function -Wno-switch -Wignored-qualifiers -pthread -fno-strict-aliasing -O2 -g -DNDEBUG -fPIC   -std=gnu99 -MD -MT util/CMakeFiles/util.dir/xstring.c.o -MF util/CMakeFiles/util.dir/xstring.c.o.d -o util/CMakeFiles/util.dir/xstring.c.o   -c ../util/xstring.c
In file included from /usr/include/string.h:494,
                 from ../bbinc/xstring.h:294,
                 from ../util/xstring.c:17:
In function ‘strcpy’,
    inlined from ‘strltrims’ at ../util/xstring.c:1031:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:90:10: error: ‘__builtin_strcpy’ accessing 1 byte at offsets 0 and [0, 9223372036854775807] may overlap 1 byte at offset 0 [-Werror=restrict]
   return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant