[GH-ISSUE #337] Mac Catalyst issue with Cocoapods #272

Closed
opened 2026-05-05 12:03:56 -06:00 by gitea-mirror · 39 comments
Owner

Originally created by @willm132 on GitHub (Jun 9, 2021).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/337

Originally assigned to: @jmcnamara on GitHub.

When compiling for Mac Catalyst I am getting this error:

Undefined symbols for architecture x86_64:
"_format_set_bold",
"_format_set_border",
"_format_set_border_color"
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Originally created by @willm132 on GitHub (Jun 9, 2021). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/337 Originally assigned to: @jmcnamara on GitHub. When compiling for Mac Catalyst I am getting this error: Undefined symbols for architecture x86_64: "_format_set_bold", "_format_set_border", "_format_set_border_color" ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Author
Owner

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

The is just a standard link error. Make such that -lxlsxwriter is on you link command line. She the standard variations here: https://libxlsxwriter.github.io/getting_started.html#gsg_using

<!-- gh-comment-id:858137218 --> @jmcnamara commented on GitHub (Jun 9, 2021): The is just a standard link error. Make such that `-lxlsxwriter` is on you link command line. She the standard variations here: https://libxlsxwriter.github.io/getting_started.html#gsg_using
Author
Owner

@willm132 commented on GitHub (Jun 9, 2021):

@jmcnamara I am using CocoaPods with Xcode

<!-- gh-comment-id:858149676 --> @willm132 commented on GitHub (Jun 9, 2021): @jmcnamara I am using CocoaPods with Xcode
Author
Owner

@jmcnamara commented on GitHub (Jun 10, 2021):

I am using CocoaPods with Xcode

In that case I can't help you much since I don't use CocoaPods myself. Try the following sample code and see if it works: https://github.com/FrankenApps/LibXlsxWriterSwiftSample

Also, are you compiling on a M1 mac?

<!-- gh-comment-id:858357200 --> @jmcnamara commented on GitHub (Jun 10, 2021): > I am using CocoaPods with Xcode In that case I can't help you much since I don't use CocoaPods myself. Try the following sample code and see if it works: https://github.com/FrankenApps/LibXlsxWriterSwiftSample Also, are you compiling on a M1 mac?
Author
Owner

@willm132 commented on GitHub (Jun 10, 2021):

I use Intel iMac and M1 MacBook Pro

<!-- gh-comment-id:858628037 --> @willm132 commented on GitHub (Jun 10, 2021): I use Intel iMac and M1 MacBook Pro
Author
Owner

@jmcnamara commented on GitHub (Jun 10, 2021):

Do you see the same issue on both systems?

<!-- gh-comment-id:858635223 --> @jmcnamara commented on GitHub (Jun 10, 2021): Do you see the same issue on both systems?
Author
Owner

@willm132 commented on GitHub (Jun 10, 2021):

I have not used the M1 since adding xlsxwriter. I am currently on the iMac.

<!-- gh-comment-id:858650377 --> @willm132 commented on GitHub (Jun 10, 2021): I have not used the M1 since adding xlsxwriter. I am currently on the iMac.
Author
Owner

@jmcnamara commented on GitHub (Jun 10, 2021):

Ok. Can you try the sample app linked above and see if it works.

<!-- gh-comment-id:858664223 --> @jmcnamara commented on GitHub (Jun 10, 2021): Ok. Can you try the sample app linked above and see if it works.
Author
Owner

@willm132 commented on GitHub (Jun 10, 2021):

Yes, the sample did compile and work on Mac Catalyst. What do I need to do to get my project working?

<!-- gh-comment-id:858668189 --> @willm132 commented on GitHub (Jun 10, 2021): Yes, the sample did compile and work on Mac Catalyst. What do I need to do to get my project working?
Author
Owner

@jmcnamara commented on GitHub (Jun 10, 2021):

I'd suggest using the sample application and add functionality until it is similar to the app you are trying to compile and use that to figure out why your project isn't working.

Either way I don't think this is a general libxlsxwriter issue, or something that I can help you with, so I am going to close this.

<!-- gh-comment-id:858677711 --> @jmcnamara commented on GitHub (Jun 10, 2021): I'd suggest using the sample application and add functionality until it is similar to the app you are trying to compile and use that to figure out why your project isn't working. Either way I don't think this is a general libxlsxwriter issue, or something that I can help you with, so I am going to close this.
Author
Owner

@willm132 commented on GitHub (Jun 10, 2021):

@jmcnamara When running via Sample it complies and runs fine, but if I try to build to export via AdHoc I am getting this error:

Umbrella header 'xlsxwriter/libxlsxwriter-umbrella.h' not found

<!-- gh-comment-id:858950354 --> @willm132 commented on GitHub (Jun 10, 2021): @jmcnamara When running via Sample it complies and runs fine, but if I try to build to export via AdHoc I am getting this error: Umbrella header 'xlsxwriter/libxlsxwriter-umbrella.h' not found
Author
Owner

@jmcnamara commented on GitHub (Jun 10, 2021):

@FrankenApps could you help with this issue.

<!-- gh-comment-id:859026740 --> @jmcnamara commented on GitHub (Jun 10, 2021): @FrankenApps could you help with this issue.
Author
Owner

@FrankenApps commented on GitHub (Jun 11, 2021):

I don't have an Apple Developer Account, so there isn't really a way I could reproduce this. I will still try and have a look...

<!-- gh-comment-id:859235598 --> @FrankenApps commented on GitHub (Jun 11, 2021): I don't have an Apple Developer Account, so there isn't really a way I could reproduce this. I will still try and have a look...
Author
Owner

@willm132 commented on GitHub (Jun 11, 2021):

Like I said it runs fine on the machine but will not archive

<!-- gh-comment-id:859533538 --> @willm132 commented on GitHub (Jun 11, 2021): Like I said it runs fine on the machine but will not archive
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

Any updated on this?

<!-- gh-comment-id:860800438 --> @willm132 commented on GitHub (Jun 14, 2021): Any updated on this?
Author
Owner

@jmcnamara commented on GitHub (Jun 14, 2021):

Hi Will, you may have better luck on a Catalyst or Cocoapod forum, or StackOverflow. There probably aren't too many Catalyst/Cocoapod users on here.

If you find a solution let us know.

<!-- gh-comment-id:860834406 --> @jmcnamara commented on GitHub (Jun 14, 2021): Hi Will, you may have better luck on a Catalyst or Cocoapod forum, or StackOverflow. There probably aren't too many Catalyst/Cocoapod users on here. If you find a solution let us know.
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

@willm132 Have you checked this?

<!-- gh-comment-id:860898681 --> @FrankenApps commented on GitHub (Jun 14, 2021): @willm132 Have you checked [this](https://stackoverflow.com/questions/30355133/swift-framework-umbrella-header-h-not-found)?
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

@FrankenApps yes I actually did try that but no luck still

<!-- gh-comment-id:860899467 --> @willm132 commented on GitHub (Jun 14, 2021): @FrankenApps yes I actually did try that but no luck still
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

Does it work when generating a signed .ipa? As stated above there is no real way to reproduce this for me...

<!-- gh-comment-id:860905173 --> @FrankenApps commented on GitHub (Jun 14, 2021): Does it work when generating a signed .ipa? As stated above there is no real way to reproduce this for me...
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

If I run it from Xcode it installs on the device and works fine, when I go to Project > Archive, this is when it gives me the error

<!-- gh-comment-id:860906074 --> @willm132 commented on GitHub (Jun 14, 2021): If I run it from Xcode it installs on the device and works fine, when I go to Project > Archive, this is when it gives me the error
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

Aha, now I understand. But this only happens when archiving for mac. You can archive it just fine for iOS.

<!-- gh-comment-id:860931665 --> @FrankenApps commented on GitHub (Jun 14, 2021): Aha, now I understand. But this only happens when archiving for mac. You can archive it just fine for iOS.
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

@FrankenApps Yes, my project supports Mac Catalyst.

<!-- gh-comment-id:860932236 --> @willm132 commented on GitHub (Jun 14, 2021): @FrankenApps Yes, my project supports Mac Catalyst.
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

Compile Swift source files (x86_64)

BuildProductsPath/Release-maccatalyst/libxlsxwriter/xlsxwriter.framework/Modules/module.modulemap:2:19: Umbrella header 'xlsxwriter/libxlsxwriter-umbrella.h' not found

Could not build Objective-C module 'xlsxwriter'

<!-- gh-comment-id:860935533 --> @willm132 commented on GitHub (Jun 14, 2021): Compile Swift source files (x86_64) BuildProductsPath/Release-maccatalyst/libxlsxwriter/xlsxwriter.framework/Modules/module.modulemap:2:19: Umbrella header 'xlsxwriter/libxlsxwriter-umbrella.h' not found Could not build Objective-C module 'xlsxwriter'
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

Well, I do know what the Issue is, but I don't know how to fix it.

There should be an alias for the Headers in BuildProductsPath/Release-maccatalyst/libxlsxwriter/xlsxwriter.framework, but it is not there.

Current:
Bildschirmfoto 2021-06-14 um 21 42 45

How it should be (Sourceful does this right):
Bildschirmfoto 2021-06-14 um 21 43 07

<!-- gh-comment-id:860945046 --> @FrankenApps commented on GitHub (Jun 14, 2021): Well, I do know what the Issue is, but I don't know how to fix it. There should be an `alias` for the `Headers` in `BuildProductsPath/Release-maccatalyst/libxlsxwriter/xlsxwriter.framework`, but it is not there. Current: ![Bildschirmfoto 2021-06-14 um 21 42 45](https://user-images.githubusercontent.com/17967303/121950171-9590a480-cd59-11eb-9707-ad93bdf30bec.png) How it should be (Sourceful does this right): ![Bildschirmfoto 2021-06-14 um 21 43 07](https://user-images.githubusercontent.com/17967303/121950231-a5a88400-cd59-11eb-9b15-8d19ae46877c.png)
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

Is this something I can manually add on my end to resolve this?

<!-- gh-comment-id:860945521 --> @willm132 commented on GitHub (Jun 14, 2021): Is this something I can manually add on my end to resolve this?
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

I don't know. Might have something to do with Header Search Paths, but I don't know how to fix this. It should be possible to add this alias with a build script, because we know, that it should target Pods/libxlsxwriter/include, but I am definitely not an expert and have no idea how to do this. Also I don't know, why it works for debug builds, because as far as I can tell the settings are exactly the same...

<!-- gh-comment-id:860952917 --> @FrankenApps commented on GitHub (Jun 14, 2021): I don't know. Might have something to do with `Header Search Paths`, but I don't know how to fix this. It should be possible to add this alias with a build script, because we know, that it should target `Pods/libxlsxwriter/include`, but I am definitely not an expert and have no idea how to do this. Also I don't know, why it works for debug builds, because as far as I can tell the settings are exactly the same...
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

My header search path contains "${PODS_CONFIGURATION_BUILD_DIR}/libxlsxwriter/xlsxwriter.framework/Headers".

Is this an issue with Libxlsxwriter or my project?

<!-- gh-comment-id:860953856 --> @willm132 commented on GitHub (Jun 14, 2021): My header search path contains "${PODS_CONFIGURATION_BUILD_DIR}/libxlsxwriter/xlsxwriter.framework/Headers". Is this an issue with Libxlsxwriter or my project?
Author
Owner

@jmcnamara commented on GitHub (Jun 14, 2021):

This issue looks similar to this one: https://github.com/CocoaPods/CocoaPods/issues/10354

Maybe try update to the latest, beta, cocoapod framework to see if it fixes the issue, as suggested there.

<!-- gh-comment-id:860957161 --> @jmcnamara commented on GitHub (Jun 14, 2021): This issue looks similar to this one: https://github.com/CocoaPods/CocoaPods/issues/10354 Maybe try update to the latest, beta, cocoapod framework to see if it fixes the issue, as suggested there.
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

So how would I go about updating to Cocoapods 1.10.2 beta?

<!-- gh-comment-id:860959156 --> @willm132 commented on GitHub (Jun 14, 2021): So how would I go about updating to Cocoapods 1.10.2 beta?
Author
Owner

@jmcnamara commented on GitHub (Jun 14, 2021):

You can try this:

gem install cocoapods --pre

As suggested here: https://guides.cocoapods.org/using/getting-started.html

<!-- gh-comment-id:860962651 --> @jmcnamara commented on GitHub (Jun 14, 2021): You can try this: gem install cocoapods --pre As suggested here: https://guides.cocoapods.org/using/getting-started.html
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

Would this have something to do with it? after running pod update

[!] The Graf Brothers [Debug] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-Graf Brothers/Pods-Graf Brothers.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Graf Brothers [Release] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-Graf Brothers/Pods-Graf Brothers.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Graf BrothersUITests [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Graf Brothers-Graf BrothersUITests/Pods-Graf Brothers-Graf BrothersUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Graf BrothersUITests [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Graf Brothers-Graf BrothersUITests/Pods-Graf Brothers-Graf BrothersUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

<!-- gh-comment-id:860964593 --> @willm132 commented on GitHub (Jun 14, 2021): Would this have something to do with it? after running pod update [!] The `Graf Brothers [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-Graf Brothers/Pods-Graf Brothers.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Graf Brothers [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-Graf Brothers/Pods-Graf Brothers.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Graf BrothersUITests [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Graf Brothers-Graf BrothersUITests/Pods-Graf Brothers-Graf BrothersUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Graf BrothersUITests [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Graf Brothers-Graf BrothersUITests/Pods-Graf Brothers-Graf BrothersUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

@FrankenApps

gem install cocoapods --pre

This installed 1.10.1 which is resulting in the same error

<!-- gh-comment-id:860969262 --> @willm132 commented on GitHub (Jun 14, 2021): @FrankenApps gem install cocoapods --pre This installed 1.10.1 which is resulting in the same error
Author
Owner

@jmcnamara commented on GitHub (Jun 14, 2021):

In that case you will probably need to install the version in the GitHub repo. I haven't done that before but I presume there is some gem command.

<!-- gh-comment-id:860971170 --> @jmcnamara commented on GitHub (Jun 14, 2021): In that case you will probably need to install the version in the GitHub repo. I haven't done that before but I presume there is some gem command.
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

I was able to sucessfully archive my demo project for Catalyst with that method on 1.10.1
Its not a pretty solution but it works, and does basically what I mentioned above using a script.

<!-- gh-comment-id:860971751 --> @FrankenApps commented on GitHub (Jun 14, 2021): I was able to sucessfully archive my demo project for Catalyst with [that](https://github.com/grpc/grpc/issues/20500#issuecomment-604889919) method on 1.10.1 Its not a pretty solution but it works, and does basically what I mentioned above using a script.
Author
Owner

@willm132 commented on GitHub (Jun 14, 2021):

So just throw that in a script file and run it while I archive my project?

<!-- gh-comment-id:860972998 --> @willm132 commented on GitHub (Jun 14, 2021): So just throw that in a script file and run it while I archive my project?
Author
Owner

@FrankenApps commented on GitHub (Jun 14, 2021):

Yes, and adjust the paths to your local setup.

<!-- gh-comment-id:860975127 --> @FrankenApps commented on GitHub (Jun 14, 2021): Yes, and adjust the paths to your local setup.
Author
Owner

@jmcnamara commented on GitHub (Jun 15, 2021):

There was an update on the Cocoapods #10224 about how to use Unreleased Cocoapod Features.

Here is a summary of how to get a version of pod with the fix for issue 10224 built in:

# This took a couple of goes:
$ bundle update --bundler


$ cd /tmp
$ git clone git@github.com:CocoaPods/CocoaPods.git
$ cd CocoaPods/
$ git checkout 1-10-stable
$ bundle install
$ echo $(pwd)"/bin/pod"

# So now you should have a patched version of pod. For me this was:
$ echo $(pwd)"/bin/pod"
/tmp/CocoaPods/bin/pod

# Then use this version of pod to install libxlsxwriter:
/tmp/CocoaPods/bin/pod install

Could one of you try that to see if it works.

<!-- gh-comment-id:861389749 --> @jmcnamara commented on GitHub (Jun 15, 2021): There was an update on the [Cocoapods #10224](https://github.com/CocoaPods/CocoaPods/pull/10224) about how to [use Unreleased Cocoapod Features](https://guides.cocoapods.org/using/unreleased-features). Here is a summary of how to get a version of pod with the fix for issue 10224 built in: ```bash # This took a couple of goes: $ bundle update --bundler $ cd /tmp $ git clone git@github.com:CocoaPods/CocoaPods.git $ cd CocoaPods/ $ git checkout 1-10-stable $ bundle install $ echo $(pwd)"/bin/pod" # So now you should have a patched version of pod. For me this was: $ echo $(pwd)"/bin/pod" /tmp/CocoaPods/bin/pod # Then use this version of pod to install libxlsxwriter: /tmp/CocoaPods/bin/pod install ``` Could one of you try that to see if it works.
Author
Owner

@jmcnamara commented on GitHub (Jun 15, 2021):

@FrankenApps

Try the https version instead:

git clone https://github.com/CocoaPods/CocoaPods.git
<!-- gh-comment-id:861445355 --> @jmcnamara commented on GitHub (Jun 15, 2021): @FrankenApps Try the https version instead: ``` git clone https://github.com/CocoaPods/CocoaPods.git ```
Author
Owner

@willm132 commented on GitHub (Jun 15, 2021):

Yes that is what I did to get it working.

I installed the new CocoaPods, created an alias in terminal for it, ran the new pod update, and that worked! Thank you so much for all the help

<!-- gh-comment-id:861446725 --> @willm132 commented on GitHub (Jun 15, 2021): Yes that is what I did to get it working. I installed the new CocoaPods, created an alias in terminal for it, ran the new pod update, and that worked! Thank you so much for all the help
Author
Owner

@jmcnamara commented on GitHub (Jun 17, 2021):

I'm going to close this again since the original reported issue should be fixed.

<!-- gh-comment-id:863605201 --> @jmcnamara commented on GitHub (Jun 17, 2021): I'm going to close this again since the original reported issue should be fixed.
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#272
No description provided.