hpx: Support for vcpkg on Linux is broken

Expected Behavior

I was trying to get started under ubuntu 22.04 with the intro tutorial from: https://hpx-docs.stellar-group.org/latest/html/quickstart.html

Actual Behavior

I get linker errors:


/usr/bin/ld: /home/hcw/git/vcpkg/installed/x64-linux/debug/lib/libhpx_agas_based.a(primary_namespace.cpp.o): in function `hpx::agas::primary_namespace::route(hpx::parcelset::parcel&&, hpx::function<void (std::error_code const&, hpx::parcelset::parcel const&), false>&&)':
/home/hcw/git/vcpkg/buildtrees/hpx/src/68cfb0bd56-aa215f878e.clean/libs/full/agas_base/src/primary_namespace.cpp:221: undefined reference to `hpx::agas::server::primary_namespace::route(hpx::parcelset::parcel&&)'
/usr/bin/ld: /home/hcw/git/vcpkg/installed/x64-linux/debug/lib/libhpx_agas_based.a(primary_namespace.cpp.o): in function `void hpx::actions::action<void (hpx::agas::server::primary_namespace::*)(hpx::parcelset::parcel&&), &hpx::agas::server::primary_namespace::route, hpx::agas::server::primary_namespace::route_action>::invoke<hpx::parcelset::parcel>(void*, int, hpx::parcelset::parcel&&)':
/home/hcw/git/vcpkg/buildtrees/hpx/src/68cfb0bd56-aa215f878e.clean/libs/full/actions_base/include/hpx/actions_base/component_action.hpp:103: undefined reference to `hpx::agas::server::primary_namespace::route(hpx::parcelset::parcel&&)'
/usr/bin/ld: /home/hcw/git/vcpkg/installed/x64-linux/debug/lib/libhpx_parcelsetd.a(parcelhandler.cpp.o): in function `hpx::parcelset::init_static_parcelport_factories(std::vector<hpx::plugins::parcelport_factory_base*, std::allocator<hpx::plugins::parcelport_factory_base*> >&)':
/home/hcw/git/vcpkg/buildtrees/hpx/x64-linux-dbg/libs/full/parcelset/include/hpx/parcelset/static_parcelports.hpp:25: undefined reference to `parcelport_tcp_factory_init(std::vector<hpx::plugins::parcelport_factory_base*, std::allocator<hpx::plugins::parcelport_factory_base*> >&)'
collect2: error: ld returned 1 exit status

looking for hpx::agas::server::primary_namespace::route(hpx::parcelset::parcel&&) (from hpx::agas::primary_namespace::route(hpx::parcelset::parcel&&, hpx::function<void (std::error_code const&, hpx::parcelset::parcel const&), false>&&)

Steps to Reproduce the Problem

Specifications

  • Compiler: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
  • OS: Ubuntu 22.04

Setup via

vcpkg install hpx[core,cuda]

and cmake file:


cmake_minimum_required(VERSION 3.18)
project(my_hpx_project LANGUAGES CUDA CXX)

set(OpenCV_DIR "/home/hcw/git/vcpkg/installed/x64-linux/share/opencv4")
find_package(OpenCV REQUIRED)

set(HPX_DIR "/home/hcw/git/vcpkg/installed/x64-linux/share/hpx")
find_package(HPX REQUIRED)


add_executable(my_hpx_program main.cpp)

target_link_libraries(my_hpx_program HPX::hpx HPX::wrap_main HPX::iostreams_component)



About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Even with cleaned caches, using v1.7.1 throws exception for me. So i think i need to investigate other setups.

Frankly, I have never tried using vcpkg on Linux. I will try to reproduce your issue.