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

[date] link/build failure #9082

Closed
acgetchell opened this issue Nov 23, 2019 · 4 comments · Fixed by #11968
Closed

[date] link/build failure #9082

acgetchell opened this issue Nov 23, 2019 · 4 comments · Fixed by #11968
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@acgetchell
Copy link

Host Environment

  • OS: Windows, Linux, macOS
  • Compiler: clang-7, gcc-9, AppleClang 11.0.0 (clang-1100.0.33.8)

To Reproduce
Steps to reproduce the behavior:
./vcpkg install date

Add appropriate entries in CMakeLists, e.g.

acgetchell/CDT-plusplus@170f7c3

Failure logs

Windows:
https://ci.appveyor.com/project/acgetchell/cdt-plusplus/builds/29066845#L1214

Linux:
https://travis-ci.org/acgetchell/CDT-plusplus/jobs/615883747#L3777

macOS:

╭─adam@hapkido ~/CDT-plusplus/tools ‹feature/date› 
╰─$ ./build.sh 
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /Users/adam/vcpkg/installed/x64-osx/include (found version "1.71.0")  
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /Library/Developer/CommandLineTools/usr/bin/c++ compiler.
-- DARWIN_VERSION=19
-- Mac Leopard detected
-- Found GMP: /Users/adam/vcpkg/installed/x64-osx/debug/lib/libgmp.a  
-- Found MPFR: /Users/adam/vcpkg/installed/x64-osx/debug/lib/libmpfr.a  
-- Found Boost: /Users/adam/vcpkg/installed/x64-osx/include (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /Users/adam/vcpkg/installed/x64-osx/include
-- Boost libraries:    
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/adam/CDT-plusplus/build
Scanning dependencies of target initialize
[  6%] Building CXX object CMakeFiles/initialize.dir/src/initialize.cpp.o
[ 13%] Linking CXX executable initialize
[ 13%] Built target initialize
Scanning dependencies of target CDT_test
[ 20%] Building CXX object tests/CMakeFiles/CDT_test.dir/main.cpp.o
[ 26%] Building CXX object tests/CMakeFiles/CDT_test.dir/Ergodic_moves_3_test.cpp.o
[ 33%] Building CXX object tests/CMakeFiles/CDT_test.dir/Foliated_triangulation_test.cpp.o
[ 40%] Building CXX object tests/CMakeFiles/CDT_test.dir/Geometry_test.cpp.o
[ 46%] Building CXX object tests/CMakeFiles/CDT_test.dir/Manifold_test.cpp.o
[ 53%] Building CXX object tests/CMakeFiles/CDT_test.dir/Move_command_test.cpp.o
[ 60%] Building CXX object tests/CMakeFiles/CDT_test.dir/S3ActionTest.cpp.o
[ 66%] Building CXX object tests/CMakeFiles/CDT_test.dir/SphereTest.cpp.o
[ 73%] Building CXX object tests/CMakeFiles/CDT_test.dir/Tetrahedron_test.cpp.o
[ 80%] Building CXX object tests/CMakeFiles/CDT_test.dir/Torus_test.cpp.o
[ 86%] Building CXX object tests/CMakeFiles/CDT_test.dir/Utilities_test.cpp.o
[ 93%] Building CXX object tests/CMakeFiles/CDT_test.dir/VertexTest.cpp.o
[100%] Linking CXX executable CDT_test
Undefined symbols for architecture x86_64:
  "date::current_zone()", referenced from:
      currentDateTime() in Utilities_test.cpp.o
  "date::time_zone::get_info_impl(std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1l> > >) const", referenced from:
      date::sys_info date::time_zone::get_info<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l> > >(std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l> > >) const in Utilities_test.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tests/CDT_test] Error 1
make[1]: *** [tests/CMakeFiles/CDT_test.dir/all] Error 2
make: *** [all] Error 2

Additional context
#9006

@acgetchell acgetchell added the category:port-bug The issue is with a library, which is something the port should already support label Nov 23, 2019
@acgetchell
Copy link
Author

Adding date::tz to target_link_libraries as suggested by the install yields:

"/Users/adam/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/192.7142.39/CLion.app/Contents/bin/cmake/mac/bin/cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake -G "CodeBlocks - Unix Makefiles" /Users/adam/CDT-plusplus
-- Found Boost: /Users/adam/vcpkg/installed/x64-osx/include (found version "1.71.0")  
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /Library/Developer/CommandLineTools/usr/bin/c++ compiler.
-- DARWIN_VERSION=19
-- Mac Leopard detected
-- Found Boost: /Users/adam/vcpkg/installed/x64-osx/include (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /Users/adam/vcpkg/installed/x64-osx/include
-- Boost libraries:    
-- Configuring done
CMake Error at /Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake:166 (_add_executable):
  Target "initialize" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:137 (add_executable)

@Neumann-A
Copy link
Contributor

please open up an upstream issue (https:/HowardHinnant/date). Target data::tz is linking to Threads::Threads and missing the find_dependency call for Threads since date only install the CMake generated config files which never perform such calls.

@acgetchell
Copy link
Author

HowardHinnant/date#514

@acgetchell
Copy link
Author

Upstream has fixed the issue via HowardHinnant/date@fc4cf09

Need port upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants