mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Mahler <benjamin.mah...@gmail.com>
Subject Review Request 46804: Patched glog to eliminate system-level gflag library detection.
Date Thu, 28 Apr 2016 23:32:53 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46804/
-----------------------------------------------------------

Review request for mesos, Kapil Arya and Vinod Kone.


Repository: mesos


Description
-------

The glog library will attempt to detect whether the gflag library
is installed on the system. However, glog can compile correctly
when gflags is absent, due to a compatiblity layer:

https://github.com/google/glog/blob/v0.3.3/src/base/commandlineflags.h

We do not want a 3rd party dependency on the host to be picked up
by glog in general. In the case of gflags, it turns out that this
may break the build (when the gflag headers are incompatible).

There is no configure flag for disabling this auto-detection, so
we patch glog to remove it.


Diffs
-----

  3rdparty/libprocess/3rdparty/glog-0.3.3.patch f05f4b56bfc217f3fb82c32b56a950e0fc9956f2 

Diff: https://reviews.apache.org/r/46804/diff/


Testing
-------

`make check` succeeds with an installed gflags library.

Previously, the following occurs:

```
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread    -Wall -Wwrite-strings -Woverloaded-virtual
-Wno-sign-compare  -DNO_FRAME_POINTER  -g1 -O0 -Wno-unused-local-typedefs -std=c++11 -MT logging_unittest-logging_unittest.o
-MD -MP -MF .deps/logging_unittest-logging_unittest.Tpo -c -o logging_unittest-logging_unittest.o
`test -f 'src/logging_unittest.cc' || echo './'`src/logging_unittest.cc
src/logging_unittest.cc: In function ‘int main(int, char**)’:
src/logging_unittest.cc:179:43: error: ‘ParseCommandLineFlags’ was not declared in this
scope
   ParseCommandLineFlags(&argc, &argv, true);
                                           ^
src/logging_unittest.cc:179:43: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:346:15: note:   ‘gflags::ParseCommandLineFlags’
 extern GFLAGS_DLL_DECL uint32 ParseCommandLineFlags(int *argc, char*** argv, bool remove_flags);
               ^
src/logging_unittest.cc: In static member function ‘static void Test_DeathNoAllocNewHook_logging::Run()’:
src/logging_unittest.cc:296:130: error: ‘FlagSaver’ was not declared in this scope
 TEST(DeathNoAllocNewHook, logging) {
                                                                                         
                                        ^
src/logging_unittest.cc:296:130: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:296:140: error: expected ‘;’ before ‘fs’
 TEST(DeathNoAllocNewHook, logging) {
                                                                                         
                                                  ^
src/logging_unittest.cc: In function ‘void TestRawLogging()’:
src/logging_unittest.cc:308:3: error: ‘FlagSaver’ was not declared in this scope
   FlagSaver saver;
   ^
src/logging_unittest.cc:308:3: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:308:13: error: expected ‘;’ before ‘saver’
   FlagSaver saver;
             ^
src/logging_unittest.cc: In function ‘void LogWithLevels(int, int, bool, bool)’:
src/logging_unittest.cc:363:3: error: ‘FlagSaver’ was not declared in this scope
   FlagSaver saver;
   ^
src/logging_unittest.cc:363:3: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:363:13: error: expected ‘;’ before ‘saver’
   FlagSaver saver;
             ^
src/logging_unittest.cc: In static member function ‘static void Test_DeathRawCHECK_logging::Run()’:
src/logging_unittest.cc:436:118: error: ‘FlagSaver’ was not declared in this scope
 TEST(DeathRawCHECK, logging) {
                                                                                         
                            ^
src/logging_unittest.cc:436:118: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:436:128: error: expected ‘;’ before ‘fs’
 TEST(DeathRawCHECK, logging) {
                                                                                         
                                      ^
src/logging_unittest.cc: In static member function ‘static void Test_DeathSTREQ_logging::Run()’:
src/logging_unittest.cc:586:112: error: ‘FlagSaver’ was not declared in this scope
 TEST(DeathSTREQ, logging) {
                                                                                         
                      ^
src/logging_unittest.cc:586:112: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:586:122: error: expected ‘;’ before ‘fs’
 TEST(DeathSTREQ, logging) {
                                                                                         
                                ^
src/logging_unittest.cc: In static member function ‘static void Test_CheckNOTNULL_Simple::Run()’:
src/logging_unittest.cc:596:114: error: ‘FlagSaver’ was not declared in this scope
 TEST(CheckNOTNULL, Simple) {
                                                                                         
                        ^
src/logging_unittest.cc:596:114: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:596:124: error: expected ‘;’ before ‘fs’
 TEST(CheckNOTNULL, Simple) {
                                                                                         
                                  ^
src/logging_unittest.cc: In static member function ‘static void Test_DeathCheckNN_Simple::Run()’:
src/logging_unittest.cc:607:114: error: ‘FlagSaver’ was not declared in this scope
 TEST(DeathCheckNN, Simple) {
                                                                                         
                        ^
src/logging_unittest.cc:607:114: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:607:124: error: expected ‘;’ before ‘fs’
 TEST(DeathCheckNN, Simple) {
                                                                                         
                                  ^
src/logging_unittest.cc: In static member function ‘static void Test_SafeFNMatch_logging::Run()’:
src/logging_unittest.cc:866:114: error: ‘FlagSaver’ was not declared in this scope
 TEST(SafeFNMatch, logging) {
                                                                                         
                        ^
src/logging_unittest.cc:866:114: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:866:124: error: expected ‘;’ before ‘fs’
 TEST(SafeFNMatch, logging) {
                                                                                         
                                  ^
src/logging_unittest.cc: In static member function ‘static void Test_Strerror_logging::Run()’:
src/logging_unittest.cc:1041:108: error: ‘FlagSaver’ was not declared in this scope
 TEST(Strerror, logging) {
                                                                                         
                  ^
src/logging_unittest.cc:1041:108: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:1041:118: error: expected ‘;’ before ‘fs’
 TEST(Strerror, logging) {
                                                                                         
                            ^
src/logging_unittest.cc: In static member function ‘static void Test_UserDefinedClass_logging::Run()’:
src/logging_unittest.cc:1206:124: error: ‘FlagSaver’ was not declared in this scope
 TEST(UserDefinedClass, logging) {
                                                                                         
                                  ^
src/logging_unittest.cc:1206:124: note: suggested alternative:
In file included from src/glog/logging.h:85:0,
                 from src/utilities.h:82,
                 from src/logging_unittest.cc:33:
/usr/include/gflags/gflags.h:277:7: note:   ‘gflags::FlagSaver’
 class GFLAGS_DLL_DECL FlagSaver {
       ^
src/logging_unittest.cc:1206:134: error: expected ‘;’ before ‘fs’
 TEST(UserDefinedClass, logging) {
                                                                                         
                                            ^
make[7]: *** [logging_unittest-logging_unittest.o] Error 1
```


Thanks,

Ben Mahler


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message