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

/usr/bin/ld: cannot find -lPUBLIC #168

Closed
KevenLee opened this issue Nov 2, 2016 · 8 comments
Closed

/usr/bin/ld: cannot find -lPUBLIC #168

KevenLee opened this issue Nov 2, 2016 · 8 comments

Comments

@KevenLee
Copy link

KevenLee commented Nov 2, 2016

Hello, when I compiler the pangolin in ubuntu12.04, I encounter those error:

[ 80%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/v4l.cpp.o
[ 82%] Building C object src/CMakeFiles/pangolin.dir/fonts.c.o
Linking CXX shared library libpangolin.so
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
/usr/bin/ld: cannot find -lPUBLIC
collect2: error: ld returned 1 exit status
make[2]: *** [src/libpangolin.so] Error 1
make[1]: *** [src/CMakeFiles/pangolin.dir/all] Error 2

how should I do.

@stevenlovegrove
Copy link
Owner

I do not know how the library 'PUBLIC' is getting into the linker string - I've not seen this before. Can you share your build/src/PangolinTargets.cmake file?

@KevenLee
Copy link
Author

KevenLee commented Nov 2, 2016

Hello,I find some PUBLIC in files :

  1. CMakeModules/EnsureSymbolsLoaded.cmake
    target_link_libraries(${target} PUBLIC "-u ${symbol}")
  2. src/CMakeLists.txt
    target_link_libraries(${LIBRARY_NAME} PUBLIC ${LINK_LIBS})

I think 'PUBLIC' do not means library here, because when I remove those PUBLIC, all things go well.

@stevenlovegrove
Copy link
Owner

In that case, you may wish to revert to the last tagged version of
pangolin. The line you mentioned is new and relates to enabling video
drivers. If it doesn't work correctly, you may have trouble reading video.
I plan on making some more fixes to that mechanism soon.

On Tue, Nov 1, 2016, 9:38 PM KevenLee notifications@github.com wrote:

Hello,I find some PUBLIC in files :

  1. CMakeModules/EnsureSymbolsLoaded.cmake
    target_link_libraries(${target} PUBLIC "-u ${symbol}")
  2. src/CMakeLists.txt target_link_libraries(${LIBRARY_NAME} PUBLIC
    ${LINK_LIBS})

I think 'PUBLIC' do not means library here, because when I remove those
PUBLIC, all things go well.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#168 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAdXhFwy18XrfsRPTmYQzHFPvdidW9Asks5q6BPOgaJpZM4Kmxq1
.

@KevenLee
Copy link
Author

KevenLee commented Nov 2, 2016

some error happen after I removed 'PUBLIC'.

I run ORB-SLAM2 with pangolin.

terminate called after throwing an instance of 'std::runtime_error'
what(): Pangolin X11: Unable to retrieve framebuffer options

Can you tell me how to fix it?

Thanks

@stevenlovegrove
Copy link
Owner

See my reply to your comment posted here: #74

@stevenlovegrove
Copy link
Owner

Regarding your original post, I believe I should have just fixed that with commit f807ff7

@KevenLee
Copy link
Author

KevenLee commented Nov 4, 2016

I update the pangolin codes now, but, if I do not remove 'PUBLIC' in the files I mentioned before, I still find something are wrong as following:

Linking CXX shared library libpangolin.so
/usr/bin/ld: cannot find -lPUBLIC
collect2: error: ld returned 1 exit status

OS: ubuntu 12.04

Regarding your original post, I believe I should have just fixed that with commit f807ff7

@stevenlovegrove
Copy link
Owner

Oops - sorry! I found it in exactly one file which I have just corrected in 4c67c63

That is the one reference you're referring too, right? It was causing you trouble because your version of cmake must be quite old.

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