GetRuntimeDependencies does not handle reexported libraries on OSx
I have a trouble with collecting runtime dependencies for my project. It relies on libgcc_s.1.dylib
which depends on libgcc_s.1.1.dylib
. But neither get_prerequisites nor file(GET_RUNTIME_DEPENDENCIES) lists libgcc_s.1.1.dylib
.
The reason is that this library is used with the reexport
qualifier.
-- <RawOutput cmd='/usr/bin/otool -L //Users/oleg/build/osx/_CPack_Packages/osx/DragNDrop/grandorgue-3.7.0-0.local.osx.x86_64/ALL_IN_ONE/GrandOrgue.app/Contents/Frameworks/libgcc_s.1.dylib'>
-- gp_cmd_ov='//Users/oleg/build/osx/_CPack_Packages/osx/DragNDrop/grandorgue-3.7.0-0.local.osx.x86_64/ALL_IN_ONE/GrandOrgue.app/Contents/Frameworks/libgcc_s.1.dylib:
/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0, reexport)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
-- </RawOutput>
-- ignoring non-matching line: '//Users/oleg/build/osx/_CPack_Packages/osx/DragNDrop/grandorgue-3.7.0-0.local.osx.x86_64/ALL_IN_ONE/GrandOrgue.app/Contents/Frameworks/libgcc_s.1.dylib:E'
-- ignoring non-matching line: ' /usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0, reexport)E'
Ealier the same problem with the weak
qualifier was resolved by #21684 (closed)
I think cmake should handle reexport
in the same way as weak
.
Edited by Oleg Samarin