Giter VIP home page Giter VIP logo

Comments (14)

neuecc avatar neuecc commented on May 15, 2024

I do not know the solution to the problem.
googled:"dyld: lazy symbol binding failed" find some (same?) faq but I can not understand whether it is suitable or not.

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

Have you managed to run it in IOS? I wonder if it's actual issue or I haven't done something in Unity...

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

Yes, it is running on iOS (It is being built everyday in our game under development now)
As I update to 1.3 soon, can you see it at that time?
The custom code of gRPC is here.
https://github.com/grani/gRPC/tree/UnityClient
We've modified some of issue, including freeze of Unity Editor.

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

You use il2cpp backend for IOS right?

As I update to 1.3 soon, can you see it at that time?

Do you mean that you are in the progress of updating to 1.2 grpc?

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

Yes, I use IL2CPP backend only.

Ah, sorry, '1.2'.
Yes, I plan to upgrade this week or next week.

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

Cheers, that would be great. In the meantime I will try to build native dlls manually from your UnityClient branch

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

I have tried running unaltered latest MagicOnion and I can't even build it for IOS/IL2CPP/Simulator

IL2CPP error for method 'System.Int32 MessagePack.LZ4.LZ4Codec::Encode32(System.Byte*,System.Byte*,System.Int32,System.Int32)' in LZ4Codec.Unsafe.cs:83
Additional information: Exception of type 'System.Exception' was thrown.

I have then tried mono backend instead of il2cpp and it builds and deploys to simulator but then any access to NativeMethods yields EntrypointNotFoundException that looks like same root cause as in my original case with il2cpp

I am also struggling to build native dependencies for IOS. When I am building grpc from the branch you have given I can see libs like libgrpc.a or libboringssl.a and some more but not libgrpc_csharp_ext.a or libgRPC-Core.a. Can you advise please on how you build them?

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

Oh, sorry, I've fixed MessagePack for C# + IL2CPP compile issue on MessagePack repository
but it is not yet moved on MagicOnion repository.

// old, MagicOnion
https://github.com/neuecc/MagicOnion/tree/master/src/MagicOnion.Client.Unity/Assets/Scripts/MessagePack/LZ4/Codec

// new, MessagePack
https://github.com/neuecc/MessagePack-CSharp/tree/master/src/MessagePack/LZ4/Codec

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

Environment:

  • Mac (Sierra 10.12)
  • Xcode (8.1)
  • CocoaPods (1.1.1)

build shell.
https://github.com/grani/grpc/blob/UnityClient/build_grpc_cshap_ext.sh

our ci command:

build_type="Debug"
# build_type="Release"
output_dir="./out/${build_type}"

chmod +x ./build_grpc_cshap_ext.sh
./build_grpc_cshap_ext.sh "$output_dir" $build_type

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

whilst building I have run into such issue:

GPR_EXPORT grpc_event GPR_CALLTYPE
grpcsharp_completion_queue_next(grpc_completion_queue *cq) {
  return grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
                                    NULL);
}

magicgrpc/xcprojects/grpc_csharp_ext_ios/src/csharp/ext/grpc_csharp_ext.c:380:41: Too few arguments to function call, expected 4, have 3

I have put NULL in there for now, and managed to build it. But using static libs that I build hasn't helped.

After digging some more I have run nm on the libs and realised that there are no symbols for x86_64 architecture(only arm64) and that was my problem because apparently simulator of IOS uses x86_64 architecture(same as mac). So that's is the root case. That would also explain why I couldn't make it work in editor on mac as well. I have tested in real device and it found all entrypoints - hooray!

To make it work in editor I have tried to build x86_64 but when I change in xcode to different architecture for grpc_csharp_ext and run build script I get some cryptic

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-grpc_csharp_ext
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-grpc_csharp_ext is not an object file (not allowed in a library)

Sadly, as a windows user that's all a bit over my head.
If it's possible after you upgrade to grpc 1.2 can you please include both ARM and x86_64 static libs for IOS?

Thank you

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

I've uploaded v0.4.0 and its .unitypackage on releases page.

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

I have upgraded to latest. 1.2 works perfectly. 👍
Though I still can't figure out how to run it in editor on mac. I can see there is now Native/Mac folder that contains some .bundle_ file but it doesn't look like object library file and when I run in editor it still complains that it can't find entrypoints for native methods. Should it work out of the box or do I need some additional configuration?

from magiconion.

neuecc avatar neuecc commented on May 15, 2024

Sorry, .bundle_ is .bundle file, please rename it and is it work?
Bundle was recognized as a folder and could not be packaged, it was included as bundle_.
I've take it from NuGet, 1.2.0/runtimes/osx/native/libgrpc_csharp_ext.x64.dylib and renamed.
I am not familiar with plugins in Mac Editor, so I can not confirm whether it actually works.

from magiconion.

Rurouni avatar Rurouni commented on May 15, 2024

It started to work as soon as I renamed to .bundle.
Thank you for your help!

from magiconion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.