[GH-ISSUE #342] CocoaPods issue with Firebase and BoringSSL-GRPC (Xcode 12.5) #275

Closed
opened 2026-05-05 12:04:49 -06:00 by gitea-mirror · 16 comments
Owner

Originally created by @ulmentflam on GitHub (Jul 9, 2021).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/342

Originally assigned to: @jmcnamara on GitHub.

When building in Xcode 12 and installing the library through CocoaPods I get the error 'openssl_grpc/base.h' file not found. It appears that the libxlsxwriter tries to use the BoringSSL-GRPC md5.h file when both pods are installed. At first I thought it was related to this issue in the CocoaPods repo and issue #337. However, when I ran pod update and pod install from the 1-10-stable branch, the issue persisted. The issue is not present in older versions of the Firebase SDK or when using older versions of BoringSSL-GRPC.
My thought is that there is still a problem with the header files being symlinked to the wrong place, but the previously mentioned solutions should have fixed that issue.

The logs say:
image

In file included from /Users/.../Pods/libxlsxwriter/third_party/md5/md5.c:42:
/Users/.../Pods/BoringSSL-GRPC/src/include/openssl/md5.h:60:10: fatal error: 'openssl_grpc/base.h' file not found
#include <openssl_grpc/base.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

So libxlsxwriter is attempting to use the "md5.h" file from BoringSSL-GRPC and not the "md5.h" file included in the libxlsxwriter project. This leads me to believe that the headers are still not being linked correctly by CocoPods. Any help on fixing this issue or a better methodology for installing both of these frameworks would be greatly appreciated.

Originally created by @ulmentflam on GitHub (Jul 9, 2021). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/342 Originally assigned to: @jmcnamara on GitHub. When building in Xcode 12 and installing the library through CocoaPods I get the error 'openssl_grpc/base.h' file not found. It appears that the libxlsxwriter tries to use the BoringSSL-GRPC md5.h file when both pods are installed. At first I thought it was related to [this](https://github.com/CocoaPods/CocoaPods/pull/10224) issue in the CocoaPods repo and issue #337. However, when I ran `pod update` and `pod install` from the `1-10-stable` branch, the issue persisted. The issue is not present in older versions of the Firebase SDK or when using older versions of `BoringSSL-GRPC`. My thought is that there is still a problem with the header files being symlinked to the wrong place, but the previously mentioned solutions should have fixed that issue. The logs say: <img width="517" alt="image" src="https://user-images.githubusercontent.com/6037314/125012277-ef724a80-e037-11eb-9f4e-569b94f553a9.png"> ``` In file included from /Users/.../Pods/libxlsxwriter/third_party/md5/md5.c:42: /Users/.../Pods/BoringSSL-GRPC/src/include/openssl/md5.h:60:10: fatal error: 'openssl_grpc/base.h' file not found #include <openssl_grpc/base.h> ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` So `libxlsxwriter` is attempting to use the "md5.h" file from `BoringSSL-GRPC` and not the "md5.h" file included in the `libxlsxwriter` project. This leads me to believe that the headers are still not being linked correctly by CocoPods. Any help on fixing this issue or a better methodology for installing both of these frameworks would be greatly appreciated.
gitea-mirror 2026-05-05 12:04:49 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

Could you create a small project that demonstrates this issue. Maybe based on https://github.com/FrankenApps/LibXlsxWriterSwiftSample

Also, is it possible to re-arrange the order of pod usage/compilation so that libxlsxwriter is included before BoringSSL.

Adding @FrankenApps in case he has any suggestions.

<!-- gh-comment-id:877017183 --> @jmcnamara commented on GitHub (Jul 9, 2021): Could you create a small project that demonstrates this issue. Maybe based on https://github.com/FrankenApps/LibXlsxWriterSwiftSample Also, is it possible to re-arrange the order of pod usage/compilation so that libxlsxwriter is included before BoringSSL. Adding @FrankenApps in case he has any suggestions.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

@jmcnamara I replicated the issue here https://github.com/ulmentflam/LibXlsxWriterSwiftSample just adding 'BoringSSL-GRPC' to the pod file causes the issue. I didn't have to include all the Firebase dependencies.

<!-- gh-comment-id:877214980 --> @ulmentflam commented on GitHub (Jul 9, 2021): @jmcnamara I replicated the issue here https://github.com/ulmentflam/LibXlsxWriterSwiftSample just adding 'BoringSSL-GRPC' to the pod file causes the issue. I didn't have to include all the Firebase dependencies.
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

Does the order of inclusion have any effect, i.e., if you put libxlsxwriter before borings or vice-versa?

<!-- gh-comment-id:877218468 --> @jmcnamara commented on GitHub (Jul 9, 2021): Does the order of inclusion have any effect, i.e., if you put libxlsxwriter before borings or vice-versa?
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

Unfortunately not, it seems to always build last for some reason.

<!-- gh-comment-id:877220635 --> @ulmentflam commented on GitHub (Jul 9, 2021): Unfortunately not, it seems to always build last for some reason.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

I even moved the order of inclusion in the Podfile.lock and that has no effect on the order that the dependencies are installed.

<!-- gh-comment-id:877223633 --> @ulmentflam commented on GitHub (Jul 9, 2021): I even moved the order of inclusion in the `Podfile.lock` and that has no effect on the order that the dependencies are installed.
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

Just to avoid any ambiguity can you add the modified pod file you are using with the LibXlsxWriterSwiftSample repo.

<!-- gh-comment-id:877226634 --> @jmcnamara commented on GitHub (Jul 9, 2021): Just to avoid any ambiguity can you add the modified pod file you are using with the LibXlsxWriterSwiftSample repo.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

Absolutely

# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

target 'LibXlsxWriterSwiftSample' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for LibXlsxWriterSwiftSample
  pod 'libxlsxwriter', '~> 0.9'
  pod 'Sourceful', '~> 0.2' #Only present for synzax highlighting
  pod 'BoringSSL-GRPC'
end
<!-- gh-comment-id:877229343 --> @ulmentflam commented on GitHub (Jul 9, 2021): Absolutely ``` # Uncomment the next line to define a global platform for your project platform :ios, '13.0' target 'LibXlsxWriterSwiftSample' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for LibXlsxWriterSwiftSample pod 'libxlsxwriter', '~> 0.9' pod 'Sourceful', '~> 0.2' #Only present for synzax highlighting pod 'BoringSSL-GRPC' end ```
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

@jmcnamara @FrankenApps I believe I have a fix for this issue in PR #343. The header files link correctly if preserve_paths is included in the podspec and references the 'third_party' header files.

<!-- gh-comment-id:877377232 --> @ulmentflam commented on GitHub (Jul 9, 2021): @jmcnamara @FrankenApps I believe I have a fix for this issue in PR #343. The header files link correctly if `preserve_paths` is included in the podspec and references the 'third_party' header files.
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

@ulmentflam Thanks for the fix. It looks valid.

I was just about to respond to ask if you could change the ordering of the include files within Xcode to see if that would resolve the issue. Could you try that as well to see if works (for the sake of completeness). Change the order in "Framework search paths" and "Header search paths" in Build Settings:

Screenshot 2021-07-09 at 19 36 34

<!-- gh-comment-id:877385367 --> @jmcnamara commented on GitHub (Jul 9, 2021): @ulmentflam Thanks for the fix. It looks valid. I was just about to respond to ask if you could change the ordering of the include files within Xcode to see if that would resolve the issue. Could you try that as well to see if works (for the sake of completeness). Change the order in "Framework search paths" and "Header search paths" in Build Settings: ![Screenshot 2021-07-09 at 19 36 34](https://user-images.githubusercontent.com/94267/125122359-379f7480-e0ed-11eb-83a6-05a8fac9f17d.png)
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

@jmcnamara I updated the order in "Framework Search Paths" and "Header Search Paths" and it resulted in the same build error.

<!-- gh-comment-id:877403371 --> @ulmentflam commented on GitHub (Jul 9, 2021): @jmcnamara I updated the order in "Framework Search Paths" and "Header Search Paths" and it resulted in the same build error.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

image
<!-- gh-comment-id:877403739 --> @ulmentflam commented on GitHub (Jul 9, 2021): <img width="1200" alt="image" src="https://user-images.githubusercontent.com/6037314/125126131-a3bbb180-e0c8-11eb-8596-ef131955b65c.png">
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

Cool. Thanks for checking.

I'll merge in your fix. It needs to be squashed since there are some WIP commits in the PR. I'll see if Github can do that cleanly. If not I'll get you to rebase it and resubmit.

<!-- gh-comment-id:877405197 --> @jmcnamara commented on GitHub (Jul 9, 2021): Cool. Thanks for checking. I'll merge in your fix. It needs to be squashed since there are some WIP commits in the PR. I'll see if Github can do that cleanly. If not I'll get you to rebase it and resubmit.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

Not a problem!

<!-- gh-comment-id:877407687 --> @ulmentflam commented on GitHub (Jul 9, 2021): Not a problem!
Author
Owner

@jmcnamara commented on GitHub (Jul 9, 2021):

Thanks for the debugging and fix. I've pushed a new release (1.1.0) and new Cocoapod with the fix.

<!-- gh-comment-id:877414046 --> @jmcnamara commented on GitHub (Jul 9, 2021): Thanks for the debugging and fix. I've pushed a new release (1.1.0) and new Cocoapod with the fix.
Author
Owner

@ulmentflam commented on GitHub (Jul 9, 2021):

You are very welcome! Thanks for your help and getting a release out so quickly!

<!-- gh-comment-id:877484614 --> @ulmentflam commented on GitHub (Jul 9, 2021): You are very welcome! Thanks for your help and getting a release out so quickly!
Author
Owner

@adesun2k commented on GitHub (May 13, 2023):

Please any solution yet? Still can't find a way around for XCode/Swift5

<!-- gh-comment-id:1546609165 --> @adesun2k commented on GitHub (May 13, 2023): Please any solution yet? Still can't find a way around for XCode/Swift5
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#275
No description provided.