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

wxwidgets/3.1.3: Configuring errors: Error in build() method #1181

Closed
SemyonDuB opened this issue Apr 25, 2020 · 7 comments
Closed

wxwidgets/3.1.3: Configuring errors: Error in build() method #1181

SemyonDuB opened this issue Apr 25, 2020 · 7 comments
Labels

Comments

@SemyonDuB
Copy link

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: wxwidgets/3.1.3
  • Operating System+version: Linux Fedora 31
  • Compiler+version: GCC 9.3.1
  • Conan version: conan 1.24.0
  • Python version: Python 3.7.6

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

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=9
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

conan install wxwidgets/3.1.3@bincrafters/stable --build missing

Logs (Include/Attach if Applicable)

Click to expand log
-- Check if the system is big endian - little endian
CMake Error at source_subfolder/build/cmake/config.cmake:36 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "OUTPUT_NAME" is not allowed.
Call Stack (most recent call first):
  source_subfolder/build/cmake/config.cmake:130 (wx_get_dependencies)
  source_subfolder/build/cmake/config.cmake:169 (wx_write_config)
  source_subfolder/build/cmake/main.cmake:42 (include)
  source_subfolder/CMakeLists.txt:69 (include)


CMake Error at source_subfolder/build/cmake/config.cmake:36 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "OUTPUT_NAME" is not allowed.
Call Stack (most recent call first):
  source_subfolder/build/cmake/config.cmake:130 (wx_get_dependencies)
  source_subfolder/build/cmake/config.cmake:169 (wx_write_config)
  source_subfolder/build/cmake/main.cmake:42 (include)
  source_subfolder/CMakeLists.txt:69 (include)


CMake Error at source_subfolder/build/cmake/config.cmake:36 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "OUTPUT_NAME" is not allowed.
Call Stack (most recent call first):
  source_subfolder/build/cmake/config.cmake:130 (wx_get_dependencies)
  source_subfolder/build/cmake/config.cmake:169 (wx_write_config)
  source_subfolder/build/cmake/main.cmake:42 (include)
  source_subfolder/CMakeLists.txt:69 (include)


CMake Error at source_subfolder/build/cmake/config.cmake:36 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "OUTPUT_NAME" is not allowed.
Call Stack (most recent call first):
  source_subfolder/build/cmake/config.cmake:130 (wx_get_dependencies)
  source_subfolder/build/cmake/config.cmake:169 (wx_write_config)
  source_subfolder/build/cmake/main.cmake:42 (include)
  source_subfolder/CMakeLists.txt:69 (include)


CMake Error at source_subfolder/build/cmake/config.cmake:36 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "OUTPUT_NAME" is not allowed.
Call Stack (most recent call first):
  source_subfolder/build/cmake/config.cmake:130 (wx_get_dependencies)
  source_subfolder/build/cmake/config.cmake:169 (wx_write_config)
  source_subfolder/build/cmake/main.cmake:42 (include)
  source_subfolder/CMakeLists.txt:69 (include)


-- Which libraries should wxWidgets use?
    wxUSE_STL:        OFF      (use C++ STL classes)
    wxUSE_REGEX:      builtin  (enable support for wxRegEx class)
    wxUSE_ZLIB:       sys      (use zlib for LZW compression)
    wxUSE_EXPAT:      sys      (use expat for XML parsing)
    wxUSE_LIBJPEG:    sys      (use libjpeg (JPEG file format))
    wxUSE_LIBPNG:     sys      (use libpng (PNG image format))
    wxUSE_LIBTIFF:    sys      (use libtiff (TIFF file format))
    wxUSE_LIBLZMA:    OFF      (use liblzma for LZMA compression)
    wxUSE_LIBSDL:     OFF      (use SDL for audio on Unix)
    wxUSE_LIBMSPACK:  OFF      (use libmspack (CHM help files loading))

-- Configured wxWidgets 3.1.3 for Linux-5.5.17-200.fc31.x86_64
    Min OS Version required at runtime:                Linux x86_64
    Which GUI toolkit should wxWidgets use?            gtk2 
    Should wxWidgets be compiled into single library?  OFF
    Should wxWidgets be linked as a shared library?    False
    Should wxWidgets support Unicode?                  True
    What wxWidgets compatibility level should be used? 3.0
-- Configuring incomplete, errors occurred!
See also "/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006/build_subfolder/CMakeFiles/CMakeOutput.log".
See also "/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006/build_subfolder/CMakeFiles/CMakeError.log".
wxwidgets/3.1.3@bincrafters/stable: 
wxwidgets/3.1.3@bincrafters/stable: ERROR: Package '8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006' build failed
wxwidgets/3.1.3@bincrafters/stable: WARN: Build folder /home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006
ERROR: wxwidgets/3.1.3@bincrafters/stable: Error in build() method, line 237
        cmake = self._configure_cmake()
