2

I can't build assimp 3.2 anymore. Yesterday it worked but today it doesn't.

I am downloading assimp from here. Then I'm doing cmake CMakeLists.txt -G 'Unix Makefiles' and make as described in their INSTALL file. However when doing make I get the following error:

[ 84%] Performing configure step for 'gtest'
CMake Error at /home/gartenriese/Documents/assimp/assimp-3.2/test/gtest/src/gtest-stamp/gtest-configure.cmake:16 (message):
  Command failed: 1

   '/usr/bin/cmake' '-DCMAKE_BUILD_TYPE=' '-Dgtest_force_shared_crt=ON' '-Dgtest_disable_pthreads:BOOL=OFF' '-GUnix Makefiles' '/home/gartenriese/Documents/assimp/assimp-3.2/test/gtest/src/gtest'

  See also

    /home/gartenriese/Documents/assimp/assimp-3.2/test/gtest/src/gtest-stamp/gtest-configure-*.log



make[2]: *** [test/gtest/src/gtest-stamp/gtest-configure] Error 1

gtest-configure-out.log is empty, however gtest-configure-err.log says the following:

CMake Error: The source directory "/home/gartenriese/Documents/assimp/assimp-3.2/test/gtest/src/gtest" does not appear to contain CMakeLists.txt.

Any ideas? It worked yesterday and I did not change anything on my system globally.

EDIT:

I can build it with the option -DASSIMP_BUILD_TESTS=OFF added to the cmake command. However this is just a workaround and does not explain the issue.

gartenriese
  • 4,131
  • 6
  • 36
  • 60

1 Answers1

6

Because project assimp used incorrect link to gtest repository

Currently cmake-modules/AddGTest.cmake used link to chromium repository which is deprecated and all code removed from it.

From README.md

This mirror has been deprecated. 
The actual repository has moved to https://github.com/google/googletest/ 

So you should update link in AddGTest.cmake to point into Github repository.

UPDATE:

Pull request was already merged into assimp's master branch. So use it instead of repository from comments.

Sergei Nikulov
  • 5,029
  • 23
  • 36
  • If I do that it completes 'gtest', however afterwards it says `fatal error: gtest/gtest.h: No such file or directory` – gartenriese Feb 05 '16 at 09:17
  • @gartenriese here the change I've made to use new repo https://github.com/snikulov/google-test-examples/commit/d4a3d02c27073405bb7e53fe6ad553e406928af6 – Sergei Nikulov Feb 05 '16 at 09:28
  • I added your changes and also changed `link_directories(${binary_dir)` to `link_directories(${GTEST_LIBS_DIR})`. However now it says `No rule to make target `test/gtest/src/gtest-build/libgtest.a', needed by `bin/unit'. Stop.` – gartenriese Feb 05 '16 at 09:41
  • BTW, I kept the ExternalProject name `gtest` for convenience. – gartenriese Feb 05 '16 at 09:42
  • 1
    @gartenriese Could you please check you build on https://github.com/snikulov/assimp branch gtest_upd ? – Sergei Nikulov Feb 05 '16 at 10:13
  • Yes, that works. You should make a pull request. Thanks! – gartenriese Feb 05 '16 at 11:24
  • @SergeiNikulov could you share that repo again, it's now showing 404 on your link and I have this issue too. Thanks -Edit, nevermind, I got the changes from the link in your answer. – Dover8 Feb 26 '16 at 16:42
  • @Dover8 It because it was already merged into upstream repository with following commit https://github.com/assimp/assimp/commit/982d597acf3a8ae8ed6da21e83d930b547d2893a . So just use assimp master branch. It was already fixed here. – Sergei Nikulov Feb 26 '16 at 20:22