The Wayback Machine - https://web.archive.org/web/20210112002833/https://github.com/cpp-netlib/cpp-netlib/issues/849
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpp-netlib release packages don't contain dependencies on googletest #849

Open
fmattiussi opened this issue Jun 27, 2018 · 7 comments
Open

cpp-netlib release packages don't contain dependencies on googletest #849

fmattiussi opened this issue Jun 27, 2018 · 7 comments
Assignees
Labels

Comments

@fmattiussi
Copy link

@fmattiussi fmattiussi commented Jun 27, 2018

After create the Makefile with CMake on the cpp-netlib-build folder i run the make command but there is the result:

libs/network/test/uri/CMakeFiles/cpp-netlib-uri_test.dir/build.make:65: set of instructions for the goal "libs/network/test/uri/CMakeFiles/cpp-netlib-uri_test.dir/uri_test.cpp.o" failed make[2]: *** [libs/network/test/uri/CMakeFiles/cpp-netlib-uri_test.dir/uri_test.cpp.o] Error 1 make[2]: exit from directory "/home/francesco/cpp-netlib-build" CMakeFiles/Makefile2:508: set of instructions for the goal "libs/network/test/uri/CMakeFiles/cpp-netlib-uri_test.dir/all" failed make[1]: *** [libs/network/test/uri/CMakeFiles/cpp-netlib-uri_test.dir/all] Error 2 make[1]: exit from directory "/home/francesco/cpp-netlib-build" Makefile:143: set of instructions for the goal "all" failed make: *** [all] Error `2

Can you help me? Thanks

@fmattiussi fmattiussi changed the title The source directory /cpp-netlib-0.13.0-rc1/deps/googletest does not contain a CMakeLists.txt file. Errors during the making netlib Jun 27, 2018
@fmattiussi fmattiussi changed the title Errors during the making netlib Errors during the making of netlib Jun 27, 2018
@dotapetro

This comment was marked as disruptive content.

@deanberris
Copy link
Member

@deanberris deanberris commented Aug 8, 2018

Hi @fmattiussi -- I'm really sorry for the delay here.

It looks like you're using the an 0.13.0-rc1 version of the library, which unfortunately does not contain the dependencies needed to build the tests. This is a problem, thank you for the report.

To get around this, you can opt to not build the tests if you don't want/need to run them yourself. The CMake options you want to define are:

  • CPP-NETLIB_BUILD_TESTS: Set this to OFF

If you're doing this on the command-line with cmake, it would be an option like:

cmake -DCPP-NETLIB_BUILD_TESTS=OFF <rest of the options>

Does that help?

@deanberris deanberris changed the title Errors during the making of netlib cpp-netlib release packages don't contain dependencies on googletest Aug 8, 2018
@deanberris deanberris self-assigned this Aug 8, 2018
@camgaertner
Copy link

@camgaertner camgaertner commented Jan 12, 2019

+1 for this issue, still present in the 0.13.0-final release

CMake Error at CMakeLists.txt:128 (add_subdirectory):
  The source directory

    /home/cameron/Code/lib/cpp-netlib/cpp-netlib-cpp-netlib-0.13.0-final/deps/googletest

  does not contain a CMakeLists.txt file.
@WinWinHost
Copy link

@WinWinHost WinWinHost commented Feb 15, 2019

Ran into the same issue.

RBAINDOU-M-4116:cpp-netlib-0.13.0-final robert$ cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
>   -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
>   -DCPP-NETLIB_ENABLE_HTTPS=$ENABLE_HTTPS \
>   -DBOOST_INCLUDEDIR="${HOME}/${CC}-boost_${BOOST_VERSION}/include" \
>   -DBOOST_LIBRARYDIR="${HOME}/${CC}-boost_${BOOST_VERSION}/lib" \
>   -DCMAKE_CXX_FLAGS="-std=c++11 ${CMAKE_CXX_FLAGS}" \
>
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
CMake Error at CMakeLists.txt:128 (add_subdirectory):
  The source directory

    /Users/robert/Desktop/cpp-netlib-0.13.0-final/deps/googletest

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "/Users/robert/Desktop/cpp-netlib-0.13.0-final/CMakeFiles/CMakeOutput.log".
@EmilyBjoerk
Copy link

@EmilyBjoerk EmilyBjoerk commented Jun 15, 2019

+1 for 0.13.0-final

@EmilyBjoerk
Copy link

@EmilyBjoerk EmilyBjoerk commented Jun 15, 2019

It seems like the entire deps/ directory is empty in the last few releases.
To work around this I did the following:

git clone https://github.com/cpp-netlib/cpp-netlib.git
cd cpp-netlib
git checkout cpp-netlib-0.13.0-final
git submodule init
git submodule update
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
make -j13

and now I can build the project without errors.

@deanberris
Copy link
Member

@deanberris deanberris commented Jun 17, 2019

Right. It looks like there's enough folks running into this that I'm going to spend a little bit of time to attempt to make this better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.