Missing Seviceincludes.h file

112 views
Skip to first unread message

George Gentry

unread,
Oct 8, 2016, 11:24:31 AM10/8/16
to Lucida Users
I have started to make Lucida and hit this snag.

make -C opencv_imm all || exit 1;
make[1]: Entering directory '/home/george/Lucida/lucida/imagematching/opencv_imm'
make -C server all || exit 1; make -C test all || exit 1;
make[2]: Entering directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'
g++ -Wall -std=c++11 -fPIC  -O3 -c gen-cpp2/LucidaService_client.cpp -o gen-cpp2/LucidaService_client.o
In file included from gen-cpp2/LucidaService_client.cpp:7:0:
gen-cpp2/LucidaService.h:9:45: fatal error: thrift/lib/cpp2/ServiceIncludes.h: No such file or directory
compilation terminated.
Makefile:62: recipe for target 'gen-cpp2/LucidaService_client.o' failed
make[2]: *** [gen-cpp2/LucidaService_client.o] Error 1
make[2]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'
../../../Makefile.common:13: recipe for target 'all-sub' failed
make[1]: *** [all-sub] Error 1
make[1]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm'
../../Makefile.common:13: recipe for target 'all-sub' failed
make: *** [all-sub] Error 1

what do I need to change to get this file generated?
I am using Mint/ubuntu OS

Can anyone tell me what to change or how to get this file to generate?

Thanks

Yunsheng Bai

unread,
Oct 8, 2016, 2:00:19 PM10/8/16
to Lucida Users
Hi,

Have you compiled the necessary dependencies (in this case, fbthrift) in https://github.com/claritylab/lucida/tree/master/tools? Thanks!

George Gentry

unread,
Oct 8, 2016, 2:47:08 PM10/8/16
to Lucida Users


On Saturday, October 8, 2016 at 1:00:19 PM UTC-5, Yunsheng Bai wrote:
Hi,

Have you compiled the necessary dependencies (in this case, fbthrift) in https://github.com/claritylab/lucida/tree/master/tools? Thanks!





Hi Yunsheng,

I thought I remembered seeing it compiled when I first ran the compile but it was somewhere around 3 am when it got to that point.  Just to be sure I did a total recompile -

 sudo ./install_fbthrift.sh) || (exit 1)
Facebook Thrift installed

I did see other errors posted though

(sudo ./install_mongodb.sh) || (exit 1)
check_mongodb.cpp:5:35: fatal error: mongo/client/dbclient.h: No such file or directory
compilation terminated.
Faile to install MongoDB and C++ driver

  -- and of course


In file included from gen-cpp2/LucidaService_client.cpp:7:0:
gen-cpp2/LucidaService.h:9:45: fatal error: thrift/lib/cpp2/ServiceIncludes.h: No such file or directory
compilation terminated.

  -- and I am assuming these failures area result of not finding the ServiceIncludes file.


Makefile:62: recipe for target 'gen-cpp2/LucidaService_client.o' failed
make[4]: *** [gen-cpp2/LucidaService_client.o] Error 1
make[4]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'

../../../Makefile.common:13: recipe for target 'all-sub' failed
make[3]: *** [all-sub] Error 1
make[3]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm'

../../Makefile.common:13: recipe for target 'all-sub' failed
make[2]: *** [all-sub] Error 1
make[2]: Leaving directory '/home/george/Lucida/lucida/imagematching'

../Makefile.common:13: recipe for target 'all-sub' failed
make[1]: *** [all-sub] Error 1
make[1]: Leaving directory '/home/george/Lucida/lucida'
Makefile:18: recipe for target 'local' failed
make: *** [local] Error 2


Any other ideas?

Thanks




Yunsheng Bai

unread,
Oct 8, 2016, 3:31:57 PM10/8/16
to Lucida Users
Have you set up this environment variable as stated in the top level README:

If for some reason you need to compile part of it (e.g. one back-end service), make sure to set the following environment variable as set in Makefile:

export LD_LIBRARY_PATH=/usr/local/lib


Thanks!

On Saturday, October 8, 2016 at 11:24:31 AM UTC-4, George Gentry wrote:

George Gentry

unread,
Oct 8, 2016, 9:10:12 PM10/8/16
to Lucida Users
Since I did a complete recompile I did not believe I need to do that.
But I have installed it now, but into the ~/.profile file rather than the bash_profile as Ubuntu does not normally have the bash_profile file

# -- Having done that I tried to just a partial recompile of the ./tools and got these errors.

src/mongo/base/global_initializer.cpp:32:14: error: 'mongo::{anonymous}::_theGlobalInitializer' defined but not used [-Werror=unused-variable]
 Initializer* _theGlobalInitializer = &getGlobalInitializer();
              ^
