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

build hindsight v0.15.3 error #185

Open
wbtlb opened this issue Dec 22, 2018 · 8 comments
Open

build hindsight v0.15.3 error #185

wbtlb opened this issue Dec 22, 2018 · 8 comments

Comments

@wbtlb
Copy link

wbtlb commented Dec 22, 2018

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

@trink
Copy link
Contributor

trink commented Dec 24, 2018

What os and compiler version?

@ruiaylin
Copy link

@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

@trink
Copy link
Contributor

trink commented May 27, 2019

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

@ruiaylin
Copy link

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

@ruiaylin
Copy link

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

@trink
Copy link
Contributor

trink commented Sep 23, 2019

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

@ruiaylin
Copy link

@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

@valerypetrov
Copy link

valerypetrov commented Feb 3, 2020

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

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

4 participants