Closed efirmaster closed 7 years ago
Please paste the output of
pkg-config --libs libavcodec libavformat libswscale libavutil
-L/usr/local/lib -lavformat -lavcodec -lvdpau -lX11 -lasound -lx265 -lx264 -lpthread -ldl -lvo-aacenc -lmp3lame -lfdk-aac -lz -pthread -lavresample -lswscale -lavutil -lm
they should be reordered:
-L/usr/local/lib -lavformat -lavcodec -lasound -lx265 -lx264 -lpthread -ldl -lvo-aacenc -lmp3lame -lfdk-aac -lz -pthread -lavresample -lswscale -lavutil -lm -lvdpau -lX11
Try to override them in the makefile for now. I'll report and/or fix it upstream later.
I'm having the same issue, but my ffmpeg compilation results in a much larger set of -l flags:
-Wl,--no-undefined -pthread -L/a/path -lavformat -lavcodec -lXv -lvdpau -lva-drm -lva-X11 -lva -lxcb-shm -lxcb-xfixes -lxcb-render -lcxb-shape -lxcb -lXau -lXdmcp -LSDL2 -lasound -lpulse-simple -lpulse -lX11 -lXtext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client -lwayland-cursor -lxkbcommon -lts -lx265 -lstdc++ -lrt -lx264 -ldl -lvpx -lpthread -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopus -lmp3lame -lfdk-aac -lass -lfontconfig -lenca -lfribidi -lexpat -lfreetype -lpng12 -lz -lswresample -lswscale -lavutil -lm
Which outputs the same errors. I moved -lvdpau
and -lX11
to the end of the command and now I get the following error:
hwcontext_vaapi.c864: undefined reference to 'vaGetDisplay'
Clearly the order matters but can you elaborate a bit on why so I can help with the debugging?
your linker has as-needed enabled and for some reasons the link like in pkgconfig is sort of wrong you need to reorder -lva and you should be ok. Hopefully it will be fixed soon.
On Wed, Oct 19, 2016 at 9:11 PM, Gabriel Serralha Miró < notifications@github.com> wrote:
I'm having the same issue, but my ffmpeg compilation results in a much larger set of -l flags:
-Wl,--no-undefined -pthread -L/a/path -lavformat -lavcodec -lXv -lvdpau -lva-drm -lva-X11 -lva -lxcb-shm -lxcb-xfixes -lxcb-render -lcxb-shape -lxcb -lXau -lXdmcp -LSDL2 -lasound -lpulse-simple -lpulse -lX11 -lXtext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client -lwayland-cursor -lxkbcommon -lts -lx265 -lstdc++ -lrt -lx264 -ldl -lvpx -lpthread -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopus -lmp3lame -lfdk-aac -lass -lfontconfig -lenca -lfribidi -lexpat -lfreetype -lpng12 -lz -lswresample -lswscale -lavutil -lm
Which outputs the same errors. I moved -lvdpau and -lX11 to the end of the command and now I get the following error:
hwcontext_vaapi.c864: undefined reference to 'vaGetDisplay'
Clearly the order matters but can you elaborate a bit on why so I can help with the debugging?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lu-zero/bmdtools/issues/78#issuecomment-254911705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOlpA2JnjBwrcCTdXS_I60ZqG6kxCJZks5q1mtigaJpZM4KBkCT .
So with the help of lu-zero's last comment and (this post)[ht8tp://stackoverflow.com/questions/38995044/errors-of-vagetdisplay-and-vagetdisplaydrm], moving -lvdpau -lX11 and -lva* flags to the end of the compile command worked.
You are right ,thank you ~ @gsmiro
Libav got the link line fixed meanwhile.
Pls. sorry for my bad English! I compile libav, aac, mp3, yasm and other.
When i try to make bmdtools width:
make SDK_PATH=/usr/local/src/bmd/include
I have errors like:
bmdcapture.cpp: In function ‘int main(int, char**)’: bmdcapture.cpp:971:37: warning: ignoring return value of ‘int avformat_write_header(AVFormatContext*, AVDictionary**)’, declared with attribute warn_unused_result [-Wunused-result] avformat_write_header(oc, &opts); ^ /usr/local/lib/libavutil.a(hwcontext_vaapi.o): In function
vaapi_device_free': /all/libavutil/hwcontext_vaapi.c:861: undefined reference toXCloseDisplay' /usr/local/lib/libavutil.a(hwcontext_vaapi.o): In function
vaapi_device_create': /all/libavutil/hwcontext_vaapi.c:891: undefined reference toXOpenDisplay' /all/libavutil/hwcontext_vaapi.c:896: undefined reference to
vaGetDisplay' /all/ffmpeg/libavutil/hwcontext_vaapi.c:903: undefined reference toXDisplayName' /all/libavutil/hwcontext_vaapi.c:893: undefined reference to
XDisplayName' /all/libavutil/hwcontext_vaapi.c:917: undefined reference tovaGetDisplayDRM' /all/libavutil/hwcontext_vaapi.c:891: undefined reference to
XOpenDisplay' /all/libavutil/hwcontext_vaapi.c:893: undefined reference toXDisplayName' /all/libavutil/hwcontext_vaapi.c:898: undefined reference to
XDisplayName' /usr/local/lib/libavutil.a(hwcontext_vdpau.o): In functionvdpau_device_create': /all/libavutil/hwcontext_vdpau.c:431: undefined reference to
XOpenDisplay' /all/libavutil/hwcontext_vdpau.c:437: undefined reference toXDisplayString' /all/libavutil/hwcontext_vdpau.c:439: undefined reference to
XDefaultScreen' /all/libavutil/hwcontext_vdpau.c:439: undefined reference tovdp_device_create_x11' /all/libavutil/hwcontext_vdpau.c:433: undefined reference to
XDisplayName' /usr/local/lib/libavutil.a(hwcontext_vdpau.o): In functionvdpau_device_free': /all/libavutil/hwcontext_vdpau.c:410: undefined reference to
XCloseDisplay' collect2: error: ld returned 1 exit status Makefile:58: recipe for target 'bmdcapture' failed make: *\ [bmdcapture] Error 1`