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

libui/0.4.1: ERROR: Missing binary #1378

Open
SamuelMarks opened this issue Apr 10, 2021 · 2 comments
Open

libui/0.4.1: ERROR: Missing binary #1378

SamuelMarks opened this issue Apr 10, 2021 · 2 comments
Labels

Comments

@SamuelMarks
Copy link

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: libui/0.4.1
  • Operating System+version: macOS 11.1 (20C69)
  • Compiler+version: clang-1200.0.32.29
  • Conan version: conan 1.35.0
  • Python version: Python 3.9.1

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=12.0
compiler.libcxx=libc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

conanfile.txt

[requires]
libui/0.4.1@bincrafters/stable
$ conan remote add bintray https://api.bintray.com/conan/bincrafters/public-conan
$ mkdir build && cd $_
$ conan install ..

Logs (Include/Attach if Applicable)

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

libui/0.4.1@bincrafters/stable: Not found in local cache, looking in remotes...
libui/0.4.1@bincrafters/stable: Trying with 'conan-center'...
libui/0.4.1@bincrafters/stable: Trying with 'bintray'...
Downloading conanmanifest.txt completed [0.16k]                                          
Downloading conanfile.py completed [3.63k]                                               
Downloading conan_export.tgz completed [0.74k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
libui/0.4.1@bincrafters/stable: Downloaded recipe revision 0
conanfile.txt: Installing package
Requirements
    libui/0.4.1@bincrafters/stable from 'bintray' - Downloaded
Packages
    libui/0.4.1@bincrafters/stable:6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6 - Missing

Installing (downloading, building) binaries...
ERROR: Missing binary: libui/0.4.1@bincrafters/stable:6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6

libui/0.4.1@bincrafters/stable: WARN: Can't find a 'libui/0.4.1@bincrafters/stable' package for the specified settings, options and dependencies:
- Settings: arch=x86_64, build_type=Release, compiler=apple-clang, compiler.libcxx=libc++, compiler.version=12.0, os=Macos
- Options: fPIC=True, shared=False
- Dependencies: 
- Requirements: 
- Package ID: 6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6

ERROR: Missing prebuilt package for 'libui/0.4.1@bincrafters/stable'
Try to build from sources with '--build=libui'
Use 'conan search <reference> --table table.html'
Or read 'http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'

I mean is this related to the bintray being turned off? - Or am I misusing it?

@SamuelMarks
Copy link
Author

SamuelMarks commented Apr 11, 2021

Related: running with conan install --build='libui' .. worked, but I'm not sure what find_package is meant to look like…

Folded it all into one CMakeLists.txt, and then ran cmake -DCMAKE_BUILD_TYPE=Debug referring to it:

cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0054 NEW)
project(pp VERSION 0.0.0 LANGUAGES C)


if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
  message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
  file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.16.1/conan.cmake"
                "${CMAKE_BINARY_DIR}/conan.cmake"
       EXPECTED_HASH SHA256=396e16d0f5eabdc6a14afddbcfff62a54a7ee75c6da23f32f7a31bc85db23484
       TLS_VERIFY ON)
endif()

include(${CMAKE_BINARY_DIR}/conan.cmake)

conan_cmake_configure(REQUIRES libui/0.4.1@bincrafters/stable
                      GENERATORS cmake_find_package)

conan_cmake_autodetect(settings)

conan_add_remote(NAME bincrafters 
                 INDEX 1
                 URL https://api.bintray.com/conan/bincrafters/public-conan
                 VERIFY_SSL True)
conan_cmake_install(PATH_OR_REFERENCE .
                    BUILD missing
                    REMOTE bincrafters
                    SETTINGS ${settings})

file(DOWNLOAD "https://raw.githubusercontent.com/andlabs/libui/d788d86/examples/drawtext/main.c"
              "${CMAKE_BINARY_DIR}/src/main.c"
     EXPECTED_HASH SHA256=cdc67294145e638d6b6444068829ded491c7481660e5d344bd6353be78d697cb
     TLS_VERIFY ON)

set(src "${CMAKE_BINARY_DIR}/src/main.c")
file(READ ${src} main_source)
string(REPLACE "#include \"../../ui.h\"" "#include <ui.h>" main_source ${main_source})
file(WRITE ${src} ${main_source})

find_package(ui CONFIG REQUIRED)

add_executable(${PROJECT_NAME} ${src})
target_link_libraries(${PROJECT_NAME} PRIVATE ui)

CMake Error at CMakeLists.txt:38 (find_package):
  Could not find a package configuration file provided by "ui" with any of
  the following names:

    uiConfig.cmake
    ui-config.cmake

  Add the installation prefix of "ui" to CMAKE_PREFIX_PATH or set "ui_DIR" to
  a directory containing one of the above files.  If "ui" provides a separate
  development package or SDK, be sure it has been installed.

@ericLemanissier
Copy link
Contributor

you need to use the cmake_find_package_multi instead of cmake_find_package when invoking conan_cmake_configure
For more information read https://docs.conan.io/en/latest/reference/generators/cmake_find_package.html and https://docs.conan.io/en/latest/reference/generators/cmake_find_package_multi.html#generated-files

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

No branches or pull requests

2 participants