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

Fail to build on ubuntu 16.04, FFmpeg problem. #5

Open
liuyoudehama opened this issue Feb 9, 2021 · 0 comments
Open

Fail to build on ubuntu 16.04, FFmpeg problem. #5

liuyoudehama opened this issue Feb 9, 2021 · 0 comments

Comments

@liuyoudehama
Copy link

logs of cmake:

❯ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") found components: doxygen
-- Using X11 for window creation
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libavcodec'
-- Found libavcodec, version 56.60.100
-- Checking for module 'libavformat'
-- Found libavformat, version 56.40.101
-- Checking for module 'libavfilter'
-- Found libavfilter, version 5.40.101
-- Checking for module 'libavdevice'
-- Found libavdevice, version 56.4.100
-- Checking for module 'libavutil'
-- Found libavutil, version 54.31.100
-- Checking for module 'libswresample'
-- Found libswresample, version 1.2.101
-- Checking for module 'libswscale'
-- Found libswscale, version 3.1.101
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lydhm/video-app/build

logs of make:

❯ make VERBOSE=1
/usr/local/bin/cmake -S/home/lydhm/video-app -B/home/lydhm/video-app/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/lydhm/video-app/build/CMakeFiles /home/lydhm/video-app/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/lydhm/video-app/build'
make -f lib/glfw/src/CMakeFiles/glfw.dir/build.make lib/glfw/src/CMakeFiles/glfw.dir/depend
make[2]: Entering directory '/home/lydhm/video-app/build'
cd /home/lydhm/video-app/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/lydhm/video-app /home/lydhm/video-app/lib/glfw/src /home/lydhm/video-app/build /home/lydhm/video-app/build/lib/glfw/src /home/lydhm/video-app/build/lib/glfw/src/CMakeFiles/glfw.dir/DependInfo.cmake --color=
Dependee "/home/lydhm/video-app/build/lib/glfw/src/CMakeFiles/glfw.dir/DependInfo.cmake" is newer than depender "/home/lydhm/video-app/build/lib/glfw/src/CMakeFiles/glfw.dir/depend.internal".
Dependee "/home/lydhm/video-app/build/lib/glfw/src/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/lydhm/video-app/build/lib/glfw/src/CMakeFiles/glfw.dir/depend.internal".
Scanning dependencies of target glfw
make[2]: Leaving directory '/home/lydhm/video-app/build'
make -f lib/glfw/src/CMakeFiles/glfw.dir/build.make lib/glfw/src/CMakeFiles/glfw.dir/build
make[2]: Entering directory '/home/lydhm/video-app/build'
[ 4%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/context.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/context.c.o -c /home/lydhm/video-app/lib/glfw/src/context.c
[ 9%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/init.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/init.c.o -c /home/lydhm/video-app/lib/glfw/src/init.c
[ 14%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/input.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/input.c.o -c /home/lydhm/video-app/lib/glfw/src/input.c
[ 19%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/monitor.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/monitor.c.o -c /home/lydhm/video-app/lib/glfw/src/monitor.c
[ 23%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/vulkan.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/vulkan.c.o -c /home/lydhm/video-app/lib/glfw/src/vulkan.c
[ 28%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/window.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -Wdeclaration-after-statement -o CMakeFiles/glfw.dir/window.c.o -c /home/lydhm/video-app/lib/glfw/src/window.c
[ 33%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/x11_init.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/x11_init.c.o -c /home/lydhm/video-app/lib/glfw/src/x11_init.c
[ 38%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/x11_monitor.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/x11_monitor.c.o -c /home/lydhm/video-app/lib/glfw/src/x11_monitor.c
[ 42%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/x11_window.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/x11_window.c.o -c /home/lydhm/video-app/lib/glfw/src/x11_window.c
[ 47%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/xkb_unicode.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/xkb_unicode.c.o -c /home/lydhm/video-app/lib/glfw/src/xkb_unicode.c
[ 52%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/posix_time.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/posix_time.c.o -c /home/lydhm/video-app/lib/glfw/src/posix_time.c
[ 57%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/posix_thread.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/posix_thread.c.o -c /home/lydhm/video-app/lib/glfw/src/posix_thread.c
[ 61%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/glx_context.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/glx_context.c.o -c /home/lydhm/video-app/lib/glfw/src/glx_context.c
[ 66%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/egl_context.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/egl_context.c.o -c /home/lydhm/video-app/lib/glfw/src/egl_context.c
[ 71%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/osmesa_context.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/osmesa_context.c.o -c /home/lydhm/video-app/lib/glfw/src/osmesa_context.c
[ 76%] Building C object lib/glfw/src/CMakeFiles/glfw.dir/linux_joystick.c.o
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/bin/cc -D_GLFW_USE_CONFIG_H -I/home/lydhm/video-app/lib/glfw/include -I/home/lydhm/video-app/lib/glfw/src -I/home/lydhm/video-app/build/lib/glfw/src -fPIC -Wall -std=gnu99 -o CMakeFiles/glfw.dir/linux_joystick.c.o -c /home/lydhm/video-app/lib/glfw/src/linux_joystick.c
[ 80%] Linking C static library libglfw3.a
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/local/bin/cmake -P CMakeFiles/glfw.dir/cmake_clean_target.cmake
cd /home/lydhm/video-app/build/lib/glfw/src && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/glfw.dir/link.txt --verbose=1
/usr/bin/ar qc libglfw3.a CMakeFiles/glfw.dir/context.c.o CMakeFiles/glfw.dir/init.c.o CMakeFiles/glfw.dir/input.c.o CMakeFiles/glfw.dir/monitor.c.o CMakeFiles/glfw.dir/vulkan.c.o CMakeFiles/glfw.dir/window.c.o CMakeFiles/glfw.dir/x11_init.c.o CMakeFiles/glfw.dir/x11_monitor.c.o CMakeFiles/glfw.dir/x11_window.c.o CMakeFiles/glfw.dir/xkb_unicode.c.o CMakeFiles/glfw.dir/posix_time.c.o CMakeFiles/glfw.dir/posix_thread.c.o CMakeFiles/glfw.dir/glx_context.c.o CMakeFiles/glfw.dir/egl_context.c.o CMakeFiles/glfw.dir/osmesa_context.c.o CMakeFiles/glfw.dir/linux_joystick.c.o
/usr/bin/ranlib libglfw3.a
make[2]: Leaving directory '/home/lydhm/video-app/build'
[ 80%] Built target glfw
make -f CMakeFiles/video-app.dir/build.make CMakeFiles/video-app.dir/depend
make[2]: Entering directory '/home/lydhm/video-app/build'
cd /home/lydhm/video-app/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/lydhm/video-app /home/lydhm/video-app /home/lydhm/video-app/build /home/lydhm/video-app/build /home/lydhm/video-app/build/CMakeFiles/video-app.dir/DependInfo.cmake --color=
Dependee "/home/lydhm/video-app/build/CMakeFiles/video-app.dir/DependInfo.cmake" is newer than depender "/home/lydhm/video-app/build/CMakeFiles/video-app.dir/depend.internal".
Dependee "/home/lydhm/video-app/build/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/lydhm/video-app/build/CMakeFiles/video-app.dir/depend.internal".
Scanning dependencies of target video-app
make[2]: Leaving directory '/home/lydhm/video-app/build'
make -f CMakeFiles/video-app.dir/build.make CMakeFiles/video-app.dir/build
make[2]: Entering directory '/home/lydhm/video-app/build'
[ 85%] Building CXX object CMakeFiles/video-app.dir/src/main.cpp.o
/usr/bin/c++ -DGL_SILENCE_DEPRECATION -I/home/lydhm/video-app/lib/glfw/include -std=gnu++14 -o CMakeFiles/video-app.dir/src/main.cpp.o -c /home/lydhm/video-app/src/main.cpp
[ 90%] Building CXX object CMakeFiles/video-app.dir/src/video_reader.cpp.o
/usr/bin/c++ -DGL_SILENCE_DEPRECATION -I/home/lydhm/video-app/lib/glfw/include -std=gnu++14 -o CMakeFiles/video-app.dir/src/video_reader.cpp.o -c /home/lydhm/video-app/src/video_reader.cpp
/home/lydhm/video-app/src/video_reader.cpp: In function ‘bool video_reader_open(VideoReaderState*, const char*)’:
/home/lydhm/video-app/src/video_reader.cpp:49:5: error: ‘AVCodecParameters’ was not declared in this scope
AVCodecParameters* av_codec_params;
^
/home/lydhm/video-app/src/video_reader.cpp:49:24: error: ‘av_codec_params’ was not declared in this scope
AVCodecParameters* av_codec_params;
^
/home/lydhm/video-app/src/video_reader.cpp:52:54: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
av_codec_params = av_format_ctx->streams[i]->codecpar;
^
/home/lydhm/video-app/src/video_reader.cpp:76:68: error: ‘avcodec_parameters_to_context’ was not declared in this scope
if (avcodec_parameters_to_context(av_codec_ctx, av_codec_params) < 0) {
^
/home/lydhm/video-app/src/video_reader.cpp:90:33: error: ‘av_packet_alloc’ was not declared in this scope
av_packet = av_packet_alloc();
^
/home/lydhm/video-app/src/video_reader.cpp: In function ‘bool video_reader_read_frame(VideoReaderState*, uint8_t*, int64_t*)’:
/home/lydhm/video-app/src/video_reader.cpp:119:63: error: ‘avcodec_send_packet’ was not declared in this scope
response = avcodec_send_packet(av_codec_ctx, av_packet);
^
/home/lydhm/video-app/src/video_reader.cpp:125:64: error: ‘avcodec_receive_frame’ was not declared in this scope
response = avcodec_receive_frame(av_codec_ctx, av_frame);
^
/home/lydhm/video-app/src/video_reader.cpp: In function ‘bool video_reader_seek_frame(VideoReaderState*, int64_t)’:
/home/lydhm/video-app/src/video_reader.cpp:180:63: error: ‘avcodec_send_packet’ was not declared in this scope
response = avcodec_send_packet(av_codec_ctx, av_packet);
^
/home/lydhm/video-app/src/video_reader.cpp:186:64: error: ‘avcodec_receive_frame’ was not declared in this scope
response = avcodec_receive_frame(av_codec_ctx, av_frame);
^
/home/lydhm/video-app/src/video_reader.cpp: In function ‘void video_reader_close(VideoReaderState*)’:
/home/lydhm/video-app/src/video_reader.cpp:207:37: error: ‘av_packet_free’ was not declared in this scope
av_packet_free(&state->av_packet);
^
CMakeFiles/video-app.dir/build.make:95: recipe for target 'CMakeFiles/video-app.dir/src/video_reader.cpp.o' failed
make[2]: *** [CMakeFiles/video-app.dir/src/video_reader.cpp.o] Error 1
make[2]: Leaving directory '/home/lydhm/video-app/build'
CMakeFiles/Makefile2:176: recipe for target 'CMakeFiles/video-app.dir/all' failed
make[1]: *** [CMakeFiles/video-app.dir/all] Error 2
make[1]: Leaving directory '/home/lydhm/video-app/build'
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

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

1 participant