ssf icon indicating copy to clipboard operation
ssf copied to clipboard

OSX build break

Open davidfavor opened this issue 9 years ago • 5 comments

Something is missing from the build instructions related to googletest.

First problem is https://github.com/google/googletest archive download links no longer exist.

Attempting to use googletest-master.zip throws an error because gtest.x.x.x.zip cannot be found.

This means that the googletest-master.zip file must be downloaded + unzipped + renamed to gtest-x.x.x + rezipped as gtest.x.x.x.zip + placed in the third_party/gtest directory.

After gtest.x.x.x.zip is placed in the third_party/gtest directory the file can be found + the cmake file can't figure out the format of the zip file.

The error thrown, is...

cmake -DCMAKE_BUILD_TYPE="Release" -DSSF_SECURITY:STRING="STANDARD" ../ ** SSF_SECURITY is STANDARD ** BOOST_ROOT: /smartbuild/work/ssf.git/third_party/boost ** OPENSSL_ROOT_DIR: /smartbuild/work/ssf.git/third_party/openssl -- [Boost] Looking for components: chrono, date_time, filesystem, log, program_options, regex, serialization, system, thread -- [Boost] Using package archive: /smartbuild/work/ssf.git/third_party/Boost/boost_1_60_0.tar.bz2 -- [Boost] Found source path: /smartbuild/work/ssf.git/build/src.externals/boost_1_60_0 -- [OpenSSL] Looking for components: -ALL- -- [OpenSSL] Using package archive: /smartbuild/work/ssf.git/third_party/openssl/openssl-1.0.2g.tar.gz -- [OpenSSL] Found source path: /smartbuild/work/ssf.git/build/src.externals/openssl-1.0.2g -- [gtest] Using package archive: /smartbuild/work/ssf.git/third_party/gtest/gtest-1.7.0.zip CMake Error at third_party/cmake-build-system/external-packages/ExternalPackageHelpers.cmake:262 (message): [gtest] # Cannot determine gtest's source directory () Call Stack (most recent call first): third_party/cmake-build-system/external-packages/ExternalPackageHelpers.cmake:834 (external_error) third_party/cmake-build-system/external-packages/gtest/GTest.cmake:18 (external_search_source_path) CMakeLists.txt:267 (gtest_unpack_archive)

Suggestions appreciated.

davidfavor avatar Apr 25 '16 02:04 davidfavor

Thanks for you feedback. Indeed, the URL has changed. We will fix the url in our doc.

You cannot take the master zip from github because it merges googletest and googlemock but you can download the release 1.7.0 from here. This should fix the build.

However, if you don't want to generate test targets, you can also disable them by adding the following CMake option -DBUILD_UNIT_TESTS=OFF

securesocketfunneling avatar Apr 26 '16 11:04 securesocketfunneling

Rather leave tests enabled.

The above link for google test fails also. Renaming googletest-release-1.7.0.zip to gtest-1.7.0.zip inside the gtest directory fails also.

Adding -DBUILD_UNIT_TESTS=OFF to cmake command also fails with same problem, so this doesn't really disable tests.

I'd really like to test this tool + prefer to build it from source.

Let me know other suggestions.

davidfavor avatar Apr 26 '16 19:04 davidfavor

bp-david# cmake -DCMAKE_BUILD_TYPE="Release" -DSSF_SECURITY:STRING="STANDARD" -DBUILD_UNIT_TESTS=OFF ../ ** SSF_SECURITY is STANDARD ** BOOST_ROOT: /smartbuild/work/ssf.git/third_party/boost ** OPENSSL_ROOT_DIR: /smartbuild/work/ssf.git/third_party/openssl -- [Boost] Looking for components: chrono, date_time, filesystem, log, program_options, regex, serialization, system, thread -- [Boost] Using package archive: /smartbuild/work/ssf.git/third_party/Boost/boost_1_60_0.tar.bz2 -- [Boost] Found source path: /smartbuild/work/ssf.git/build/src.externals/boost_1_60_0 -- [OpenSSL] Looking for components: -ALL- -- [OpenSSL] Using package archive: /smartbuild/work/ssf.git/third_party/openssl/openssl-1.0.2g.tar.gz -- [OpenSSL] Found source path: /smartbuild/work/ssf.git/build/src.externals/openssl-1.0.2g -- [gtest] Using package archive: /smartbuild/work/ssf.git/third_party/gtest/gtest-1.7.0.zip CMake Error at third_party/cmake-build-system/external-packages/ExternalPackageHelpers.cmake:262 (message): [gtest] # Cannot determine gtest's source directory () Call Stack (most recent call first): third_party/cmake-build-system/external-packages/ExternalPackageHelpers.cmake:834 (external_error) third_party/cmake-build-system/external-packages/gtest/GTest.cmake:18 (external_search_source_path) CMakeLists.txt:267 (gtest_unpack_archive)

-- Configuring incomplete, errors occurred! See also "/smartbuild/work/ssf.git/build/CMakeFiles/CMakeOutput.log".

davidfavor avatar Apr 26 '16 19:04 davidfavor

By the way, thanks for your fast response above.

davidfavor avatar Apr 26 '16 22:04 davidfavor

Sorry for the delay.

We made some changes to the CMake scripts to improve the test disabling. Thanks for your feedback.

The archive content of gtest 1.7.0 in Github has changed a little bit. It fails because of the root folder name inside the archive (googletest-release-1.7.0). The build system is expecting gtest-1.7.0. Renaming it should do the trick.

We will replace this archive extraction by a submodule in a next release.

securesocketfunneling avatar Aug 24 '16 14:08 securesocketfunneling