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

[paho-mqttpp3] Failed to find paho-mqtt #8481

Closed
m4rcs opened this issue Oct 7, 2019 · 3 comments
Closed

[paho-mqttpp3] Failed to find paho-mqtt #8481

m4rcs opened this issue Oct 7, 2019 · 3 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@m4rcs
Copy link

m4rcs commented Oct 7, 2019

When trying to use the pahp-mqttpp3 library on Ubuntu 18.04, I'm getting the following error after running cmake -DCMAKE_TOOLCHAIN_FILE=/home/marc/Documents/vcpkg/scripts/buildsystems/vcpkg.cmake ..:

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PahoMqttC (missing: PAHO_MQTT_C_LIBRARIES
  PAHO_MQTT_C_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /home/marc/Documents/vcpkg/installed/x64-linux/share/pahomqttcpp/FindPahoMqttC.cmake:22 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /home/marc/Documents/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package)
  /usr/share/cmake-3.10/Modules/CMakeFindDependencyMacro.cmake:48 (find_package)
  /home/marc/Documents/vcpkg/installed/x64-linux/share/pahomqttcpp/PahoMqttCppConfig.cmake:3 (find_dependency)
  /home/marc/Documents/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/marc/Documents/test/build/CMakeFiles/CMakeOutput.log".

The installation of the paho-mqttpp3 package finished successfully.

The CMakeLists.txt looks as following:

cmake_minimum_required(VERSION 3.10)

add_executable(main main.cpp)

find_package(PahoMqttCpp CONFIG REQUIRED)
target_link_libraries(main PRIVATE PahoMqttC::PahoMqttC PahoMqttCpp::paho-mqttpp3-static)
@vpaladino778
Copy link
Contributor

Did you do the ./vcpkg integrate install command after installing paho-mqttpp3?

@m4rcs
Copy link
Author

m4rcs commented Oct 7, 2019

Jep, I did. I also reproduced the error in a VM running a fresh Ubuntu installation.

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Oct 8, 2019
@JackBoosY
Copy link
Contributor

Hi @m4rcs, thanks for reporting this issue.
I've fixed it, please update vcpkg and rebuild paho-mqttpp3.

Thanks.

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

No branches or pull requests

3 participants