Skip to content

missing common_utils.h in openjpeg decoder plugin #1813

Closed

Description

@daeho-ro

Hello, I have failed to build openjpeg decoder plugin and got an error as follows.

  Undefined symbols for architecture arm64:
    "get_subsampled_size(unsigned int, unsigned int, heif_channel, heif_chroma, unsigned int*, unsigned int*)", referenced from:
        openjpeg_decode_next_image2(void*, heif_image**, unsigned long*, heif_security_limits const*) in decoder_openjpeg.cc.o
  ld: symbol(s) not found for architecture arm64
  /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk -bundle -Wl,-headerpad_max_install_names -o libheif-j2kenc.so "CMakeFiles/heif-j2kenc.dir/encoder_openjpeg.cc.o" "CMakeFiles/heif-j2kenc.dir/__/api/libheif/heif_plugin.cc.o"  -Wl,-rpath,/private/tmp/libheif-plugins-20260519-18766-cdoiha/libheif-1.22.0/build/libheif /opt/homebrew/lib/libopenjp2.2.5.4.dylib ../libheif.1.22.0.dylib -lm
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk -bundle -Wl,-headerpad_max_install_names -o libheif-j2kdec.so "CMakeFiles/heif-j2kdec.dir/decoder_openjpeg.cc.o" "CMakeFiles/heif-j2kdec.dir/__/api/libheif/heif_plugin.cc.o"  -Wl,-rpath,/private/tmp/libheif-plugins-20260519-18766-cdoiha/libheif-1.22.0/build/libheif /opt/homebrew/lib/libopenjp2.2.5.4.dylib ../libheif.1.22.0.dylib -lm
  make[2]: *** [libheif/plugins/libheif-j2kdec.so] Error 1
  make[1]: *** [libheif/plugins/CMakeFiles/heif-j2kdec.dir/all] Error 2

I have seen the header is included here

but haven't found sources from here

Can you check?
Thanks,

Activity

  1. farindk commented on May 20, 2026

    @farindk
    Member

    Right, thank you. We also have to link against "common_utils.cc". macOS needs this. The above patch fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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