Skip to content

Linker error on iOS and Apple Silicon: Undefined symbol _pixman_composite_over_n_8888_asm_neon #496

Open
@Ravbug

Description

@Ravbug

This is a more detailed error report for #488.

When compiling for iOS or Apple silicon, two symbols are not defined:

Undefined symbols for architecture arm64:
  "_pixman_composite_over_n_8888_asm_neon", referenced from:
      color_SourceOver(unsigned int*, int, unsigned int, unsigned int) in vdrawhelper_neon.o
  "_pixman_composite_src_n_8888_asm_neon", referenced from:
      memfill32(unsigned int*, unsigned int, int) in vdrawhelper_neon.o
ld: symbol(s) not found for architecture arm64

The file that uses these functions is vdrawhelper_neon.cpp.

Steps to Reproduce:

  1. Download rlottie source code on a Mac with Xcode installed.
  2. Edit the root CMakeLists.txt to include set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE INTERNAL "") below the project line, this will enable building Apple Silicon:
cmake_minimum_required( VERSION 3.3 )

#declare project
project( rlottie VERSION 0.2 LANGUAGES C CXX ASM)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE INTERNAL "") # add this line
# ...
  1. In the rlottie root directory, execute mkdir -p build; cd build; cmake -G "Xcode" ..
  2. Open the Xcode project and try to build the rlottie library target.

Other Notes:
In the file pixman-arm-neon-asm.S (the file that contains the definitions for pixman_composite_over_n_8888_asm_neon and pixman_composite_src_n_8888_asm_neon), comments mention that there exists a C function fast_composite_over_8888_0565 in pixman-fast-path.c which implements an identical behavior to the arm assembly functions. Perhaps use that function instead in vdrawhelper_neon.cpp, when the target does not support the assembly implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions