Hi I am trying to compile the AWS S3 plugin in Ubuntu.
I have used both methods, using vcpkg and without vcpkg.
In both cases, I am getting the following error while compiling the plugin:
“Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)”
Can anyone advise on this?
Full length output is below:
$ cmake -DCMAKE_TOOLCHAIN_FILE=…/…/aws/builds/aws-sdk-cpp/vcpkg/scripts/buildsystems/vcpkg.cmake …/…/awss3plugin/awss3plugin/Aws
Output:
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
Forking the Orthanc source repository using Mercurial
destination directory: orthanc
requesting all changes
adding changesets
adding manifests
adding file changes
added 4310 changesets with 19965 changes to 2421 files (+7 heads)
new changesets 3959d33612cc:73de065622ec
updating to branch default
761 files updated, 0 files merged, 0 files removed, 0 files unresolved
Setting branch of the Orthanc repository to: Orthanc-1.7.3
287 files updated, 0 files merged, 19 files removed, 0 files unresolved
– Found PythonInterp: /usr/bin/python (found version “2.7.17”)
– Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)
CMake Error at /home/ubuntu/build/aws/orthanc/OrthancFramework/Resources/CMake/GoogleTestConfiguration.cmake:81 (message):
Unable to find GoogleTest
Call Stack (most recent call first):
/home/ubuntu/build/aws/orthanc/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake:449 (include)
CMakeLists.txt:28 (include)
– Configuring incomplete, errors occurred!
See also “/home/ubuntu/build/aws/CMakeFiles/CMakeOutput.log”.
Hello,
Try setting “-DUSE_SYSTEM_GOOGLE_TEST=OFF” while invoking CMake.
HTH
Sebastein
Recompiled as your suggestions, resolved googletest errors. Now different error is coming regarding cryptopp (full error below). I had installed cryptopp dependency of vcpkg as described in https://book.orthanc-server.com/plugins/object-storage.html#object-storage.
Can you please advise on this?
Short Error:
Could not find a package configuration file provided by “cryptopp” with any
of the following names:
cryptoppConfig.cmake
cryptopp-config.cmake
Full Output:
$ cmake -DUSE_SYSTEM_GOOGLE_TEST=OFF -DALLOW_DOWNLOADS=ON -DCMAKE_TOOLCHAIN_FILE= …..\aws\builds\aws-sdk-cpp\vcpkg\scripts\buildsystems\vcpkg.cmake …/…/awss3plugin/awss3plugin/Aws
Output:
– The C compiler identification is GNU 7.5.0
requesting all changes
adding changesets
adding manifests
adding file changes
added 4311 changesets with 19998 changes to 2422 files (+7 heads)
new changesets 3959d33612cc:2ae905070221
updating to branch default
761 files updated, 0 files merged, 0 files removed, 0 files unresolved
Setting branch of the Orthanc repository to: Orthanc-1.7.3
296 files updated, 0 files merged, 20 files removed, 0 files unresolved
– Found PythonInterp: /usr/bin/python (found version “2.7.17”)
Using local copy of http://orthanc.osimis.io/ThirdPartyDownloads/gtest-1.8.1.tar.gz
Uncompressing gtest-1.8.1.tar.gz
JsonCpp include dir: /usr/include/jsoncpp
– Looking for C++ include /usr/include/jsoncpp/json/reader.h
– Looking for C++ include /usr/include/jsoncpp/json/reader.h - found
JsonCpp major version: 1
Switching to C++11 standard in gcc, as version of JsonCpp is >= 1.0.0
– Looking for uuid/uuid.h
– Looking for uuid/uuid.h - found
– Looking for uuid_generate_random in /usr/lib/x86_64-linux-gnu/libuuid.so
– Looking for uuid_generate_random in /usr/lib/x86_64-linux-gnu/libuuid.so - found
– Boost version: 1.65.1
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Boost version: 1.65.1
– Found the following Boost libraries:
– filesystem
– thread
– system
– date_time
– regex
– chrono
– atomic
CMake Error at CMakeLists.txt:47 (find_package):
Could not find a package configuration file provided by “cryptopp” with any
of the following names:
cryptoppConfig.cmake
cryptopp-config.cmake
Add the installation prefix of “cryptopp” to CMAKE_PREFIX_PATH or set
“cryptopp_DIR” to a directory containing one of the above files. If
“cryptopp” provides a separate development package or SDK, be sure it has
been installed.
– Configuring incomplete, errors occurred!
See also “/home/ubuntu/build/aws/CMakeFiles/CMakeOutput.log”.
See also “/home/ubuntu/build/aws/CMakeFiles/CMakeError.log”.
I have updated the Orthanc Book with instructions that work on my Ubuntu 18.04 box:
https://book.orthanc-server.com/plugins/object-storage.html#aws-s3-plugin
=> Check out what follows “NB”, those instructions do not use vcpkg.
Sebastein
Thanks for the update. I also came across the same solution by hit and trial. My plugin is compiled now. Thanks for your guidance.
Regards
Kavi