raphaelsc / Am-I-affected-by-Meltdown

Meltdown Exploit / Proof-of-concept / checks whether system is affected by Variant 3: rogue data cache load (CVE-2017-5754), a.k.a MELTDOWN.
https://meltdownattack.com/
BSD 2-Clause "Simplified" License
542 stars 71 forks source link

Can't build program unless bc is installed #14

Closed thsowers closed 6 years ago

thsowers commented 6 years ago

Worked fine yesterday, pulled the latest code and ran into this issue

/bin/sh: 1: bc: not found
g++ -I. --std=c++11 -O0 --no-pie -mrtm -fPIC -c -o meltdown_checker.o meltdown_checker.cc 
In file included from meltdown_checker.cc:49:0:
assembly_utils.hh:36:2: warning: #warning "Using native impl. of TSX due to GCC version older than 4.8. No need to worry about it!" [-Wcpp]
 #warning "Using native impl. of TSX due to GCC version older than 4.8. No need to worry about it!"
  ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:83:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include/x86intrin.h:46,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,
                 from /usr/include/c++/5/random:50,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from meltdown_checker.cc:41:
assembly_utils.hh:38:22: error: expected class-name before numeric constant
 static constexpr int _XBEGIN_STARTED = ~0u;
                      ^
assembly_utils.hh:38:22: error: expected ‘)’ before numeric constant
In file included from meltdown_checker.cc:49:0:
assembly_utils.hh: In function ‘int _xbegin()’:
assembly_utils.hh:41:24: error: ambiguating new declaration of ‘int _xbegin()’
 inline int _xbegin(void) {
                        ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:83:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include/x86intrin.h:46,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,
                 from /usr/include/c++/5/random:50,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from meltdown_checker.cc:41:
/usr/lib/gcc/x86_64-linux-gnu/5/include/rtmintrin.h:50:1: note: old declaration ‘unsigned int _xbegin()’
 _xbegin (void)
 ^
In file included from meltdown_checker.cc:49:0:
assembly_utils.hh: In function ‘void _xend()’:
assembly_utils.hh:48:13: error: ‘void _xend()’ redeclared inline without ‘gnu_inline’ attribute
 inline void _xend(void) {
             ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:83:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include/x86intrin.h:46,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,
                 from /usr/include/c++/5/random:50,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from meltdown_checker.cc:41:
/usr/lib/gcc/x86_64-linux-gnu/5/include/rtmintrin.h:61:1: note: ‘void _xend()’ previously defined here
 _xend (void)
 ^
Makefile:12: recipe for target 'meltdown_checker.o' failed
make: *** [meltdown_checker.o] Error 1

Fixed by installing bc

raphaelsc commented 6 years ago

thanks for the report, i'll remove the dependency on bc

raphaelsc commented 6 years ago

fixed after 923165ecff690963cbf5bf53b741ec40dd8037f2