cc1plus: all warnings being treated as errors
scons: *** [build/linux2/c++11_on/ssl/mongo/base/global_initializer.o] Error 1
scons: building terminated because of errors.
check_mongodb.cpp:5:35: fatal error: mongo/client/dbclient.h: No such file or directory
compilation terminated.

Faile to install MongoDB and C++ driver

# --So running a complete recompile got me -

src/mongo/base/global_initializer.cpp:32:14: error: 'mongo::{anonymous}::_theGlobalInitializer' defined but not used [-Werror=unused-variable]
 Initializer* _theGlobalInitializer = &getGlobalInitializer();
              ^
cc1plus: all warnings being treated as errors
scons: *** [build/linux2/c++11_on/ssl/mongo/base/global_initializer.o] Error 1
scons: building terminated because of errors.
check_mongodb.cpp:5:35: fatal error: mongo/client/dbclient.h: No such file or directory
compilation terminated.

Faile to install MongoDB and C++ driver

# --and finally this killed the complilation


make -C server all || exit 1; make -C test all || exit 1;
make[4]: Entering directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'

g++ -Wall -std=c++11 -fPIC  -O3 -c gen-cpp2/LucidaService_client.cpp -o gen-cpp2/LucidaService_client.o
In file included from gen-cpp2/LucidaService_client.cpp:7:0:
gen-cpp2/LucidaService.h:9:45: fatal error: thrift/lib/cpp2/ServiceIncludes.h: No such file or directory
compilation terminated.
Makefile:62: recipe for target 'gen-cpp2/LucidaService_client.o' failed
make[4]: *** [gen-cpp2/LucidaService_client.o] Error 1
make[4]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'

../../../Makefile.common:13: recipe for target 'all-sub' failed
make[3]: *** [all-sub] Error 1
make[3]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm'

../../Makefile.common:13: recipe for target 'all-sub' failed
make[2]: *** [all-sub] Error 1
make[2]: Leaving directory '/home/george/Lucida/lucida/imagematching'
../Makefile.common:13: recipe for target 'all-sub' failed
make[1]: *** [all-sub] Error 1
make[1]: Leaving directory '/home/george/Lucida/lucida'
Makefile:18: recipe for target 'local' failed
make: *** [local] Error 2

# -- I dont know what else you might need to know but I also got these warnings early on in the compile.  Most of this information is probably not what you need to know but I am # -- thinking it is better to have too much information than not enough.  Is there another file I need to edit?

The directory '/home/george/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/george/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: distribute in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: setuptools>=0.7 in /usr/local/lib/python2.7/dist-packages (from distribute)
The directory '/home/george/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/george/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
The directory '/home/george/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/george/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

These warnings seemed odd as I am the owner and super user.

Thanks

Yunsheng Bai

unread,
Oct 9, 2016, 2:27:46 PM10/9/16
to Lucida Users
What version of gcc are you using? I tested the entire build system just now (using Dockerfile https://github.com/claritylab/lucida/blob/master/Dockerfile), and the compilation of MongoDB C++ driver succeeded. Thanks!


On Saturday, October 8, 2016 at 11:24:31 AM UTC-4, George Gentry wrote:

George Gentry

unread,
Oct 9, 2016, 2:52:19 PM10/9/16
to Lucida Users


On Sunday, October 9, 2016 at 1:27:46 PM UTC-5, Yunsheng Bai wrote:
What version of gcc are you using? I tested the entire build system just now (using Dockerfile https://github.com/claritylab/lucida/blob/master/Dockerfile), and the compilation of MongoDB C++ driver succeeded. Thanks!



showing that I am using version 4:5.3.1-1ubuntu1

George Gentry

unread,
Oct 9, 2016, 2:58:52 PM10/9/16
to Lucida Users
    also a thought - I am not using the dockerfile - should I be using this?  And I looked at the link you supplied and it shows that it is from ubuntu 14.04 while I am using the 16 version - will this affect the compile?
  

Yunsheng Bai

unread,
Oct 9, 2016, 3:02:01 PM10/9/16
to Lucida Users
Please try the following gcc version:

gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)


which supports C++11. If it still doesn't compile, let me know and I am willing to further help. Thanks!


On Saturday, October 8, 2016 at 11:24:31 AM UTC-4, George Gentry wrote:

George Gentry

unread,
Oct 9, 2016, 4:25:14 PM10/9/16
to Lucida Users


On Sunday, October 9, 2016 at 2:02:01 PM UTC-5, Yunsheng Bai wrote:
Please try the following gcc version:

gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)


which supports C++11. If it still doesn't compile, let me know and I am willing to further help. Thanks!


I updated the gcc and ran a complete compile.  I received the same errors.
so I did a check to make certain I had updated correctly
----------------------------------
 $gcc --version
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
----------------------------------
hopefully this more rescent update will not affect the compile.

