acimpoeru / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

unknown command line flag 'logtostderr' #206

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I try to extract SIFT features to extract features from an image dataset - 
Caltech  from this site: https://github.com/sanchom/sjm
2. I use Macport to install all the dependencies: Python, bumpy, Boost, Flann, 
VLFEAT, GTEST, Gflags, GLOG, Google Protobuf, Scons.
3. I follow exactly all the steps until i run 'scons' and 'scons install 
BIN_PREFIX=[directory]'
4. I run my program with and without '$GLOG_logtostderr=1 ./my_application' as 
suggested on this issues: 
https://code.google.com/p/google-glog/issues/detail?id=17&q=glog%20gflagsBut

What is the expected output? What do you see instead?
I should get a directory containing all the features extracted with the 
extension .SIFT. But It generated an empty directory and error: "ERROR: unknown 
command line flag 'logtostderr'. 

What version of the product are you using? On what operating system?
I am using Mac OS X Marverick, Gflags-2.1.1, Glog-0.3.3, Python2.7, 
Protobuf-2.5.0, Scons-2.3.0...

Please provide any additional information below.

Original issue reported on code.google.com by phongngu...@gmail.com on 9 May 2014 at 10:03

GoogleCodeExporter commented 8 years ago
This isn't a glog's bug.

But I think now I understood your issue. IIRC macports' glog is not built with 
gflags but the python script sets --logtostderr. There would be two solutions:

1. remove --logtostderr from the python script.
2. build libglog by yourself with gflags.

You said you failed to do the latter, but you can ignore the failure in 
logging_unittest. You should manually copy libglog.dylib or something.

Original comment by shinichi...@gmail.com on 10 May 2014 at 3:57

GoogleCodeExporter commented 8 years ago
If you want to do 1, the following script would work:

find . -name '*.py' -exec perl -i -p -e 's/--logtostderr//' {} \;

Original comment by shinichi...@gmail.com on 10 May 2014 at 4:05

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Shinichi, it works now after running this script: find . -name '*.py' -exec 
perl -i -p -e 's/--logtostderr//' {} \; Thanks 

Original comment by phongngu...@gmail.com on 10 May 2014 at 4:20