sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 347 forks source link

undefined reference to symbol 'xcb_setup_pixmap_formats_length' #214

Closed demobin8 closed 6 years ago

demobin8 commented 6 years ago

follow instructions from here https://sourcey.com/libsourcey/installation-linux/ Install Dependencies successed Install FFmpeg successed # WebRTC build (with Symple) successed but link failed when cmake with -DBUILD_SAMPLES_webrtc=ON at build webrtcstreamerd:

[ 15%] Built target libuv
[ 23%] Built target zlib
[ 32%] Built target zlibstatic
[ 35%] Built target minizip
[ 36%] Built target http_parser
[ 51%] Built target base
[ 52%] Built target json
[ 54%] Built target util
[ 57%] Built target crypto
[ 63%] Built target net
[ 73%] Built target av
[ 79%] Built target webrtc
[ 87%] Built target http
[ 89%] Built target socketio
[ 95%] Built target symple
[ 96%] Linking CXX executable webrtcstreamerd
/usr/bin/ld: /usr/local/lib/libavdevice.a(xcbgrab.o): undefined reference to symbol 'xcb_setup_pixmap_formats_length'
//usr/lib/x86_64-linux-gnu/libxcb.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/build.make:342: recipe for target 'webrtc/samples/webrtcstreamer/webrtcstreamerd' failed
make[2]: *** [webrtc/samples/webrtcstreamer/webrtcstreamerd] Error 1
CMakeFiles/Makefile2:630: recipe for target 'webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all' failed
make[1]: *** [webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

any suggestion?

auscaster commented 6 years ago

First try with a prebuilt library: https://sourcey.com/precompiled-webrtc-libraries/

If that works then you know your env is good and you can debug more easily

On 24 January 2018 at 10:15, demobin notifications@github.com wrote:

follow instructions from here https://sourcey.com/ libsourcey/installation-linux/ Install Dependencies successed Install FFmpeg successed

WebRTC build (with Symple) successed

but link failed when cmake with -DBUILD_SAMPLES_webrtc=ON at build webrtcstreamerd:

[ 15%] Built target libuv [ 23%] Built target zlib [ 32%] Built target zlibstatic [ 35%] Built target minizip [ 36%] Built target http_parser [ 51%] Built target base [ 52%] Built target json [ 54%] Built target util [ 57%] Built target crypto [ 63%] Built target net [ 73%] Built target av [ 79%] Built target webrtc [ 87%] Built target http [ 89%] Built target socketio [ 95%] Built target symple [ 96%] Linking CXX executable webrtcstreamerd /usr/bin/ld: /usr/local/lib/libavdevice.a(xcbgrab.o): undefined reference to symbol 'xcb_setup_pixmap_formats_length' //usr/lib/x86_64-linux-gnu/libxcb.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/build.make:342: recipe for target 'webrtc/samples/webrtcstreamer/webrtcstreamerd' failed make[2]: [webrtc/samples/webrtcstreamer/webrtcstreamerd] Error 1 CMakeFiles/Makefile2:630: recipe for target 'webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all' failed make[1]: [webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2

any suggestion?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/214, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDAxJqY5Xnj0PdMHrFSrFKxZuFid9ks5tNvS7gaJpZM4Rq79Z .

demobin8 commented 6 years ago

i am using prebuilt webrtc, actually i compile success without -DBUILD_SAMPLES_webrtc=ON

...
Scanning dependencies of target symple
[ 95%] Building CXX object symple/CMakeFiles/symple.dir/src/presence.cpp.o
[ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/form.cpp.o
[ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/address.cpp.o
[ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/client.cpp.o
[ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/message.cpp.o
[ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/peer.cpp.o
[ 98%] Building CXX object symple/CMakeFiles/symple.dir/src/command.cpp.o
[ 99%] Building CXX object symple/CMakeFiles/symple.dir/src/event.cpp.o
[100%] Building CXX object symple/CMakeFiles/symple.dir/src/roster.cpp.o
[100%] Linking CXX static library libscy_symple.a
[100%] Built target symple

i try to add -lxcb but luck...

auscaster commented 6 years ago

Which linux version?

On 24 January 2018 at 11:03, demobin notifications@github.com wrote:

i am using prebuilt webrtc, actually i compile success without -DBUILD_SAMPLES_webrtc=ON

... Scanning dependencies of target symple [ 95%] Building CXX object symple/CMakeFiles/symple.dir/src/presence.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/form.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/address.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/client.cpp.o [ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/message.cpp.o [ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/peer.cpp.o [ 98%] Building CXX object symple/CMakeFiles/symple.dir/src/command.cpp.o [ 99%] Building CXX object symple/CMakeFiles/symple.dir/src/event.cpp.o [100%] Building CXX object symple/CMakeFiles/symple.dir/src/roster.cpp.o [100%] Linking CXX static library libscy_symple.a [100%] Built target symple

i try to add -lxcb but luck...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/214#issuecomment-360080875, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDOSnu4VwSGLHhJ-73KoC3wlaCa-Vks5tNv_0gaJpZM4Rq79Z .

auscaster commented 6 years ago

You can try including the libraries required by FFmpeg on your platform, that will solve the issue. A good place to start is the pkgconfig file for FFmpeg

On 24 January 2018 at 12:38, Kam Low auscaster@gmail.com wrote:

Which linux version?

On 24 January 2018 at 11:03, demobin notifications@github.com wrote:

i am using prebuilt webrtc, actually i compile success without -DBUILD_SAMPLES_webrtc=ON

... Scanning dependencies of target symple [ 95%] Building CXX object symple/CMakeFiles/symple.dir/src/presence.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/form.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/address.cpp.o [ 96%] Building CXX object symple/CMakeFiles/symple.dir/src/client.cpp.o [ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/message.cpp.o [ 97%] Building CXX object symple/CMakeFiles/symple.dir/src/peer.cpp.o [ 98%] Building CXX object symple/CMakeFiles/symple.dir/src/command.cpp.o [ 99%] Building CXX object symple/CMakeFiles/symple.dir/src/event.cpp.o [100%] Building CXX object symple/CMakeFiles/symple.dir/src/roster.cpp.o [100%] Linking CXX static library libscy_symple.a [100%] Built target symple

i try to add -lxcb but luck...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/214#issuecomment-360080875, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDOSnu4VwSGLHhJ-73KoC3wlaCa-Vks5tNv_0gaJpZM4Rq79Z .

demobin8 commented 6 years ago

get libs using pkg-config --libs libavdevice:

-L/usr/local/lib -lavdevice -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lavfilter -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lswscale -lm -lpostproc -lavformat -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lavcodec -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lswresample -lm -lavutil -lm

and add to cmake/FindWebRTC.cmake line 158, it works:

    set(WEBRTC_DEPENDENCIES -lrt -lX11 -lGLU -L/usr/local/lib -lavdevice -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lavfilter -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lswscale -lm -lpostproc -lavformat -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lavcodec -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lasound -lSDL -lopencore-amrwb -lopencore-amrnb -lm -llzma -lz -pthread -lswresample -lm -lavutil -lm) # -lGL `pkg-config --libs libavdevice`

compile success

[  8%] Built target zlib
[  9%] Built target http_parser
[ 18%] Built target zlibstatic
[ 33%] Built target libuv
[ 36%] Built target minizip
[ 51%] Built target base
[ 52%] Built target json
[ 55%] Built target crypto
[ 65%] Built target av
[ 67%] Built target util
[ 73%] Built target net
[ 79%] Built target webrtc
[ 87%] Built target http
[ 89%] Built target socketio
[ 95%] Built target symple
[ 97%] Linking CXX executable webrtccapturerd
[ 97%] Linking CXX executable webrtcstreamerd
[ 97%] Linking CXX executable webrtcrecorderd
[ 98%] Built target webrtccapturer
[ 99%] Built target webrtcrecorder
[100%] Built target webrtcstreamer
rYuuk commented 6 years ago

I did as listed above but i got following error

[15%] Built target libuv [ 23%] Built target zlib [ 32%] Built target zlibstatic [ 35%] Built target minizip [ 36%] Built target http_parser [ 51%] Built target base [ 52%] Built target json [ 62%] Built target av [ 64%] Built target util [ 67%] Built target crypto [ 73%] Built target net [ 81%] Built target http [ 83%] Built target socketio [ 89%] Built target symple [ 95%] Built target webrtc Scanning dependencies of target webrtcstreamer [ 96%] Building CXX object webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/main.cpp.o [ 96%] Building CXX object webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/signaler.cpp.o [ 97%] Linking CXX executable webrtcstreamerd /usr/bin/ld: /home//ffmpeg_build/lib/libavcodec.a(libtheoraenc.o): undefined reference to symbol 'th_encode_packetout@@libtheoraenc_1.0' //usr/lib/x86_64-linux-gnu/libtheoraenc.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/build.make:378: recipe for target 'webrtc/samples/webrtcstreamer/webrtcstreamerd' failed make[2]: [webrtc/samples/webrtcstreamer/webrtcstreamerd] Error 1 CMakeFiles/Makefile2:943: recipe for target 'webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all' failed make[1]: [webrtc/samples/webrtcstreamer/CMakeFiles/webrtcstreamer.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2