Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running coverage report, traced back to tao dependency core-video-sys #270

Closed
mihirsamdarshi opened this issue Jan 4, 2022 · 7 comments
Assignees

Comments

@mihirsamdarshi
Copy link

Hey guys, so I was having some issues compiling sometimes, especially when building my app in order to run grcov, my app was having some trouble on macOS, getting the following error message:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/user/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" ... [long linker command here] ...
  = note: Undefined symbols for architecture x86_64:
            "_CFMutableAttributedStringGetTypeID", referenced from:
                _$LT$core_foundation..attributed_string..CFMutableAttributedString$u20$as$u20$core_foundation..base..TCFType$GT$::type_id::h9f6f71bdd347aca0 in foo-cef9f22f855ec251.198s3ihm7i58x886.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: aborting due to previous error

I did some digging and found this issue - which mentioned that the error was related to an older version of core-foundation-rs.

I did a little more digging and found that tao depends on core-video-sys, which in turn depends on that older version of core-foundation-rs. That core-video-sys crate seems to be abandoned. Someone graciously cleaned up the code and dependencies and submitted a pull request but this has not been merged for nearly 5 months.

While investigating, I was hoping that the PR would fix the issue, and it did in fact. In order to test it I cloned tao, and added a patch statement to the Cargo.toml to use the PR branch. I then added patch statement to wry to reference the local tao copy with the patch statement in its Cargo.toml, and so on and so forth for tauri-runtime-wry and tauri, and finally my application.

I was wondering how/if the team could address this - perhaps submodule the crate or something? From my understanding crates aren't allowed to be published with git dependencies, but are there any other solutions?

Thanks for all your work, and as always, please let me know how I can help!

@nothingismagick
Copy link
Sponsor Member

What a great finding. Thankyou so much for digging in!

Now what to do about it is the next question. Sometimes we adopt packages (either through forking and publishing under a similar name but in the hopes the original author picks it back up) or we accept the transfer and become maintainers. The latter is more work, because we have to apply our own CI and licenses etc.

In either case, it's worthwhile tracking down the original authors and asking them how they would like to proceed. If they don't respond in a couple weeks then we can assume its been abandoned, and we are unlikely to receive a proper repo transfer.

In the meantime, we can prepare the fork(s). Would you consider doing this on your own and then transferring to our github org? And reat assured, we would happily welcome you as a maintainer. :)

@mihirsamdarshi
Copy link
Author

mihirsamdarshi commented Jan 4, 2022

@nothingismagick I would love to help out in any way, this project is so useful to me. I will create a fork of that fixed version of core-video-sys. please let me know what you need for me to do before a potential adoption of the crate

@wusyong wusyong self-assigned this Jan 5, 2022
@wusyong
Copy link
Member

wusyong commented Jan 6, 2022

next branch doesn't seem to use core-video-sys anymore. @mihirsamdarshi Could you try if latest commit work for you?

@mihirsamdarshi
Copy link
Author

next branch doesn't seem to use core-video-sys anymore. @mihirsamdarshi Could you try if latest commit work for you?

I am not sure what you mean, I still do see it listed in Cargo.toml?

@wusyong
Copy link
Member

wusyong commented Jan 10, 2022

Ah sorry, silly me just run cargo tree on different platform.
I think we can make a soft fork from kvark's one until the PR is merged.

@wusyong
Copy link
Member

wusyong commented Jan 13, 2022

This should be fixed by #274. Let me know if it's still an issue.

@wusyong wusyong closed this as completed Jan 13, 2022
@mihirsamdarshi
Copy link
Author

mihirsamdarshi commented Jan 14, 2022

thanks @wusyong. I have a couple of notes. On looking at the source on doc.rs and crates.io I still see a dependency on the obj_c crate, which is really only used by one file (open_gl_es_texture_cache.rs), I was wondering if you saw that as necessary? I forked the core-video-sys crate that I mentioned and added a few changes, I was wondering if you wanted to take a look at that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants