'google/protobuf/io/zero_copy_stream.h' file not found

413 views
Skip to first unread message

KK

unread,
Mar 21, 2021, 10:47:07 AM3/21/21
to ios-accessibility
Hi All, 

I have added GTXiLib to a new Swift project via Cocoapods and I get the following error (see attached image).
 
Does anyone know how to fix this?

Thanks


Screenshot 2021-03-21 at 14.45.26.png

Gautam J

unread,
Mar 24, 2021, 1:05:15 PM3/24/21
to ios-accessibility
Please try "pod update"? Starting from version 4* GTXiLib depends on Protobuf.

One other thing you can try, attempt the same with an ObjectiveC project.

Thanks,
Sid

KK

unread,
Mar 26, 2021, 12:41:05 PM3/26/21
to ios-accessibility
Hi Sid,

Thanks for looking into this. 

My pod is newly installed so I assume it's the latest pod. Either way, I tried pod update and still got the same errors.
No difference while using Objective-C either.

Have you recently tried installing the pod from scratch in a new project? If not, do you mind just creating a new project, initialising a new pod with 'GTXiLib` and seeing if the project builds successfuly?
I want to make sure that the actual framework itself is not broken.
Screenshot 2021-03-26 at 16.36.12.png

Gautam

unread,
Mar 26, 2021, 12:54:28 PM3/26/21
to KK, ios-accessibility
Hi Koushan,

Could you please try:
brew install protobuf

followed by:
pod update

And rebuild?

Thanks,
Sid


Notice:
This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group.

If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

References to the "Ocado Group" are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.

--
You received this message because you are subscribed to the Google Groups "ios-accessibility" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibil...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/34d4965f-b55a-4a30-a025-c23ecaa0dcf9n%40googlegroups.com.

KK

unread,
Mar 26, 2021, 1:22:11 PM3/26/21
to ios-accessibility
Still the same errors unfortunately. Cleaned, deleted derived data, and tried on a fresh install too.

Gautam

unread,
Mar 26, 2021, 2:14:47 PM3/26/21
to KK, ios-accessibility
Hmm, sorry to hear that. As as last option could you please try:
pod 'GTXiLib', '3.0'

To fetch a previous version that does not include protobuf? 

Thank you,
Sid

KK

unread,
Mar 28, 2021, 11:32:28 AM3/28/21
to ios-accessibility
Yep that's done it. All building successfully now. 
Looks like the issue is from Protobuf. Out of curiosity, what's the reason for adding Protobuf to new version?

Thanks for all the help Sid.

KK

unread,
Mar 28, 2021, 11:33:36 AM3/28/21
to ios-accessibility
I can also see that someone else has the same issue too: https://github.com/google/GTXiLib/issues/20

ARUN S

unread,
Mar 29, 2021, 2:32:01 AM3/29/21
to KK, ios-accessibility
Is this version working for swift project? In swift project .. It’s building for me but not identifying issues ..please let me know the version working for swift project 

KK

unread,
Mar 30, 2021, 1:30:35 PM3/30/21
to ios-accessibility
GTXiLib 3.0 is indeed working with Swift. I haven't been able to do much testing yet, however it seems that it's not detecting all the issues. For instance, label contrast issues are being identified correctly, but accessibility labels are not. 

Cooper Knaak

unread,
Mar 30, 2021, 4:53:28 PM3/30/21
to KK, ios-accessibility
Hi all,

I did some research on the Swift/GTX 4.0 issue. It looks like it's an issue with use_frameworks! in the Podfile. I created an empty Swift project, added a Podfile to install GTX, and got the same results as above (wouldn't build because it couldn't find a header). However, it's specifically Protobuf-C++ that isn't building. I tried it with an empty Objective-C project and got the same result. However, when I removed use_frameworks! from the Objective-C project's Podfile, it built successfully. Note the difference below between the Build Phases for the Swift (use_frameworks!) and Objective-C projects.

However, without use_frameworks!, you can't import GTXiLib in your Swift project. I'm still not completely sure what the resolution is.

Swift project with use_frameworks:
Screen Shot 2021-03-30 at 1.45.39 PM.png
Objective-C (or Swift) project without use_frameworks:
Screen Shot 2021-03-30 at 1.45.47 PM.png

Sincerely,

Cooper Knaak


Cooper Knaak

unread,
Mar 30, 2021, 7:05:25 PM3/30/21
to KK, ios-accessibility
Hi all,

Getting closer. As of CocoaPods 1.5.0, use_frameworks! is no longer required for Swift pods. To interop between Obj-C and Swift, use_modular_headers! is required, but this still seems to produce the correct Build Phases.

However, there's a separate issue in GTX 4.3. The Swift bridging header is trying to include the Obj-C++ headers, which include pure C++ symbols. This causes an error. I'm going to look into how to prevent that from happening. If they can be moved to a separate target or excluded from the bridging header, I hope that will resolve the issue.

Sincerely,

Cooper Knaak

Cooper Knaak

unread,
Apr 1, 2021, 6:33:24 PM4/1/21
to KK, ios-accessibility
Hi all,

GTXiLib 4.4 is released on CocoaPods. Please try running pod update (removing use_frameworks! from your Podfile and adding use_modular_headers! as appropriate), then see if it works with Swift now.

Sincerely,

Cooper Knaak

KK

unread,
Apr 7, 2021, 8:49:44 AM4/7/21
to ios-accessibility

Hi Cooper,

I just tried updating to version 4.4 using `use_modular_headers!` and it's working great with Swift. Thanks for fixing this.

Am I correct in assuming that this new version supports UI tests? If so, there doesn't seem to be any documentation on how to use it.

DIVYA MITTAL

unread,
Apr 8, 2024, 5:19:20 AM4/8/24
to ios-accessibility
Hi All,

Can someone please share small demo project. I am facing integration issues wanted to see how tool works.

Reply all
Reply to author
Forward
0 new messages