conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
945 stars 1.72k forks source link

[request] wxWidgets #5190

Open SamuelMarks opened 3 years ago

SamuelMarks commented 3 years ago

Environment Details (include every applicable attribute)

Steps to reproduce (Include if Applicable)

conanfile.txt

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

Logs (Executed commands with output) (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]

wxwidgets/3.1.4@bincrafters/stable: Not found in local cache, looking in remotes...
wxwidgets/3.1.4@bincrafters/stable: Trying with 'conan-center'...
wxwidgets/3.1.4@bincrafters/stable: Trying with 'bintray'...
Downloading conanmanifest.txt completed [0.27k]                                          
Downloading conanfile.py completed [18.05k]                                              
Downloading conan_export.tgz completed [0.32k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
wxwidgets/3.1.4@bincrafters/stable: Downloaded recipe revision 0
libpng/1.6.37: Not found in local cache, looking in remotes...
libpng/1.6.37: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.24k]                                          
Downloading conanfile.py completed [4.75k]                                               
Downloading conan_export.tgz completed [0.24k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
libpng/1.6.37: Downloaded recipe revision 0
zlib/1.2.11: Not found in local cache, looking in remotes...
zlib/1.2.11: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.35k]                                          
Downloading conanfile.py completed [5.95k]                                               
Downloading conan_export.tgz completed [0.34k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
zlib/1.2.11: Downloaded recipe revision 0
libjpeg/9d: Not found in local cache, looking in remotes...
libjpeg/9d: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.25k]                                          
Downloading conanfile.py completed [6.30k]                                               
Downloading conan_export.tgz completed [0.29k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
libjpeg/9d: Downloaded recipe revision 0
libtiff/4.0.9: Not found in local cache, looking in remotes...
libtiff/4.0.9: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.45k]                                          
Downloading conanfile.py completed [6.90k]                                               
Downloading conan_export.tgz completed [0.30k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
libtiff/4.0.9: Downloaded recipe revision 0
xz_utils/5.2.5: Not found in local cache, looking in remotes...
xz_utils/5.2.5: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.10k]                                          
Downloading conanfile.py completed [6.85k]                                               
Downloading conan_export.tgz completed [0.23k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
xz_utils/5.2.5: Downloaded recipe revision 0
jbig/20160605: Not found in local cache, looking in remotes...
jbig/20160605: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.33k]                                          
Downloading conanfile.py completed [2.38k]                                               
Downloading conan_export.tgz completed [0.35k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
jbig/20160605: Downloaded recipe revision 0
expat/2.2.7: Not found in local cache, looking in remotes...
expat/2.2.7: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.25k]                                          
Downloading conanfile.py completed [2.98k]                                               
Downloading conan_export.tgz completed [0.26k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
expat/2.2.7: Downloaded recipe revision 0
conanfile.txt: Installing package
Requirements
    expat/2.2.7 from 'conan-center' - Downloaded
    jbig/20160605 from 'conan-center' - Downloaded
    libjpeg/9d from 'conan-center' - Downloaded
    libpng/1.6.37 from 'conan-center' - Downloaded
    libtiff/4.0.9 from 'conan-center' - Downloaded
    wxwidgets/3.1.4@bincrafters/stable from 'bintray' - Downloaded
    xz_utils/5.2.5 from 'conan-center' - Downloaded
    zlib/1.2.11 from 'conan-center' - Downloaded
Packages
    expat/2.2.7:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Download
    jbig/20160605:0500cabd9dcab8e3d59c82a2d7a2c7ed6bd89f93 - Download
    libjpeg/9d:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Download
    libpng/1.6.37:88955cec2844f731470e07bd44ce5a3a24ec88b7 - Download
    libtiff/4.0.9:9f45cd7cb0e3fbc1eed280c2b88eade845412e3a - Download
    wxwidgets/3.1.4@bincrafters/stable:2445108fd3b81ab2d2f54bd26afbdd9ae3a4f010 - Missing
    xz_utils/5.2.5:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Download
    zlib/1.2.11:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Download

Installing (downloading, building) binaries...
ERROR: Missing binary: wxwidgets/3.1.4@bincrafters/stable:2445108fd3b81ab2d2f54bd26afbdd9ae3a4f010

wxwidgets/3.1.4@bincrafters/stable: WARN: Can't find a 'wxwidgets/3.1.4@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: aui=True, compatibility=3.0, custom_disables=, custom_enables=, debugreport=True, expat=expat, fPIC=True, fs_inet=True, help=True, html=True, html_help=True, jpeg=libjpeg, mediactrl=False, opengl=True, png=libpng, propgrid=True, protocol=True, ribbon=True, richtext=True, secretstore=True, shared=False, sockets=True, stc=True, tiff=libtiff, unicode=True, url=True, webview=True, xml=True, xrc=True, zlib=zlib, expat:fPIC=True, expat:shared=False, jbig:build_executables=True, jbig:fPIC=True, jbig:shared=False, libjpeg:fPIC=True, libjpeg:shared=False, libpng:api_prefix=None, libpng:fPIC=True, libpng:shared=False, libtiff:cxx=True, libtiff:fPIC=True, libtiff:jbig=True, libtiff:jpeg=libjpeg, libtiff:lzma=True, libtiff:shared=False, libtiff:zlib=True, xz_utils:fPIC=True, xz_utils:shared=False, zlib:fPIC=True, zlib:minizip=deprecated, zlib:shared=False
- Dependencies: libpng/1.6.37, libjpeg/9d, libtiff/4.0.9, zlib/1.2.11, expat/2.2.7
- Requirements: expat/2.Y.Z, libjpeg/9d, libpng/1.Y.Z, libtiff/4.Y.Z, zlib/1.Y.Z
- Package ID: 2445108fd3b81ab2d2f54bd26afbdd9ae3a4f010

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

(happy to use a different remote and/or different version of wxWidgets)

memsharded commented 3 years ago

The bincrafters recipe is not under our control, so there is nothing we can do regarding it. The wxwidget is already listed in https://github.com/conan-io/conan-center-index/issues/621, so it will be added eventually. In any case, this is not a Conan issue, but a ConanCenter one, so moving the issue there.

jgsogo commented 3 years ago

Hi, @SamuelMarks . This should be considered a library request, the recipe is not currently in this repository. I would encourage you to submit a pull-request with this recipe.

Anyway, even if the binary is not available for wxwidgets/3.1.4@bincrafters/stable, you know you can build it from sources, right?

conan install .. --build missing
SamuelMarks commented 3 years ago

Hmm, tried that and CONAN_LIBS is always empty:

cmake_minimum_required(VERSION 3.1.2)
cmake_policy(SET CMP0048 NEW)
project(pp VERSION 0.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

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/master/conan.cmake"
                  "${CMAKE_BINARY_DIR}/conan.cmake")
endif()

include("${CMAKE_BINARY_DIR}/conan.cmake")

conan_cmake_run(REQUIRE wxwidgets/3.1.4@bincrafters/stable
                BASIC_SETUP
                BUILD missing)

file(DOWNLOAD https://raw.githubusercontent.com/wxWidgets/wxWidgets/c034a78/samples/widgets/button.cpp src/main.cpp
     EXPECTED_HASH SHA256=c94699427f8b4a90c7ae3e075210bc44ae80098b5303a564f11d3991c620328f)
file(DOWNLOAD https://raw.githubusercontent.com/wxWidgets/wxWidgets/c034a78/samples/widgets/widgets.h src/widgets.h
     EXPECTED_HASH SHA256=6ccef93318db87830fd400a8d217f08030358b0494bc594bf533bcf75da9cf2d)
file(DOWNLOAD https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/samples/widgets/icons/button.xpm src/icons/button.xpm
     EXPECTED_HASH SHA256=c7f7bf9a4b678376a20af95adc213a467450a71040710dacc168fa6885a1ad0f)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)  # Added these two when error 
