conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
958 stars 1.75k forks source link

[package] libpng/1.6.37: libpng fails to build for Android when using an existing ndk #10600

Closed wbehrens-on-gh closed 2 years ago

wbehrens-on-gh commented 2 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)

include(default)

api_level=16
target_host=arm-linux-androideabi
clang_host=armv7a-linux-androideabi
android_ndk={{os.getenv("ANDROID_NDK")}}
android_root=$android_ndk/platforms/android-$api_level/arch-arm

[settings]
arch=armv7
build_type=Release
compiler=clang
compiler.libcxx=c++_shared
compiler.version=8
os=Android
os.api_level=$api_level

[conf]
tools.android:ndk_path=$android_ndk
tools.microsoft.msbuild:max_cpu_count={{os.cpu_count()}}
tools.build:processes={{os.cpu_count()}}
tools.build:processes={{os.cpu_count()}}
tools.gnu.make:jobs={{os.cpu_count()}}
tools.ninja:jobs={{os.cpu_count()}}

[env]
CONAN_CPU_COUNT={{os.cpu_count()}}
ANDROID_NDK_ROOT=$android_ndk
CONAN_CMAKE_TOOLCHAIN_FILE=$android_ndk/build/cmake/android.toolchain.cmake

Steps to reproduce (Include if Applicable)

Build libpng from source using the above profile

Logs (Include/Attach if Applicable)

Click to expand log ``` [ 90%] Building C object source_subfolder/CMakeFiles/png_static.dir/arm/filter_neon_intrinsics.c.o [ 95%] Building C object source_subfolder/CMakeFiles/png_static.dir/arm/palette_neon_intrinsics.c.o :18:9: error: unknown directive .func png_read_filter_row_sub4_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:65:1: note: while in macro instantiation func png_read_filter_row_sub4_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:79:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_sub3_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:81:1: note: while in macro instantiation func png_read_filter_row_sub3_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:105:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_up_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:107:1: note: while in macro instantiation func png_read_filter_row_up_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:118:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_avg4_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:120:1: note: while in macro instantiation func png_read_filter_row_avg4_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:139:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_avg3_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:141:1: note: while in macro instantiation func png_read_filter_row_avg3_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:174:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_paeth4_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:192:1: note: while in macro instantiation func png_read_filter_row_paeth4_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:213:1: note: while in macro instantiation endfunc ^ :18:9: error: unknown directive .func png_read_filter_row_paeth3_neon ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:215:1: note: while in macro instantiation func png_read_filter_row_paeth3_neon, export=1 ^ :2:9: error: unknown directive .endfunc ^ /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c/source_subfolder/arm/filter_neon.S:250:1: note: while in macro instantiation endfunc ^ make[2]: *** [source_subfolder/CMakeFiles/png_static.dir/build.make:271: source_subfolder/CMakeFiles/png_static.dir/arm/filter_neon.S.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:95: source_subfolder/CMakeFiles/png_static.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 libpng/1.6.37: ERROR: Package 'd793d3bd8b1b1de6fda9e0d4028fb847dedaf95c' build failed libpng/1.6.37: libpng/1.6.37: WARN: Build folder /home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c ERROR: libpng/1.6.37: Error in build() method, line 152 cmake.build() ConanException: Error 2 while executing cmake --build '/home/wbehrens@staudertech.local/.conan/data/libpng/1.6.37/_/_/build/d793d3bd8b1b1de6fda9e0d4028fb847dedaf95c' '--' '-j16' CMake Warning (dev) at CMakeLists.txt:20 (set): implicitly converting 'TYPE' to 'STRING' type. This warning is for project developers. Use -Wno-dev to suppress it. ```
SpaceIm commented 2 years ago

Does your toolchain support neon? If not, disable neon.

SpaceIm commented 2 years ago

https://github.com/glennrp/libpng/issues/390

SpaceIm commented 2 years ago

If Android and armv7, we could replace in filter_neon.S: .func by .hidden, and remove .endfunc

wbehrens-on-gh commented 2 years ago

Does your toolchain support neon? If not, disable neon.

apparently not, I disabled it and it worked fine