Repository: conan-io/conan-center-index

Issue:
[package] soxr/0.1.3: Compilation errors when building for ARMv8 iOS
### Description

Related to #14485 I also get error when building `soxr` for ARMv8 iOS. Building for x86-64 works fine.

```
[ 81%] Building C object src/CMakeFiles/soxr.dir/util32s.c.o
clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfloat-abi=hard' [-Wunused-command-line-argument]
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util32s.c:8:
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:43:
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/pffft.c:185:6: warning: "building with simd disabled !\n"; [-W#warnings]
#    warning "building with simd disabled !\n";
     ^
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util32s.c:8:
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:58:5: error: implicit declaration of function 'UNINTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:61:5: error: implicit declaration of function 'INTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    INTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:61:5: note: did you mean 'UNINTERLEAVE2'?
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:58:5: note: 'UNINTERLEAVE2' declared here
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:81:5: error: implicit declaration of function 'UNINTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/eb5d917243a8eeb117c1a7ce45b9e9256cd068d6/src/src/util-simd.c:84:5: error: implicit declaration of function 'INTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    INTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
1 warning and 4 errors generated.
```

### Package and Environment Details

* Package Name/Version: soxr/0.1.3
* Operating System+version: macOS 12.6 (21G115)
* Compiler+version: AppleClang 14.0.0.14000029
* Conan version: Conan version 1.53.0
* Python version: Python 3.9.6


### Conan profile

