ahq1993 / MPNet

Motion Planning Networks
MIT License
216 stars 49 forks source link

undefined reference to `g_thread_init' #4

Open bbrito opened 5 years ago

bbrito commented 5 years ago

When compiling the dataset I got the following error:

CMakeFiles/viewer.dir/main_viewer.cpp.o: In function main': main_viewer.cpp:(.text.startup+0x2c): undefined reference tog_thread_init'

I think this is due to some updated version of the lcm where g_thread_init was removed. If the reference to it in main_viewer.cpp is removed it fixes this issue.

doctorsrn commented 5 years ago

@bbrito Hi, I meet this error before. It may be due to lack of dependency gthread-2.0 to g_thread_init. Here is my solution: add dependency gthread-2.0 to ./MPNet/data_generation/viewer/src/CMakeLists.txt in line18: before change:

pods_use_pkg_config_packages(viewer viewer 
    bot2-core 
    bot2-vis 
    bot2-lcmgl-client
    renderers)

after change:

pods_use_pkg_config_packages(viewer viewer 
    bot2-core 
    bot2-vis 
    bot2-lcmgl-client
    renderers
        gthread-2.0)
bbrito commented 5 years ago

It worked! Thanks!