mozilla-services / hindsight

Hindsight - light weight data processing skeleton

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build hindsight v0.15.3 error

wbtlb opened this issue · comments

commented

when i buid hindsight v0.15.3, i get an error, any idea?

Scanning dependencies of target hindsight
[  3%] Building C object src/CMakeFiles/hindsight.dir/hindsight.c.o
[  6%] Building C object src/CMakeFiles/hindsight.dir/hs_analysis_plugins.c.o
[  9%] Building C object src/CMakeFiles/hindsight.dir/hs_checkpoint_reader.c.o
[ 12%] Building C object src/CMakeFiles/hindsight.dir/hs_checkpoint_writer.c.o
[ 15%] Building C object src/CMakeFiles/hindsight.dir/hs_config.c.o
[ 18%] Building C object src/CMakeFiles/hindsight.dir/hs_input.c.o
[ 21%] Building C object src/CMakeFiles/hindsight.dir/hs_input_plugins.c.o
[ 25%] Building C object src/CMakeFiles/hindsight.dir/hs_logger.c.o
/root/workspaces/hindsight/src/hs_logger.c: In function ‘hs_log’:
/root/workspaces/hindsight/src/hs_logger.c:62:15: error: variable ‘level’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
   const char *level;
               ^
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/hindsight.dir/hs_logger.c.o] Error 1
make[1]: *** [src/CMakeFiles/hindsight.dir/all] Error 2
make: *** [all] Error 2

What os and compiler version?

@trink I met this compile error too . I write the information like bellow

Gcc

[root@10b8436388c8 release]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Cmake

[root@10b8436388c8 release]# cmake --version
cmake version 3.13.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

OS version

CentOS Linux release 7.3.1611 (Core)

the code base is master branch

error info

[ 18%] Building C object src/CMakeFiles/hindsight.dir/hs_input.c.o
[ 21%] Building C object src/CMakeFiles/hindsight.dir/hs_input_plugins.c.o
[ 25%] Building C object src/CMakeFiles/hindsight.dir/hs_logger.c.o
/data/hindsight/src/hs_logger.c: In function 'hs_log':
/data/hindsight/src/hs_logger.c:62:15: error: variable 'level' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
   const char *level;
               ^
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/hindsight.dir/hs_logger.c.o] Error 1
make[1]: *** [src/CMakeFiles/hindsight.dir/all] Error 2
make: *** [all] Error 2

I am unable to reproduce this, will you run

  • make clean
  • make VERBOSE=1
    and include the build output e.g.,
[ 66%] Building C object src/CMakeFiles/hindsight_cli.dir/hs_logger.c.o
cd /work/tmp/hindsight/release/src && /usr/bin/cc  -DHINDSIGHT_CLI -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=600  -std=c99 -pedantic -Werror -Wno-error=deprecated -Wall -Wextra -fPIC -O2   -o CMakeFiles/hindsight_cli.dir/hs_logger.c.o   -c /work/tmp/hindsight/src/hs_logger.c

Thanks,
Trink

hi trink @trink

the information like this:

[ 25%] Building C object src/CMakeFiles/hindsight.dir/hs_logger.c.o
cd /data/hindsight/release/src && /usr/bin/cc -DWITH_OPENSSL -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=600  -std=c99 -pedantic -Werror -Wno-error=deprecated -Wall -Wextra -fPIC -O2   -o CMakeFiles/hindsight.dir/hs_logger.c.o   -c /data/hindsight/src/hs_logger.c
/data/hindsight/src/hs_logger.c: In function 'hs_log':
/data/hindsight/src/hs_logger.c:62:15: error: variable 'level' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
   const char *level;
               ^
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/hindsight.dir/hs_logger.c.o] Error 1
make[2]: Leaving directory `/data/hindsight/release'
make[1]: *** [src/CMakeFiles/hindsight.dir/all] Error 2
make[1]: Leaving directory `/data/hindsight/release'
make: *** [all] Error 2

[root@10b8436388c8 src]# /usr/bin/cc  -DHINDSIGHT_CLI -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=600  -std=c99 -pedantic -Werror -Wno-error=deprecated -Wall -Wextra -fPIC -O2   -o CMakeFiles/hindsight_cli.dir/hs_logger.c.o   -c /data/hindsight/src/hs_logger.c
/data/hindsight/src/hs_logger.c: In function 'hs_log':
/data/hindsight/src/hs_logger.c:62:15: error: variable 'level' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
   const char *level;
               ^
cc1: all warnings being treated as errors

@trink Does this problem fixed? I build hindsight in a docker env( docker image is centos:7) .
meet this error every time .

Moving the declaration/switch before the fprintf within the lock should quiet the bogus warning. A bit annoying but if it fixes the issue I will merge it. Since you can reproduce it consistently please let me know if this https://github.com/mozilla-services/hindsight/compare/dev...issue_185?expand=1 fixes the issue, thanks.
@ruiaylin

@trink Hi trink , sorry for the late reply. And i build the dev code , the error occur again.

[ 15%] Building C object src/CMakeFiles/hindsight_cli.dir/hs_config.c.o
[ 18%] Building C object src/CMakeFiles/hindsight_cli.dir/hs_input.c.o
[ 21%] Building C object src/CMakeFiles/hindsight_cli.dir/hs_input_plugins.c.o
[ 25%] Building C object src/CMakeFiles/hindsight_cli.dir/hs_logger.c.o
/opt/hindsight-dev/src/hs_logger.c: In function 'hs_log':
/opt/hindsight-dev/src/hs_logger.c:62:15: error: variable 'level' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
   const char *level;
               ^
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/hindsight_cli.dir/hs_logger.c.o] Error 1
make[1]: *** [src/CMakeFiles/hindsight_cli.dir/all] Error 2
make: *** [all] Error 2
[root@6c0df8413d42 release]# pwd
/opt/hindsight-dev/release

@ruiaylin I've had the same issue. It has been fixed by upgrading gcc to 7.2.1