bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
218 stars 36 forks source link

wxWidgets/3.1.3: conan.py doesn't compile on the raspberry pi (or other arm architectures) #1426

Closed djshaw closed 3 years ago

djshaw commented 3 years ago

Package and Environment Details (include every applicable attribute)

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=Linux
os_build=Linux
arch=armv7
arch_build=armv7
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Attempt to compile audacity as per https://github.com/audacity/audacity/blob/master/BUILDING.md

Logs (Include/Attach if Applicable)

Click to expand log ``` $ cmake -G "Unix Makefiles" -Daudacity_use_ffmpeg=loaded ../audacity ... ERROR: Not able to automatically detect '/usr/bin/cc' version ERROR: Unable to find a working compiler WARN: wxwidgets/3.1.3.1-audacity: requirement expat/2.2.9 overridden by your conanfile to expat/2.2.9@audacity/stable wxwidgets/3.1.3.1-audacity: ERROR: while executing system_requirements(): local variable 'arch_suffix' referenced before assignment ERROR: Error in system requirements CMake Error at cmake-proxies/cmake-modules/conan.cmake:631 (message): Conan install failed='1' Call Stack (most recent call first): cmake-proxies/cmake-modules/AudacityDependencies.cmake:233 (conan_cmake_install) cmake-proxies/cmake-modules/AudacityDependencies.cmake:254 (_conan_install) CMakeLists.txt:509 (resolve_conan_dependencies) ```

This is my first time compiling Audacity, which fails during the wxWidgets build. I believe bincrafters is the source for the conan file. The issue can be resolved with checking for arm architectures in system_requirements():

elif self.settings.arch == 'armv7':
    arch_suffix = ':armhf'
elif self.settings.arch == 'armv8':
    arch_suffix = ':arm64'

The audacity issue is https://github.com/audacity/audacity/issues/1390

I'm not super familiar with conan. And I am not an Audacity contributor. Please forgive me if I'm filing an issue against the wrong project.

Croydon commented 3 years ago

Performing a quick search in their source code and calling their Artifactory instance, it looks like they copy our recipes to their own remote instead of using ours

https://github.com/audacity/audacity/blob/b331c64b5d9681814ef8a684f4af4bf6e0160704/cmake-proxies/cmake-modules/AudacityDependencies.cmake#L6

https://artifactory.audacityteam.org/ui/repos/tree/General/conan-local%2F_%2Fwxwidgets%2F3.1.3.1-audacity%2F_%2F0%2Fexport%2Fconanfile.py

So strictly speaking the wrong place, but we might share the same bugs etc.

Please feel free to open a pull request adding the arch_suffix for those ARM architectures.

If it is possible, an update to 3.1.4 or 3.1.5 would also probably help as we use a more modern recipe for those versions

Croydon commented 3 years ago

According to https://github.com/audacity/audacity/pull/918#issue-898432456:

wxWidgets recipe is based on the Bincrafters but is heavily modified.

It would be nice if they would consider contributing back, if their changes are generally useful and not Audacity specific.