Skip to content

Conversation

davidrogers-unity
Copy link
Collaborator

Purpose of this PR

Why is this PR needed? What problem does it solve/fix?


Testing status

Manual Tests: What did you do?

  • Verified that plugins work in the Editor
  • Ran local tests on your machine
  • Other:

Automated Tests: What did you setup? (Add a screenshot or the reference image of the test please)

Yamato: (Select your branch):
https://yamato.prd.cds.internal.unity3d.com/jobs/421-NativeVersionControlPlugins

Any test projects to go with this to help reviewers?


Comments to reviewers

Notes for the reviewers you have assigned.

Copy link
Contributor

@SRombautsU SRombautsU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @davidrogers-unity, did you notice the build failures in CI?
For Windows and Linux, they are link errors, perhaps just missing a dependency, perhaps requiring to update the bokken images used by CI.
For macOS it's an "unsupported architecture" so I believe it requires to update to a more recent Bokken image so that it runs on Apple Silicon

[18:26:21.323 Information] P4AddCommand.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA) [C:\build\output\Unity-Technologies\NativeVersionControlPlugins\P4Plugin\P4Plugin.vcxproj]
[18:26:21.331 Information] P4AddCommand.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ClientUser::SetSSOHandler(class ClientSSO *)" (?SetSSOHandler@ClientUser@@UAEXPAVClientSSO@@@Z) [C:\build\output\Unity-Technologies\NativeVersionControlPlugins\P4Plugin\P4Plugin.vcxproj]
P4AddCommand.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ClientUser::SetTransfer(class ClientTransfer *)" (?SetTransfer@ClientUser@@UAEXPAVClientTransfer@@@Z) [C:\build\output\Unity-Technologies\NativeVersionControlPlugins\P4Plugin\P4Plugin.vcxproj]

[18:23:34.785 Information] ./P4Plugin/Source/p4api/lib/linux64/librpc.a(netsslcredentials.o): In function `PrintNodes(char const*, stack_st_X509_POLICY_NODE*, bio_st*, char const*)':
/var/tmp/179862315/depot/r24.1/p4-bin/../../../3rd_party/
[18:23:34.789 Information] cpp_libraries/openssl/3-latest/artifacts/inc.linux26x86_64/openssl/x509v3.h:1048: undefined reference to `OPENSSL_sk_value'
/var/tmp/179862315/depot/r24.1/p4-bin/../../../3rd_party/cpp_libraries/openssl/3-latest/artifacts/inc.linux26x86_64/openssl/x509v3.h:1048: undefined reference to `OPENSSL_sk_num'
./P4Plugin/Source/p4api/lib/linux64/librpc.a(netsslcredentials.o): In function `PrintCertificateError(x509_st*, int, x509_store_ctx_st*, bio_st*, char const*)':
/var/tmp/179862315/depot/r24.1/p4-bin/../p4/net/netsslcredentials.cc:167: undefined reference to `X509_get0_notBefore'
/var/tmp/179862315/depot/r24.1/p4-bin/../p4/net/netsslcredentials.cc:177: undefined reference to `X509_get0_notAfter'
./P4Plugin/Source/p4api/lib/linux64/librpc.a(netsslcredentials.o): In function `GetSSLVerifyCbIdx()':
/var/tmp/179862315/depot/r24.1/p4-bin/../p4/net/netsslcredentials.cc:220: undefined reference to `CRYPTO_THREAD_run_once'
./P4Plugin/Source/p4api/lib/linux64/librpc.a(netsslcredentials.o): In function `NetSslCredentials::ValidateCertDateRange(x509_st*, Error*)':
/var/tmp/179862315/depot/r24.1/p4-bin/../p4/net/netsslcredentials.cc:623: undefined reference to `X509_get0_notBefore'
/var/tmp/179862315/depot/r24.1/p4-bin/../p4/net/netsslcredentials.cc:631: undefined reference to `X509_get0_notAfter'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture

@davidrogers-unity
Copy link
Collaborator Author

@SRombautsU The Win/Lin link errors are because I didn't update openssl for win/lin. I didn't know where to source them from. I think I mentioned it on slack but didn't put it here in the PR.

As for Mac, you're right that bokken image is really old. On trunk we use https://images.bokken.prd.ds.unity3d.com/image/build-system/unity-macos-13-arm64-unity/v2.4499056 for the editor but I'm not positive if that the right way to go for dependencies. Maybe check in #devs-bokken or #devs-buildsystem? If we update Mac we should update Windows and Linux VMs too.

Hopefully just the VM will fix it otherwise it may be the case that this project needs to be updated from makefiles to bee for building like we have for other dependencies such as FMOD, PhysX, and others.

@davidrogers-unity
Copy link
Collaborator Author

@SRombautsU Fixed the Mac builds, I think just the win and linux need new openssl libraries. So if you can find those and put them the right hopefully that fix the builds.

@SRombautsU
Copy link
Contributor

That's awesome David!
I'll make sure to bring the subject with my manager to see how we can move forward with that faster. It's a hot topic for us!

Perhaps should we focus on testing and releasing this as a new version on both macOS platforms, and leave Windows and Linux untouched for the sake of splitting the work & validation effort!

@davidrogers-unity
Copy link
Collaborator Author

That's awesome David! I'll make sure to bring the subject with my manager to see how we can move forward with that faster. It's a hot topic for us!

Perhaps should we focus on testing and releasing this as a new version on both macOS platforms, and leave Windows and Linux untouched for the sake of splitting the work & validation effort!

I'll leave it up to what ever work for you. I mostly did this out of curiosity and it worked out better than I'd expected so I can hand it off to your team to drive it to the finish line if you could.

@SRombautsU
Copy link
Contributor

Closing this PR (keeping the branch around for now) in favor of #30 that focus on macOS only (keeping Windows and Linux untouched)

@SRombautsU SRombautsU closed this Sep 19, 2025
@SRombautsU
Copy link
Contributor

I found this warning in the logs of the MacOS build https://unity-ci.cds.internal.unity3d.com/job/56002498/logs

[14:48:36.882 Information] ld: warning: object file (./P4Plugin/Source/openssl/lib/osx64/libssl.a(libssl-lib-bio_ssl.o)) was built for newer macOS version (15.0) than being linked (10.11)

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

Successfully merging this pull request may close these issues.

2 participants