conan_basic_setup(TARGETS)                         # occurred; same error still occurs. 
                                                   # Also tried without `TARGETS`

set(src "${CMAKE_CURRENT_BINARY_DIR}/src/main.cpp")
message(CONAN_LIBS = "${CONAN_LIBS}")
add_executable(${PROJECT_NAME} "${src}")
target_include_directories(${PROJECT_NAME} PRIVATE "${CONAN_LIBS}")
target_link_libraries(${PROJECT_NAME} PRIVATE "${CONAN_LIBS}")

So naturally I get:

src/main.cpp:20:10: fatal error: 'wx/wxprec.h' file not found
#include "wx/wxprec.h"
         ^~~~~~~~~~~~~
1 error generated.
ericLemanissier commented 3 years ago

Would it be a typo in conan_cmake_run argument : REQUIRE->REQUIRES ?

SamuelMarks commented 3 years ago

Thanks that solved it - Another reason not to code at ~2AM

(got to free some space for the build to finish working, will confirm it all works in the morning)

Croydon commented 3 years ago

As a general note, please report problems for Bincrafters recipes here: https://github.com/bincrafters/community

SamuelMarks commented 3 years ago

@Croydon Ok in future I'll post there.

@ericLemanissier It almost worked:

-- Installing: .conan/data/wxwidgets/3.1.4/bincrafters/stable/package/3d47f4af00e2be7a61abf71a89f598dd98d88cba/bin/wxrc
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 2 '.1' files: wxrc-3.1, osx_cocoa-unicode-static-3.1
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 2 files: wxrc, wx-config
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 1444 '.h' files
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 3 '.cpp' files: arrimpl.cpp, listimpl.cpp, thrimpl.cpp
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 10 '.cur' files
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 1 '.rc' file: wx.rc
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 9 '.manifest' files
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 2 '.bmp' files: colours.bmp, csquery.bmp
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 12 '.ico' files
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 1 '.xpm' file: image_placeholder24x24.xpm
wxwidgets/3.1.4@bincrafters/stable package(): Packaged 17 '.a' files
wxwidgets/3.1.4@bincrafters/stable: Package '3d47f4af00e2be7a61abf71a89f598dd98d88cba' created
wxwidgets/3.1.4@bincrafters/stable: Created package revision 96f6dcc3065afff992e5b6465b175ada
conanfile.txt: Generator cmake created conanbuildinfo.cmake
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
-- Conan: Loading conanbuildinfo.cmake
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: temp_dir/wx/wx_conan/cmake-build-debug
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: temp_dir/wx/wx_conan/cmake-build-debug
CONAN_LIBS=wx_osx_cocoau_xrc-3.1;wx_osx_cocoau_webview-3.1;wx_osx_cocoau_stc-3.1;wxscintilla-3.1;wx_osx_cocoau_richtext-3.1;wx_osx_cocoau_ribbon-3.1;wx_osx_cocoau_qa-3.1;wx_osx_cocoau_propgrid-3.1;wx_osx_cocoau_html-3.1;wx_osx_cocoau_gl-3.1;wx_osx_cocoau_aui-3.1;wx_baseu_xml-3.1;wx_baseu_net-3.1;wx_osx_cocoau_adv-3.1;wx_osx_cocoau_core-3.1;wx_baseu-3.1;wxregexu-3.1;png16d;tiffxx;tiff;expat;z;jpeg;lzma;jbig;wx_osx_cocoau_xrc-3.1;wx_osx_cocoau_webview-3.1;wx_osx_cocoau_stc-3.1;wxscintilla-3.1;wx_osx_cocoau_richtext-3.1;wx_osx_cocoau_ribbon-3.1;wx_osx_cocoau_qa-3.1;wx_osx_cocoau_propgrid-3.1;wx_osx_cocoau_html-3.1;wx_osx_cocoau_gl-3.1;wx_osx_cocoau_aui-3.1;wx_baseu_xml-3.1;wx_baseu_net-3.1;wx_osx_cocoau_adv-3.1;wx_osx_cocoau_core-3.1;wx_baseu-3.1;wxregexu-3.1;png16d;tiffxx;tiff;expat;z;jpeg;lzma;jbig
-- Configuring done
CMake Error in CMakeLists.txt:
  Found relative path while evaluating include directories of "pp":

    "wx_osx_cocoau_webview-3.1"

CMake Error in CMakeLists.txt:
  Found relative path while evaluating include directories of "pp":

    "wx_osx_cocoau_webview-3.1"

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

(I can make a new issue for this if you want)

EDIT: Posted here https://github.com/bincrafters/community/issues/1385 - not closing this issue as this is requesting wxWidgets in the main conan center