You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I am writing to request the addition of the following configuration to the FlatBuffers.podspec file to ensure ABI stability and proper framework distribution:
Issue:
The latest version of FlatBuffers distributed to CocoaPods is 22.9.24, even though the FlatBuffers.podspec in the GitHub repository shows the version as 24.3.25. The actual distributed FlatBuffers need to have the above code added to ensure proper functionality and avoid runtime errors.
Crash Log:
Due to the missing BUILD_LIBRARY_FOR_DISTRIBUTION = YES setting, there are issues with ABI stability, causing the following crash:
dyld[84037]: Symbol not found: _$s11FlatBuffers0A12BufferObjectP8__bufferAA04ByteC0VSgvgTq
Referenced from: <6F79C456-C006-385E-AF9D-404B6D8F4386> /private/var/containers/Bundle/Application/55C0094C-F405-4EF0-8A8A-B2F10AE60E89/HelloWorld.app/Frameworks/KMLocationSDK.framework/KMLocationSDK
Expected in: <45E32326-5129-37E5-AFBC-68F64E132C9E> /private/var/containers/Bundle/Application/55C0094C-F405-4EF0-8A8A-B2F10AE60E89/HelloWorld.app/Frameworks/FlatBuffers.framework/FlatBuffers
Steps to Reproduce:
Install and run a project that uses FlatBuffers as a dependency.
Integrate the FlatBuffers framework without the BUILD_LIBRARY_FOR_DISTRIBUTION setting enabled.
Observe the runtime crash due to missing symbols.
Proposed Solution:
Please update the FlatBuffers.podspec to include the following configuration:
This change will ensure ABI stability and prevent runtime crashes related to missing symbols.
Thank you for considering this request. Ensuring ABI stability is crucial for the smooth integration and functionality of projects relying on FlatBuffers.
Thank you for submitting an issue!
Please make sure you include the names of the affected language(s), compiler version(s), operating system version(s), and FlatBuffers version(s) in your issue title.
This helps us get the correct maintainers to look at your issue. Here are examples of good titles:
Crash when accessing FlatBuffer [C++, gcc 4.8, OS X, master]
Flatc converts a protobuf 'bytes' field to 'string' in fbs schema file [all languages, FlatBuffers 1.4]
Include other details as appropriate.
Thanks!
The text was updated successfully, but these errors were encountered:
Looking at this issue in the CocoaPods repo, it seems that you can manually set it with a post_install. The Flatbuffers.podspec file follows what other repositories do with their podspec files, and thus we will try to keep it to minimal changes.
It might look like this:
post_installdo |installer|
...
installer.pods_project.targets.eachdo |target|
target.build_configurations.eachdo |config|
# maybe check if the lib is flatbuffersconfig.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION']='YES'endendend
Regarding the version, #8328 should fix it. When it's merged I'll publish a newer version of the lib.
Thank you for the quick response and for addressing the version issue with #8328.
However, I would like to clarify that the proposed change to add BUILD_LIBRARY_FOR_DISTRIBUTION to the FlatBuffers.podspec is crucial for ABI stability. The lack of this setting has been causing runtime crashes due to symbol resolution issues, as shown in the crash log I provided.
While I understand that you prefer to keep the podspec minimal and suggest using a post-install script, this approach places an additional burden on users and increases the risk of these issues being overlooked. Including the following configuration directly in the FlatBuffers.podspec would ensure that all users benefit from the necessary ABI stability without requiring manual intervention:
Description:
I am writing to request the addition of the following configuration to the
FlatBuffers.podspec
file to ensure ABI stability and proper framework distribution:Issue:
The latest version of FlatBuffers distributed to CocoaPods is
22.9.24
, even though theFlatBuffers.podspec
in the GitHub repository shows the version as24.3.25
. The actual distributed FlatBuffers need to have the above code added to ensure proper functionality and avoid runtime errors.Crash Log:
Due to the missing
BUILD_LIBRARY_FOR_DISTRIBUTION = YES
setting, there are issues with ABI stability, causing the following crash:Steps to Reproduce:
FlatBuffers
as a dependency.FlatBuffers
framework without theBUILD_LIBRARY_FOR_DISTRIBUTION
setting enabled.Proposed Solution:
Please update the
FlatBuffers.podspec
to include the following configuration:This change will ensure ABI stability and prevent runtime crashes related to missing symbols.
Thank you for considering this request. Ensuring ABI stability is crucial for the smooth integration and functionality of projects relying on FlatBuffers.
Thank you for submitting an issue!
Please make sure you include the names of the affected language(s), compiler version(s), operating system version(s), and FlatBuffers version(s) in your issue title.
This helps us get the correct maintainers to look at your issue. Here are examples of good titles:
Include other details as appropriate.
Thanks!
The text was updated successfully, but these errors were encountered: