Multiple GFlags Installations Cause Problems - How to Fix?

77 views
Skip to first unread message

Kyle Wheatley

unread,
Sep 23, 2015, 9:35:45 PM9/23/15
to Caffe Users
Hello,

First of all, I am working on a cluster and do not have administrative permissions to uninstall a version of GFlags that is installed on the machine I am trying to build caffe on. 

What I did do was compile the GFlags for caffe as is mentioned in the installation instructions and I edited the FindGFlags.cmake file to make sure that it finds the version that I made and also added the flags suggested at this site to prevent it finding the default version instead. This works, Cmake notes that the correct version of GFlags is found (libraries and include). However, I know that there is another libgflags lurking on the system somewhere. 

Compilation succeeds. When I go to run caffe, I get the dreaded, "flag 'tab_complete_word' was defined more than once (in files '/path/a/gflags_completions.cc' and '/path/b/gflags_completions.cc" as has been discussed here. Despite having tried countless things over a week to fix this issue, I have not been able to do so. 

I believe the problem is that caffe is linking against both versions of the libgflags, the version that is installed on the system, and the version that I installed. The paths mentioned in the error indicate that one of them in the Gflags that I compiled, but the other is just a src/gflags_completions.cc... this is probably the gflags_completions.cc that was used when Gflags was installed on the system. 

As I stated, I do not have administrator permissions so I cannot simply uninstall GFlags on the server so that this error does not happen. I believe that there are multiple paths to the GFlags library which are being linked to possibly.. 

Can anybody tell me how to fix this error? I am clearly not the only one that has had this long standing problem. 
Reply all
Reply to author
Forward
0 new messages