while calling '_configure_cmake', line 233
        cmake.configure(build_folder=self._build_subfolder)
        ConanException: Error 1 while executing cd '/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006/build_subfolder' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="9" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/package/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DwxBUILD_SHARED="False" -DwxBUILD_SAMPLES="OFF" -DwxBUILD_TESTS="OFF" -DwxBUILD_DEMOS="OFF" -DwxBUILD_INSTALL="True" -DwxBUILD_COMPATIBILITY="3.0" -DwxUSE_CAIRO="True" -DwxUSE_LIBSDL="OFF" -DwxUSE_LIBICONV="OFF" -DwxUSE_LIBNOTIFY="OFF" -DwxUSE_LIBMSPACK="OFF" -DwxUSE_LIBGNOMEVFS="OFF" -DwxUSE_LIBPNG="sys" -DwxUSE_LIBJPEG="sys" -DwxUSE_LIBTIFF="sys" -DwxUSE_ZLIB="sys" -DwxUSE_EXPAT="sys" -DwxUSE_UNICODE="True" -DwxUSE_SECRETSTORE="True" -DwxUSE_AUI="True" -DwxUSE_OPENGL="True" -DwxUSE_HTML="True" -DwxUSE_MEDIACTRL="False" -DwxUSE_PROPGRID="True" -DwxUSE_DEBUGREPORT="True" -DwxUSE_RIBBON="True" -DwxUSE_RICHTEXT="True" -DwxUSE_SOCKETS="True" -DwxUSE_STC="True" -DwxUSE_WEBVIEW="True" -DwxUSE_XML="True" -DwxUSE_XRC="True" -DwxUSE_HELP="True" -DwxUSE_WXHTML_HELP="True" -DwxUSE_URL="True" -DwxUSE_PROTOCOL="True" -DwxUSE_FS_INET="True" -Wno-dev '/home/semyon/.conan/data/wxwidgets/3.1.3/bincrafters/stable/build/8a4d79ade1ddb7e61c7eea6abbe3a28cbeea0006'
@tkhyn
Copy link

tkhyn commented Sep 18, 2020

@SemyonDuB I see you have just closed this issue: did you solve it? I have just run into the same problem ...

@SemyonDuB
Copy link
Author

@tkhyn I didn't solve it, but I think this problem exist in every not apt system package managers like dnf, yum or other, because wxwidgets package install system requirements only from apt, so maybe using apt as system package manager is the solve problem!

@tkhyn
Copy link

tkhyn commented Sep 21, 2020

Thanks. Using apt does not solve the problem as I encounter the issue on Linux Mint which uses apt. I have also set sysrequires_mode to disabled so that conan does not try to install libwebkitgtk-dev (see #861).

It looks more like a cmake or cmake generator issue to me. I'll keep digging and see if I can find a workaround. On Windows it works fine with the same cmake and conan versions (and there is no package manager whatsoever!).

@tkhyn
Copy link

tkhyn commented Sep 25, 2020

Hi,
To make it work, open $CONAN_USER_HOME/data/wxwidgets/3.1.3/bincrafters/stable/source/source_subfolder/build/cmake/config.cmake and replace the wx_get_dependencies macro by the following:

macro(wx_get_dependencies var lib)
    set(${var})
    if(TARGET ${lib})
        get_target_property(deps ${lib} LINK_LIBRARIES)
        foreach(dep IN LISTS deps)
            if(TARGET ${dep})
                get_target_property(dep_type ${dep} TYPE)
                if (dep_type STREQUAL "INTERFACE_LIBRARY")
                    get_target_property(dep_name ${dep} INTERFACE_OUTPUT_NAME)
                else()
                    get_target_property(dep_name ${dep} OUTPUT_NAME)
                endif ()
                set(dep_name "-l${dep_name}")
            else()
                get_filename_component(dep_name ${dep} NAME)
            endif()
            wx_string_append(${var} "${dep_name} ")
        endforeach()
        string(STRIP ${${var}} ${var})
    endif()
endmacro()

and relaunch conan install wxwidgets/3.1.3@bincrafters/stable --build missing (as far as I'm concerned I'm using cmake-conan so I just re-run cmake).

tkhyn added a commit to tkhyn/wxWidgets that referenced this issue Sep 25, 2020
In some cases (see bincrafters/community#1181), the dependencies can be library interfaces. As CMake's get_target_property is not tolerant about what properties can be extracted on different library types, it is necessary to make a distinction between interface libraries and plain libraries
tkhyn added a commit to tkhyn/wxWidgets that referenced this issue Sep 25, 2020
In some cases (see bincrafters/community#1181), the dependencies can be library interfaces. As CMake's get_target_property is not tolerant about what properties can be extracted on different library types, it is necessary to make a distinction between interface libraries and plain libraries
tkhyn added a commit to tkhyn/wxWidgets that referenced this issue Sep 25, 2020
In some cases (see bincrafters/community#1181), the dependencies can be library interfaces. As CMake's get_target_property is not tolerant about what properties can be extracted on different library types, it is necessary to make a distinction between interface libraries and plain libraries
vadz pushed a commit to wxWidgets/wxWidgets that referenced this issue Sep 29, 2020
In some cases (see bincrafters/community#1181),
the dependencies can be library interfaces.

As CMake's get_target_property is not tolerant about what properties can
be extracted on different library types, it is necessary to make a
distinction between interface libraries and plain libraries.

Closes #2058
andreas-mausch added a commit to andreas-mausch/whatsapp-viewer that referenced this issue Oct 6, 2020
Note: We need this patch in order to make the wxwidgets conan package compile
bincrafters/community#1181

This should be fixed automatically with the next wxWidgets update
@fiam
Copy link

fiam commented Nov 15, 2020

I've backported the fix from wxWidgets' master branch and submitted a PR to the recipe at bincrafters/conan-wxwidgets#20, but it seems no one is looking at PRs in that repo.

@Croydon
Copy link
Member

Croydon commented Nov 15, 2020

@fiam Please always mention new PRs in some issue here (like you just did). Otherwise there is a chance that nobody notices it 😄

@fiam
Copy link

fiam commented Nov 17, 2020

@Croydon Thanks for the clarification, I'll keep it in mind for future PRs.

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

4 participants