[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=14
os=iOS
os.sdk=iphoneos
os.version=12.0
[options]
[conf]
[build_requires]
[env]


### Steps to reproduce

conan install -r conancenter soxr/0.1.3@ -pr:b=default -pr:h=ios-appleclang14 --build soxr

### Logs

<details><summary>Click to expand log</summary>

```
Exporting package recipe
soxr/0.1.3 exports: File 'conandata.yml' found. Exporting it...
soxr/0.1.3 exports: Copied 1 '.yml' file: conandata.yml
soxr/0.1.3: Calling export_sources()
soxr/0.1.3: The stored package has not changed
soxr/0.1.3: Using the exported files summary hash as the recipe revision: 91bf375e54429c15a54b76ba483b1c7f 
soxr/0.1.3: Exported revision: 91bf375e54429c15a54b76ba483b1c7f
Configuration:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=14
os=iOS
os.sdk=iphoneos
os.version=12.0
[options]
[build_requires]
[env]

soxr/0.1.3: Forced build from source
soxr/0.1.3 (test package): Installing package
Requirements
    soxr/0.1.3 from 'artifactory' - Cache
Packages
    soxr/0.1.3:0e699225b481e75f126b28dab6d34ad0dede6d9f - Build

Cross-build from 'Macos:armv8' to 'iOS:armv8'
Installing (downloading, building) binaries...
soxr/0.1.3: Copying sources to build folder
soxr/0.1.3: Building your package in /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f
soxr/0.1.3: Generator txt created conanbuildinfo.txt
soxr/0.1.3: Calling generate()
soxr/0.1.3: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
soxr/0.1.3: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release'
soxr/0.1.3: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0077=NEW -DCMAKE_POLICY_DEFAULT_CMP0115=OLD -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
soxr/0.1.3: Aggregating env generators
soxr/0.1.3: Calling build()
soxr/0.1.3: Apply patch (conan): make OpenMP required to fail when not found
soxr/0.1.3: Apply patch (conan): point to the right source dir
soxr/0.1.3: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/package/0e699225b481e75f126b28dab6d34ad0dede6d9f" -DCMAKE_POLICY_DEFAULT_CMP0077="NEW" -DCMAKE_POLICY_DEFAULT_CMP0115="OLD" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src"
-- Using Conan toolchain: /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/CMakeDependentOption.cmake:89 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  CMakeLists.txt:72 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for pow in m
-- Looking for pow in m - found
-- Trying SIMD32 C flags: -mfpu=neon-vfpv4 -mcpu=cortex-a7
-- Performing Test DETECT_SIMD32_C_FLAGS
-- Performing Test DETECT_SIMD32_C_FLAGS - Failed
-- Trying SIMD32 C flags: -mfpu=neon       -mfloat-abi=hard
-- Performing Test DETECT_SIMD32_C_FLAGS
-- Performing Test DETECT_SIMD32_C_FLAGS - Success
-- Found SIMD32: -mfpu=neon       -mfloat-abi=hard  
-- Could NOT find SIMD64 (missing: SIMD64_C_FLAGS SIMD64_C_FLAGS) 
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (AVUTIL)
  does not match the name of the calling package (LibAVUtil).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindLibAVUtil.cmake:20 (find_package_handle_standard_args)
  CMakeLists.txt:138 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find AVUTIL (missing: AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS) 
-- Looking for lrint
-- Looking for lrint - found
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/CheckIncludeFiles.cmake:121 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    m;

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  CMakeLists.txt:146 (check_include_files)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for include file fenv.h
-- Looking for include file fenv.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/Release
soxr/0.1.3: CMake command: cmake --build "/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/Release" '--' '-j3'
[ 18%] Building C object src/CMakeFiles/soxr.dir/soxr.c.o
[ 18%] Building C object src/CMakeFiles/soxr.dir/data-io.c.o
[ 18%] Building C object src/CMakeFiles/soxr.dir/dbesi0.c.o
[ 25%] Building C object src/CMakeFiles/soxr.dir/filter.c.o
[ 31%] Building C object src/CMakeFiles/soxr.dir/fft4g64.c.o
[ 37%] Building C object src/CMakeFiles/soxr.dir/cr.c.o
[ 43%] Building C object src/CMakeFiles/soxr.dir/cr32.c.o
[ 50%] Building C object src/CMakeFiles/soxr.dir/fft4g32.c.o
[ 56%] Building C object src/CMakeFiles/soxr.dir/cr64.c.o
[ 62%] Building C object src/CMakeFiles/soxr.dir/vr32.c.o
[ 68%] Building C object src/CMakeFiles/soxr.dir/cr32s.c.o
clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfloat-abi=hard' [-Wunused-command-line-argument]
[ 75%] Building C object src/CMakeFiles/soxr.dir/pffft32s.c.o
clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfloat-abi=hard' [-Wunused-command-line-argument]
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/pffft32s.c:5:
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/pffft-wrap.c:27:
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/pffft.c:185:6: warning: "building with simd disabled !\n"; [-W#warnings]
#    warning "building with simd disabled !\n";
     ^
[ 81%] Building C object src/CMakeFiles/soxr.dir/util32s.c.o
clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfloat-abi=hard' [-Wunused-command-line-argument]
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util32s.c:8:
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:43:
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/pffft.c:185:6: warning: "building with simd disabled !\n"; [-W#warnings]
#    warning "building with simd disabled !\n";
     ^
In file included from /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util32s.c:8:
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:58:5: error: implicit declaration of function 'UNINTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:61:5: error: implicit declaration of function 'INTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    INTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:61:5: note: did you mean 'UNINTERLEAVE2'?
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:58:5: note: 'UNINTERLEAVE2' declared here
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:81:5: error: implicit declaration of function 'UNINTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    UNINTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/src/src/util-simd.c:84:5: error: implicit declaration of function 'INTERLEAVE2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    INTERLEAVE2(a1r, a1i, a1r, a1i);
    ^
1 warning and 4 errors generated.
make[2]: *** [src/CMakeFiles/soxr.dir/util32s.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 warning generated.
make[1]: *** [src/CMakeFiles/soxr.dir/all] Error 2
make: *** [all] Error 2
soxr/0.1.3: 
soxr/0.1.3: ERROR: Package '0e699225b481e75f126b28dab6d34ad0dede6d9f' build failed
soxr/0.1.3: WARN: Build folder /Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/Release
ERROR: soxr/0.1.3: Error in build() method, line 76
        cmake.build()
        ConanException: Error 2 while executing cmake --build "/Users/vagrant/tmp/conan-center-index/recipes/soxr/all/.conan/data/soxr/0.1.3/_/_/build/0e699225b481e75f126b28dab6d34ad0dede6d9f/build/Release" '--' '-j3'
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/soxr/all/conanfile.py b/recipes/soxr/all/conanfile.py
--- a/recipes/soxr/all/conanfile.py
+++ b/recipes/soxr/all/conanfile.py
@@ -59,8 +59,8 @@ def generate(self):
             tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0115"] = "OLD"
         if is_msvc(self):
             tc.variables["BUILD_SHARED_RUNTIME"] = msvc_runtime_flag(self) == "MD"
-        # Disable SIMD based resample engines for Apple Silicon architecture
-        if self.settings.os == "Macos" and self.settings.arch == "armv8":
+        # Disable SIMD based resample engines for Apple Silicon and iOS ARMv8 architecture
+        if (self.settings.os == "Macos" or self.settings.os == "iOS") and self.settings.arch == "armv8":
             tc.variables["WITH_CR32S"] = False
             tc.variables["WITH_CR64S"] = False
         tc.variables["BUILD_TESTS"] = False


Test patch: