Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build of libheif plugins on Darwin #923

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

Torrekie
Copy link
Contributor

As Darwin does not treat "loadable modules" (aka. bundles) as standalone libraries, neither identifiers nor version infos can be included.

This patch removes the version info for Darwin builds so plugins can be built correctly.

As Darwin does not treat "loadable modules" (aka. bundles) as a standalone library, neither identifiers nor version infos can be included.
@farindk
Copy link
Contributor

farindk commented Jul 20, 2023

Thanks. For completeness, could you please paste here the error message that you got when compiling?

@Torrekie
Copy link
Contributor Author

[ 69%] Linking CXX shared module libheif-x265.so
cd /buildroot/libheif-1.16.2/build/libheif/plugins && /usr/bin/cmake -E cmake_link_script CMakeFiles/heif-x265.dir/link.txt --verbose=1
/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -bundle -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.16.2 -o libheif-x265.so "CMakeFiles/heif-x265.dir/encoder_x265.cc.o" "CMakeFiles/heif-x265.dir/__/heif_plugin.cc.o"  -Wl,-rpath,/buildroot/libheif-1.16.2/build/libheif /usr/lib/libx265.dylib ../libheif.1.16.2.dylib 
clang-14: error: invalid argument '-compatibility_version 1.0.0' only allowed with '-dynamiclib'
make[2]: *** [libheif/plugins/CMakeFiles/heif-x265.dir/build.make:118: libheif/plugins/libheif-x265.so] Error 1

@Torrekie
Copy link
Contributor Author

@farindk
Copy link
Contributor

farindk commented Jul 21, 2023

Thank you for the additional information. Makes sense. I hoped that this would be handled by cmake as the plugin is specified as MODULE. Apparently it is not.

@farindk farindk merged commit bcb2497 into strukturag:master Jul 21, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants