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

error downloading doctest: "Couldn't resolve host name" #2

Closed
Petross404 opened this issue Dec 1, 2020 · 4 comments
Closed

error downloading doctest: "Couldn't resolve host name" #2

Petross404 opened this issue Dec 1, 2020 · 4 comments

Comments

@Petross404
Copy link

Hi there, I found out lexy and I wanted to try it. For this to happen I wrote an ebuild for my Gentoo system but configuration fails with this error:

 Emerging (1 of 1) dev-util/lexy-9999::testing
 * dev-util/lexy will not be compiled with PGO.
>>> Unpacking source...
Initialized empty Git repository in /mnt/distfiles/git3-src/foonathan_lexy.git/
 * Repository id: foonathan_lexy.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_FOONATHAN_LEXY
 *   EGIT_OVERRIDE_BRANCH_FOONATHAN_LEXY
 *   EGIT_OVERRIDE_COMMIT_FOONATHAN_LEXY
 *   EGIT_OVERRIDE_COMMIT_DATE_FOONATHAN_LEXY
 * 
 * Fetching https://github.com/foonathan/lexy.git ...
git fetch https://github.com/foonathan/lexy.git +HEAD:refs/git-r3/HEAD
remote: Enumerating objects: 374, done.
remote: Counting objects: 100% (374/374), done.
remote: Compressing objects: 100% (200/200), done.
remote: Total 2953 (delta 187), reused 292 (delta 143), pack-reused 2579
Receiving objects: 100% (2953/2953), 574.83 KiB | 900.00 KiB/s, done.
Resolving deltas: 100% (2004/2004), done.
From https://github.com/foonathan/lexy
 * [new ref]                    -> refs/git-r3/HEAD
git symbolic-ref refs/git-r3/dev-util/lexy/0/__main__ refs/git-r3/HEAD
 * Checking out https://github.com/foonathan/lexy.git to /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999 ...
git checkout --quiet refs/git-r3/HEAD
GIT NEW branch -->
   repository:               https://github.com/foonathan/lexy.git
   at the commit:            3003acc03fd3ae5c2830de4de20c6da09ab32054
>>> Source unpacked in /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work
>>> Preparing source in /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999 ...
>>> Source prepared.
>>> Configuring source in /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999 ...
>>> Working in BUILD_DIR: "/mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999_build"
cmake -C /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999_build/gentoo_toolchain.cmake  /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999
loading initial cache file /mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999_build/gentoo_common_config.cmake
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at tests/CMakeLists.txt:19 (message):
  error downloading doctest: "Couldn't resolve host name"Could not resolve
  host: raw.githubusercontent.com

  Closing connection 0



-- Configuring incomplete, errors occurred!
See also "/mnt/Volume_3/Gentoo/temp/portage/dev-util/lexy-9999/work/lexy-9999_build/CMakeFiles/CMakeOutput.log".
 * ERROR: dev-util/lexy-9999::testing failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 2770:  Called cmake-utils_src_configure
 *   environment, line 1188:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";

When I clone and build manually lexy there is no problem. Any pointer on what I am looking to fix?
Thank you!

@foonathan
Copy link
Owner

As a quick workaround, you can manually download doctest.h (from https://raw.githubusercontent.com/onqtam/doctest/master/doctest/doctest.h) and save it under your build directory. Then create a copy and rename it to doctest_main.h. That way CMake doesn't try to download it.

I'll see what I can do about it.

@Petross404
Copy link
Author

Is it related to any testing? Because if it is I could possibly turn off any tests as a workaround. But I looked with cmake-gui and I don't recall finding any lexy-related flag for tests.

@foonathan
Copy link
Owner

Yes, it is only for the tests. I currently don't have an option to disable tests; they're automatically disabled if it is a subdirectory.

foonathan added a commit that referenced this issue Dec 1, 2020
@foonathan
Copy link
Owner

foonathan commented Dec 1, 2020

I've switched to FetchContent to get doctest and tests can be disabled using LEXY_BUILD_TESTS. Let me know if that works for you.

foonathan added a commit that referenced this issue Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants