I'm trying to make streaming speech recognition (Google.Cloud.Speech.V1) work in Magic Leap app.
I've managed to make it work in Unity Editor (Windows x64) as in this video:
But once I build it straight into Magic Leap runtime, I'll get this error:
grpc_csharp_ext.dll not found
... since this DLL in the project is built for Windows x64 runtime (which I just copied & pasted from repo) which works in Editor but won't get carried to Magic Leap runtime.
So I'm trying to build "grpc_csharp_ext.dll" for Magic Leap myself. And I'm stuck :)
Magic Leap has its own Linux OS called LuminOS, which has its own C/C++ builder called "Mabu".
Build files (.mabu) in Mabu look like this:
KIND = shared
OUTNAME = grpc_csharp_ext
SRCS = ../ext/grpc_csharp_ext.c
INCS = ../../../include
Above I'm basically telling Mabu to build a shared library (DLL) named as "grpc_csharp_ext", using the source C file and any files in the include folder for references.
Following is the log when Mabu runs the build file:
D:\Projects\_extern_\grpc\src\csharp\experimental>mabu grpc_csharp_ext.mabu -t release_win_msvc-2017_x64
[grpc_csharp_ext] Compiling grpc_csharp_ext.c...
grpc_csharp_ext.c
[grpc_csharp_ext] Linking DLL grpc_csharp_ext.dll...
Creating library grpc_csharp_ext.lib and object grpc_csharp_ext.exp
grpc_csharp_ext.c-99b723c0f96300a2.o : error LNK2019: unresolved external symbol grpc_raw_byte_buffer_create referenced in function string_to_byte_buffer
grpc_csharp_ext.c-99b723c0f96300a2.o : error LNK2019: unresolved external symbol grpc_byte_buffer_length referenced in function grpcsharp_batch_context_recv_message_length
***** BUNCH OF OTHER LINK ISSUES *****
grpc_csharp_ext.c-99b723c0f96300a2.o : error LNK2019: unresolved external symbol gpr_thd_currentid referenced in function grpcsharp_log_handler
grpc_csharp_ext.dll : fatal error LNK1120: 67 unresolved externals
make: *** [D:/Projects/_extern_/grpc/src/csharp/experimental/.out/release_win_msvc-2017_x64/grpc_csharp_ext.mk:22: D:/Projects/_extern_/grpc/src/csharp/experimental/.out/release_win_msvc-2017_x64/grpc_csharp_ext.dll] Error
Note "unresolved external symbol" errors.
I'm thinking the cause is that those .h files in the include folder don't have actual implementation .c files.
For example, grpc/impl/codegen/byte_buffer.h goes like:
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/grpc_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slices,
size_t nslices);
/** Returns a *compressed* RAW byte buffer instance over the given slices (up to
* \a nslices). The \a compression argument defines the compression algorithm
* used to generate the data in \a slices.
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer* grpc_raw_compressed_byte_buffer_create(
grpc_slice* slices, size_t nslices, grpc_compression_algorithm compression);
which defines
grpc_raw_byte_buffer_create() but doesn't implement it, hense the "unresolved symbol" error above (1st one).
I couldn't find those implementation .c files anywhere in the repo (except PHP ones).
I did read iOS/Android build files in Unity experimental folder in the repo, but failed to track down where the .c files are coming from.
So I'm stuck here.
- Can someone explain where all the other builds (cmakes) are fetching the implementation .c files from?
- Or does it actually need to be implemented anew for LuminOS?
Thank you!
Ryo
How can
.com/ryoichirooka/status/1110313722826784768