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

Build error and Fix #36

Open
rochefort8 opened this issue Jul 23, 2018 · 2 comments
Open

Build error and Fix #36

rochefort8 opened this issue Jul 23, 2018 · 2 comments

Comments

@rochefort8
Copy link
Contributor

rochefort8 commented Jul 23, 2018

Final stage of build process, "make run_assisitant" may give me the following error,

 g++ /home/ubuntu/git/assistant-sdk-cpp//googleapis/gens/google/assistant/embedded/v1alpha2/embedded_assistant.pb.o /home/ubuntu/git/assistant-sdk-cpp//googleapis/gens/google/assistant/embedded/v1alpha2/embedded_assistant.grpc.pb.o googleapis.ar src/json_util.o src/base64_encode.o src/run_assistant_text.o  -lm -lm  -lgrpc_cronet -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed -lprotobuf -lpthread -ldl -lcurl  -o run_assistant_text
/usr/bin/ld: /home/ubuntu/git/assistant-sdk-cpp//googleapis/gens/google/assistant/embedded/v1alpha2/embedded_assistant.grpc.pb.o: undefined reference to symbol '_ZN4grpc6g_glipE'
//usr/local/lib/libgrpc++.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:104: recipe for target 'run_assistant_text' failed
make: *** [run_assistant_text] Error 1

(Means "Undefined symble grpc::g_glip according to my small investigation)

I found this may be fixed with the following change,

iff --git a/Makefile b/Makefile
index b3e4cb3..72e9177 100644
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,8 @@ LDFLAGS += $(GRPC_GRPCPP_LDLAGS) \
            -lprotobuf -lpthread -ldl -lcurl
 else
 LDFLAGS += $(GRPC_GRPCPP_LDLAGS) \
-           -lgrpc_cronet -Wl,--no-as-needed -lgrpc++_reflection \
-           -Wl,--as-needed -lprotobuf -lpthread -ldl -lcurl
+           -lgrpc_cronet -Wl,--no-as-needed -lgrpc++_reflection -lgrpc++ \
+           -Wl,--as-needed -lprotobuf -lpthread -ldl -lcurl -lasound
 endif

Seemed that linking of the alsa sound and grpc libraries were missing, but I have no idea whether this change is the correct way to fix this issues, hope to provide me the proper way,

Thanks and BRs,

@rochefort8
Copy link
Contributor Author

rochefort8 commented Jul 25, 2018

I found this seemed to cause by the same issue mentioned in #35,
Removing "google/ads" tentatively lead to fix every error I wrote in this issue and worked fine on Ubuntu Linux on AES EC2.

@Fleker
Copy link
Collaborator

Fleker commented Jul 25, 2018

Okay, then fixing the build instructions should fix both.

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

2 participants