and I checked the g ++
--------------------------------------
g++ --version
g++ (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
----------------------------------------

I know I am missing something here if you got a good compile and I have consistent failures.

I ran a new compile and put it in a text file which I will attach in hopes that your having the output of the terminal will make it far easier for you by letting you see just what is happening.

Thanks
TerminalLucida.txt

Yunsheng Bai

unread,
Oct 9, 2016, 4:33:49 PM10/9/16
to Lucida Users
According to https://jira.mongodb.org/browse/SERVER-19353, it seems that they haven't supported gcc5.1 yet, and from https://jira.mongodb.org/browse/SERVER-17235, it seems that they haven't really tested on gcc4.9 yet. That's why I recommend using gcc4.8.4. I apologize for not explicitly requiring this in the Github repo. 

Thanks a lot!

On Saturday, October 8, 2016 at 11:24:31 AM UTC-4, George Gentry wrote:

George Gentry

unread,
Oct 9, 2016, 6:09:48 PM10/9/16
to Lucida Users


On Sunday, October 9, 2016 at 3:33:49 PM UTC-5, Yunsheng Bai wrote:
According to https://jira.mongodb.org/browse/SERVER-19353, it seems that they haven't supported gcc5.1 yet, and from https://jira.mongodb.org/browse/SERVER-17235, it seems that they haven't really tested on gcc4.9 yet. That's why I recommend using gcc4.8.4. I apologize for not explicitly requiring this in the Github repo. 

Thanks a lot!



I have reset the GCC and G++ symlinks to both point to the 4.8 versions.

ran complete compile

and of course it did not go smoothly for me.
===================================
In file included from src/mongo/bson/bson_validate.cpp:22:0:
src/mongo/base/data_view.h: In member function 'const mongo::ConstDataView& mongo::ConstDataView::readNative(T*, size_t) const':
src/mongo/base/data_view.h:43:23: error: 'is_trivially_copyable' is not a member of 'std'
------------------
src/mongo/base/data_view.h:43:51: error: expected primary-expression before '>' token
------------------
src/mongo/base/data_view.h:43:52: error: '::value' has not been declared
         static_assert(std::is_trivially_copyable<T>::value
------------
scons: *** [build/linux2/c++11_on/ssl/mongo/bson/bson_validate.o] Error 1

scons: building terminated because of errors.
--------------
check_mongodb.cpp:5:35: fatal error: mongo/client/dbclient.h: No such file or directory
 #include "mongo/client/dbclient.h"
                                   ^

compilation terminated.
Faile to install MongoDB and C++ driver
----------------

In file included from gen-cpp2/LucidaService_client.cpp:7:0:
gen-cpp2/LucidaService.h:9:45: fatal error: thrift/lib/cpp2/ServiceIncludes.h: No such file or directory
 #include <thrift/lib/cpp2/ServiceIncludes.h>
                                             ^
compilation terminated.
-------------------------------------------

Makefile:62: recipe for target 'gen-cpp2/LucidaService_client.o' failed
make[4]: *** [gen-cpp2/LucidaService_client.o] Error 1
make[4]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm/server'

../../../Makefile.common:13: recipe for target 'all-sub' failed
make[3]: *** [all-sub] Error 1
make[3]: Leaving directory '/home/george/Lucida/lucida/imagematching/opencv_imm'

../../Makefile.common:13: recipe for target 'all-sub' failed
make[2]: *** [all-sub] Error 1
make[2]: Leaving directory '/home/george/Lucida/lucida/imagematching'
../Makefile.common:13: recipe for target 'all-sub' failed
make[1]: *** [all-sub] Error 1
make[1]: Leaving directory '/home/george/Lucida/lucida'
Makefile:18: recipe for target 'local' failed
make: *** [local] Error 2
===========================================

Thanks


 

Yunsheng Bai

unread,
Oct 10, 2016, 10:38:54 PM10/10/16
to Lucida Users
Sorry to hear that. 

It may be because you are using Ubuntu 16. Unfortunately, these C/C++ dependencies are really picky when you try to compile them, which is a big reason why many people prefer to develop in Java or Python. That being said, you could keep digging into that issue, or switch to Ubuntu 14, or give Docker container a try. 

I personally recommend the last one, because it does not involve any compilation. You can bash into the container "docker run -it claritylab/lucida:v2.1 /bin/bash" after you pull it "docker pull claritylab/lucida:v2.1". One downside, however, is that you cannot easily test or develop using some kind of IDE. Another downside is that you may need to commit your container to the image each time you modify something in the container, and there is a maximum number of commits (about 128) for a given image.

Let me know if you need any help on either of the three. Thanks a lot!


On Saturday, October 8, 2016 at 11:24:31 AM UTC-4, George Gentry wrote:
Reply all
Reply to author
Forward
0 new messages