Build Failure with v1.14 in gTest.h Using Latest Intel Compiler On Windows

67 views
Skip to first unread message

Adam Hartshorne

unread,
Jun 4, 2019, 11:00:08 AM6/4/19
to Ceres Solver
Until recently I have had no issues building ceres v1.14 on windows using the Intel Compiler, which I use due to a noticeable speed-up compared to building with VS2017. I have just upgraded to the latest release and now am unable to build, due to a large series of errors relating to gtest.h file.

Unfortunately, I can't update to master branch as you have removed the EvaluationCallback functionality, which is essential to my usage of ceres.

The errors I am receiving relating to gtest.h are all of a similar nature such as detailed below.

gtest.h(2281): error : name followed by "::" must be a class or namespace name
3>  using GTEST_TUPLE_NAMESPACE_::get;


gtest
.h(10669): error : expected an identifier
3>  inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {


gtest
.h(10679): error : name followed by "::" must be a class or namespace name
3>  void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {

Sameer Agarwal

unread,
Jun 4, 2019, 11:05:33 AM6/4/19
to ceres-...@googlegroups.com
Evaluationcallback has not been removed yet :)


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/f115cb31-db3c-40c3-b153-b5d1dfe1c04d%40googlegroups.com.

Sameer Agarwal

unread,
Jun 4, 2019, 11:32:34 AM6/4/19
to ceres-...@googlegroups.com
also I have an alternative design for the replacement to EvaluationCallback which should have minimal impact on the api (roughly evaluationcallback moves from solver::options to problem) that I hope to work on fairly soon.

Adam Hartshorne

unread,
Jun 4, 2019, 2:50:23 PM6/4/19
to Ceres Solver
Ok. I will try building off the master branch.

Re - new EvaluationCallback. That sounds great. I look forward to it.


On Tuesday, 4 June 2019 16:05:33 UTC+1, Sameer Agarwal wrote:
Evaluationcallback has not been removed yet :)


On Tue, Jun 4, 2019, 8:00 AM Adam Hartshorne <adam.ha...@gmail.com> wrote:
Until recently I have had no issues building ceres v1.14 on windows using the Intel Compiler, which I use due to a noticeable speed-up compared to building with VS2017. I have just upgraded to the latest release and now am unable to build, due to a large series of errors relating to gtest.h file.

Unfortunately, I can't update to master branch as you have removed the EvaluationCallback functionality, which is essential to my usage of ceres.

The errors I am receiving relating to gtest.h are all of a similar nature such as detailed below.

gtest.h(2281): error : name followed by "::" must be a class or namespace name
3>  using GTEST_TUPLE_NAMESPACE_::get;


gtest
.h(10669): error : expected an identifier
3>  inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {


gtest
.h(10679): error : name followed by "::" must be a class or namespace name
3>  void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-...@googlegroups.com.

Adam Hartshorne

unread,
Jun 4, 2019, 6:07:47 PM6/4/19
to Ceres Solver
FYI, I have just tried to rebuild off the master branch (I was testing first with VS2017) and ran into the following build error.



On Tuesday, 4 June 2019 16:05:33 UTC+1, Sameer Agarwal wrote:
Evaluationcallback has not been removed yet :)


On Tue, Jun 4, 2019, 8:00 AM Adam Hartshorne <adam.ha...@gmail.com> wrote:
Until recently I have had no issues building ceres v1.14 on windows using the Intel Compiler, which I use due to a noticeable speed-up compared to building with VS2017. I have just upgraded to the latest release and now am unable to build, due to a large series of errors relating to gtest.h file.

Unfortunately, I can't update to master branch as you have removed the EvaluationCallback functionality, which is essential to my usage of ceres.

The errors I am receiving relating to gtest.h are all of a similar nature such as detailed below.

gtest.h(2281): error : name followed by "::" must be a class or namespace name
3>  using GTEST_TUPLE_NAMESPACE_::get;


gtest
.h(10669): error : expected an identifier
3>  inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {


gtest
.h(10679): error : name followed by "::" must be a class or namespace name
3>  void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-...@googlegroups.com.

Sameer Agarwal

unread,
Jun 5, 2019, 12:08:54 AM6/5/19
to ceres-...@googlegroups.com
Adam,
The details on that issue are too sparse to debug. Can you provide a more detailed log?
Sameer


To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/2be687a2-99ad-42af-84e4-c880ca692bc2%40googlegroups.com.

Keir Mierle

unread,
Jul 8, 2019, 4:43:40 PM7/8/19
to ceres-...@googlegroups.com
Hi Adam,

The EvaluationCallback patch has been merged into master.

Regarding gtest-- the issue is probably upstream GTest compatibility. We are moving towards full use of C++11 in Ceres 2.0, with the 1.x series ending with 1.14. I'm not sure how compatible the Intel compiler is. Can you try to build gtest upstream itself with the Intel compiler you're using, and if that's broken, fix GTest upstream?

Cheers,
Keir

Andrew Wilson

unread,
Jan 12, 2020, 9:19:00 PM1/12/20
to Ceres Solver
I know this is an old issue now, but in case anyone else runs into it, I think this might be related to the deletion of the std::tr1:: namespace in the C++17 standard. There's some discussion of it here (partly specific to MSVC though):


Looks like it has been fixed, and I guess gtest v1.10.0 should have the fix?

Sameer Agarwal

unread,
Jan 13, 2020, 9:02:43 AM1/13/20
to ceres-...@googlegroups.com
Andrew,
Is this a problem with the version of ceres at head? 
Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.

Andrew Wilson

unread,
Jan 13, 2020, 5:38:02 PM1/13/20
to Ceres Solver
Not as far as I know - I ran into the problem while using gtest in a different context.

That makes me wonder though - what version of gtest is Ceres using? I'm not even sure where Ceres' gtest comes from, as I don't remember needing to get it as part of the Ceres build process.

On a related note, I've also been wondering whether the project has "preferred" versions of glog/gflags etc. listed anywhere?
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-...@googlegroups.com.

Sameer Agarwal

unread,
Jan 13, 2020, 5:39:39 PM1/13/20
to ceres-...@googlegroups.com
gtest recommends that it be shipped inside the projects that it is used in. so we regularly pull a version of gtest into ceres's source code. 
if you look in the ceres commit log you should be able to see a regular update to gtest every year or so.
Sameer


To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/1ef74d6c-f5da-4663-81b7-e6b3e1560a5b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages