In 3.1.5 wxWidgets started appending the system name to the library file names (only when cross compiling):
if (CMAKE_CROSSCOMPILING)
set(cross_target "-${CMAKE_SYSTEM_NAME}")
endif()
The build fails because conanfile.py doesn't find the correct files. While that could be fixed, this behavior probably breaks Conan compatibility. For example if you cross compile macOS ARM from a macOS Intel machine, the library names would be different than compiling directly on a macOS ARM machine.
This behavior seems intentional so I don't think we can fix it upstream. wxWidgets recently changed the cmake support to match the filenames from configure:
In 3.1.5 wxWidgets started appending the system name to the library file names (only when cross compiling):
The build fails because conanfile.py doesn't find the correct files. While that could be fixed, this behavior probably breaks Conan compatibility. For example if you cross compile macOS ARM from a macOS Intel machine, the library names would be different than compiling directly on a macOS ARM machine.
This behavior seems intentional so I don't think we can fix it upstream. wxWidgets recently changed the cmake support to match the filenames from configure:
https://github.com/wxWidgets/wxWidgets/pull/2291
And affected file was updated again post 3.1.5, so a separate patch will be required for a future 3.1.6 release:
https://github.com/wxWidgets/wxWidgets/pull/2358
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)conan profile show default
conan profile show armv8
Steps to reproduce (Include if Applicable)
conan create . wxwidgets/3.1.5@bincrafters/stable -pr armv8 -pr:b default -b missing
Logs (Include/Attach if Applicable)
Click to expand log
``` -- Build files have been written to: /Users/gmeeker/bincrafters/recipes/wxwidgets/all/test_package/build/913588727f8d8bf04520135e3e981db01271c63b [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [100%] Linking CXX executable bin/test_package ld: library not found for -lwx_osx_cocoau_xrc-3.1 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/test_package] Error 1 make[1]: *** [CMakeFiles/test_package.dir/all] Error 2 make: *** [all] Error 2 ERROR: wxwidgets/3.1.5@bincrafters/stable (test package): Error in build() method, line 12 cmake.build() ConanException: Error 2 while executing cmake --build '/Users/gmeeker/bincrafters/recipes/wxwidgets/all/test_package/build/913588727f8d8bf04520135e3e981db01271c63b' '--' '-j16' ```Note the library names end in "-Darwin":