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.5: build failure when cross compiling #1432

Open
gmeeker opened this issue Dec 10, 2021 · 0 comments · May be fixed by #1433
Open

wxwidgets/3.1.5: build failure when cross compiling #1432

gmeeker opened this issue Dec 10, 2021 · 0 comments · May be fixed by #1433
Labels

Comments

@gmeeker
Copy link

gmeeker commented Dec 10, 2021

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:

wxWidgets/wxWidgets#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:

wxWidgets/wxWidgets#2358

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: wxwidgets/3.1.5
  • Operating System+version: macOS 11.6
  • Compiler+version: apple-clang 13.0
  • Conan version: conan 1.41.1
  • Python version: Python 3.9.7

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

conan profile show default

Configuration for profile default:

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

conan profile show armv8

Configuration for profile armv8:

[settings]
os=Macos
os_build=Macos
os.version=11.0
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=13.0
compiler.libcxx=libc++
build_type=Release
compiler.cppstd=11
[options]
[conf]
[build_requires]
[env]

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":

wx-config --libs
-L/Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib -pthread /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_osx_cocoau_xrc-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_osx_cocoau_qa-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_baseu_net-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_osx_cocoau_html-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_osx_cocoau_core-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_baseu_xml-3.1-Darwin.a /Users/gmeeker/.conan/data/wxwidgets/3.1.5/bincrafters/stable/package/46d7b5f3a952b9ca844206da63a0a1c473e166a2/lib/libwx_baseu-3.1-Darwin.a -lwx_osx_cocoau_core-3.1-Darwin libjpeg.a libpng16.a libtiffxx.a libtiff.a -ldep_name-NOTFOUND -framework AudioToolbox -framework WebKit -lwx_baseu-3.1-Darwin libexpat.a libz.a -lwxregexu-3.1 -framework CoreFoundation -framework Security -framework Carbon -framework Cocoa -framework IOKit -framework QuartzCore 
@gmeeker gmeeker added the bug label Dec 10, 2021
gmeeker added a commit to gmeeker/community that referenced this issue Dec 10, 2021
@gmeeker gmeeker linked a pull request Dec 10, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant