Closed GoogleCodeExporter closed 6 years ago
I got error messages when typing scons
scons
scons: Reading SConscript files ...
scons: warning: The env.Copy() method is deprecated; use the env.Clone() method
instead.
File "/local/mnt/workspace/server1/src/Sconstruct", line 101, in Test
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/base/allocator_test.o -c -march=i486 -g -static -Ibuild -I.
-I/local/mnt/workspace/server1/third_party/boost/boost
-I/local/mnt/workspace/server1/third_party/gflags/include
-I/local/mnt/workspace/server1/third_party/glog/include
-I/local/mnt/workspace/server1/third_party/protobuf/include
-I/local/mnt/workspace/server1/third_party/protobuf/include/google
-I/local/mnt/workspace/server1/third_party/gtest/include base/allocator_test.cpp
base/allocator_test.cpp:1: error: CPU you selected does not support x86-64
instruction set
base/allocator_test.cpp:1: error: CPU you selected does not support x86-64
instruction set
scons: *** [build/base/allocator_test.o] Error 1
scons: building terminated because of errors.
Original comment by felixc...@gmail.com
on 20 Nov 2010 at 12:10
This is caused by linking gflags and glog in the wrong order on the linker
commandline. Try linking with "-lgflags -lglog" instead of "-lglog -lgflags".
Original comment by k...@google.com
on 12 Jun 2011 at 8:06
I can't say why this happens, but in the glog code, when I build that, the
namespace defined in src/base/commandlineflags.h when compiled into the
libglog.so goes in as
namespace FLAG__namespace_do_not_use_directly_use_DECLARE_int32_instead {
google::int32 FLAGS_v((!getenv("GLOG_" "v") ? (0) : strtol(getenv("GLOG_" "v"),
__null, 10))); char FLAGS_nov; } using
FLAG__namespace_do_not_use_directly_use_DECLARE_int32_instead::FLAGS_v;
and when I am trying to build the server1 RPC code, and the same code goes
through the g++ when compiling the code there, I get the following:
namespace fLI { extern google::int32 FLAGS_v; } using fLI::FLAGS_v;
I played with compile options, I tried to use strace to see what g++ was doing
etc, but I could not see why these two compiled differently.
Cheers
Original comment by jhalland...@gmail.com
on 1 Dec 2011 at 12:05
When I encoutered this problem it was due to the order in which glogs and
gflags had been built. If you're using both, you need to build gflags first,
then build glog. glog includes an IFDEF that will link in its own version of
gflags if it's not found on the system. If you build with that, and then build
gflags and run, you'll have issues.
Original comment by joel.me...@gmail.com
on 7 Aug 2012 at 5:36
I met the same error messages with yiwang(Yi.Wang.2005@gmail.com).
Original comment by ofandyw...@gmail.com
on 29 Dec 2012 at 3:57
integer gflag ?
Original issue reported on code.google.com by
Yi.Wang.2005
on 9 Oct 2010 at 12:45