apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Link failed: undefined reference to symbol 'XConvertSelection' error adding symbols: DSO missing from command line

Open liuyangly25 opened this issue 8 years ago • 11 comments

I am trying to use perception lowcost visualizer on Ubuntu 16.04 following the guide How to Run Apollo in Ubuntu 16.

The build failed after I added the line glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); and installed glfw 3.2.1

The error is here:

ERROR: /apollo/modules/perception/BUILD:35:1: Linking of rule '//modules/perception:perception' failed (Exit 1) /usr/bin/ld: /usr/local/lib/libglfw3.a(x11_window.c.o): undefined reference to symbol 'XConvertSelection' /usr/lib/x86_64-linux-gnu//libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status INFO: Elapsed time: 850.995s, Critical Path: 78.68s FAILED: Build did NOT complete successfully

[ERROR] Build failed! [INFO] Took 853 seconds

Any suggestions?

liuyangly25 avatar Aug 14 '18 07:08 liuyangly25

Hi @liuyangly25 please send a screenshot of your command line to help us better troubleshoot your error message.

natashadsouza avatar Aug 17 '18 20:08 natashadsouza

Hi @natashadsouza , I found a solution here https://github.com/ApolloAuto/apollo/issues/4554#issuecomment-403389185. Re-install glfw and the build passed.

liuyangly25 avatar Aug 20 '18 02:08 liuyangly25

@liuyangly25 Yes that is how you could fix it. Did it work for you?

natashadsouza avatar Aug 20 '18 17:08 natashadsouza

@liuyangly25 Hi, I have the same issue. Can you explain more details about #4554 ? I executed the install_glfw3_2.sh file in dev docker and the build seems successful. But when I try to run offline visualizer (both ver2.0 & ver2.5), no window pops up. Can you give me a solution? Thanks..!

CCodie avatar Aug 20 '18 23:08 CCodie

Yes, @natashadsouza . That works for me.

liuyangly25 avatar Aug 21 '18 09:08 liuyangly25

@CCodie I think I installed another version of glfw before. I built it from the source. And that gave me the error. Now I have the same problem - the popup window not showing. Even when I switch to ubuntu 14.04.3 and used glfw from the docker, the popup never shows. Still suffering :(

can you help @natashadsouza ? issue created here https://github.com/ApolloAuto/apollo/issues/5392

liuyangly25 avatar Aug 21 '18 09:08 liuyangly25

@liuyangly25 please confirm if CUDA was installed correctly using nvidia-smi. You could paste your results here if you were unsuccessful.

Thanks!

natashadsouza avatar Aug 27 '18 20:08 natashadsouza

Hello @natashadsouza , nvidia-smi works for me. I have 384.130 on both host and docker.

liuyangly25 avatar Aug 29 '18 02:08 liuyangly25

@liuyangly25 my suggestion is to clear your system and re-install Apollo for Ubuntu 14 from scratch. If you see any build errors, please share a screenshot with us. I do believe a library is causing the problem, however as I do not have visibility of it, restarting your installation is the best possible solution.

natashadsouza avatar Aug 29 '18 22:08 natashadsouza

@natashadsouza , I don't have build errors now. If using glfw static lib, the build should be find. If using dynamic lib, I need to change the glfw.BUILD under third_party folder. Something like this:

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

cc_library( name = "glfw", includes = ["."], linkopts = [ "-lglfw3", "-lglapi", "-lglib-2.0", "-lX11", "-lXrandr", "-lXxf86vm", "-lXinerama", "-lXcursor", ], )

we can close this issue.

liuyangly25 avatar Aug 30 '18 02:08 liuyangly25

Thank you for sharing the changes @liuyangly25 :) I will close this issue. If you have any additional questions, feel free to reopen it.

natashadsouza avatar Aug 31 '18 01:08 natashadsouza