I have an app which uses private custom framework made by Qt. The app works on Android 6 and lower and crash on Android 7 N. Seems the issue is quite popular but I still don't understand the cause of the crash. Could you please help?
D/LVLDownloader: All expansion files are already here
W/art: Suspending all threads took: 21.007ms
W/linker: library "libui.so" ("/system/lib/libui.so") needed or dlopened by "/data/app/com.nn.apps.qt/lib/arm/libgbuffer.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Concurrent.so: unused DT entry: type 0xf arg 0xbea
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5AndroidExtras.so: unused DT entry: type 0xf arg 0x5012
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Bluetooth.so: unused DT entry: type 0xf arg 0x5257
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Gui.so: unused DT entry: type 0xf arg 0x4aa94
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Network.so: unused DT entry: type 0xf arg 0x10ca1
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5OpenGL.so: unused DT entry: type 0xf arg 0xbc0b
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Widgets.so: unused DT entry: type 0xf arg 0x69290
W/linker: /data/app/com.nn.apps.qt/lib/arm/libavcodec.so: is missing DT_SONAME will use basename as a replacement: "libavcodec.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libavfilter.so: is missing DT_SONAME will use basename as a replacement: "libavfilter.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libavformat.so: is missing DT_SONAME will use basename as a replacement: "libavformat.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libavutil.so: is missing DT_SONAME will use basename as a replacement: "libavutil.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libswresample.so: is missing DT_SONAME will use basename as a replacement: "libswresample.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libswscale.so: is missing DT_SONAME will use basename as a replacement: "libswscale.so"
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5AndroidExtras.so: unused DT entry: type 0xf arg 0x5012
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Concurrent.so: unused DT entry: type 0xf arg 0xbea
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Widgets.so: unused DT entry: type 0xf arg 0x69290
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Gui.so: unused DT entry: type 0xf arg 0x4aa94
W/linker: /data/app/com.nn.apps.qt/lib/arm/libQt5Gui.so: unused DT entry: type 0xf arg 0x4aa94
D/SPP_ANDROID: ENTERING JNI_OnLoad_libovsdk
D/SPP_ANDROID: ENTERING init_jni_context
D/SPP_ANDROID: ENTERING get_environment
D/SPP_ANDROID: Get context
D/SPP_ANDROID: Environment is OK
D/SPP_ANDROID: EXITING get_environment
D/SPP_ANDROID: Get class
D/SPP_ANDROID: EXITING JNI_OnLoad_libovsdk
W/BaseLogger: ======= Logs are being cached, please initialize the logger (LoggerSingleton::instance().init()) =======
D/NNListenerSingleton: : In prepareFirmwareFileAndGetPath - /storage/emulated/0/Android/data/com.nn.apps.qt/logs
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1334 (apps.qt)
[ 10-04 00:55:12.628 184: 184 W/ ]
debuggerd: handling request: pid=1334 uid=10257 gid=10257 tid=1334
Your app uses private libraries are not accessible anymore. Please read about it here https://developer.android.com/about/versions/nougat/android-7.0-changes.html#ndk
Basically Android will not allow using it's private libraries that are not in NDK. You may not use it them directly but your other libraries or frameworks may and this causes the crash.
Related
I recently created a new project using npx react-native init myapp --template react-native-template-typescript, everything is working in android, but when I try to build for iOS, the build fails due to React-Codegen errors specifically in FBReactNativeSpec.h file. Below is the build error output from xcode:
Whole log:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2206:46: error: 'value' is unavailable: introduced in iOS 12.0
d[#"window"] = window.has_value() ? window.value().buildUnsafeRawValue() : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2208:46: error: 'value' is unavailable: introduced in iOS 12.0
d[#"screen"] = screen.has_value() ? screen.value().buildUnsafeRawValue() : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2210:88: error: 'value' is unavailable: introduced in iOS 12.0
d[#"windowPhysicalPixels"] = windowPhysicalPixels.has_value() ? windowPhysicalPixels.value().buildUnsafeRawValue() : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2212:88: error: 'value' is unavailable: introduced in iOS 12.0
d[#"screenPhysicalPixels"] = screenPhysicalPixels.has_value() ? screenPhysicalPixels.value().buildUnsafeRawValue() : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2223:96: error: 'value' is unavailable: introduced in iOS 12.0
d[#"isIPhoneX_deprecated"] = isIPhoneX_deprecated.has_value() ? #((BOOL)isIPhoneX_deprecated.value()) : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2462:68: error: 'value' is unavailable: introduced in iOS 12.0
d[#"prerelease"] = prerelease.has_value() ? #((double)prerelease.value()) : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2588:110: error: 'value' is unavailable: introduced in iOS 12.0
d[#"DEFAULT_BACKGROUND_COLOR"] = DEFAULT_BACKGROUND_COLOR.has_value() ? #((double)DEFAULT_BACKGROUND_COLOR.value()) : nil;
^
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /Users/macbookair/Desktop/justChat/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
7 errors generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/macbookair/Library/Developer/Xcode/DerivedData/justChat-gvlyyuoxvfahekfvnoiuaatjtplq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/FBReactNativeSpec-generated.o /Users/macbookair/Desktop/justChat/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
What I tried so far:
delete podfile.lock, cd ios && pod install
clean build and then yarn ios
commented !use_flipper() from Podfile then clean build.
My config:
macOS Catalina
version 10.15.7
XCode 12.4
As mentioned in the image, it is related to React-Codegen and it is in newer version of react-native-0.69.1, so can anyone help me fix this issue in ios?
The problem is about IPHONEOS_DEPLOYMENT_TARGET so it should be fixed as mentioned in this link https://github.com/facebook/react-native/issues/34106
In iOS Folder go to Pods/Pods.xcodeproj/xcuserdata/project.pbxproj
Change all the 'IPHONEOS_DEPLOYMENT_TARGET = 11.0' to 'IPHONEOS_DEPLOYMENT_TARGET = 12.4'. save and run.
I installed the relay for my react-native project following the steps on relay.dev. Running the compiler works fine when I have an empty schema file. Putting schema to the file starts throwing me this error:
thread 'main' panicked at 'Expect GraphQLAsts to exist.', /home/runner/work/relay/relay/compiler/crates/relay-compiler/src/compiler.rs:335:14
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
My schema file is
// relay_schema.graphql
type Query {
tasks: [TaskNode]
}
type TaskNode {
id: ID!
}
and my relay config is:
module.exports = {
// ...
// Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`.
src: './src/',
language: 'flow',
schema: './relay_schema.graphql',
exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**'],
};
I'm completely lost on what to do here
Started working after updating src to src: './'. It's better to verify the paths such as src and schema. Error messages shown by the compiler are not much help when stuck here.
I am facing a problem with Config Processing Error on circle-ci "
Config Processing Error
!/bin/sh -eo pipefail
Unable to parse YAML
while parsing a block collection
in 'string', line 22, column 13:
- node_modules
^
expected <block end>, but found '?'
in 'string', line 23, column 13:
key: app-{{ checksum \"package.js ...
-------
Warning: This configuration was auto-generated to show you the message above.
Don't rerun this job. Rerunning will have no effect.
false
Exited with code exit status 1
CircleCI received exit code 1
this is my repo
The causing the error was one row is off.
After fixed
-save_cache:
paths:
- node_modules
key: app-{{ checksum "package.json" }}
Before fixed
-save_cache:
paths:
- node_modules
key: app-{{ checksum "package.json" }}
I think, I may have improperly set up cmake wrong,(or improperly set up cmake for that matter) or I'm bad and rusty at C++ or both and possibly more. I just want to add a header and separate code into a class that loads images for opengl. I also put them in another directory parallel to other libraries in my linux file tree.
The main project folder has the main cmakelists.text file in it it's called "maficengine". Inside it are also a "build" file a "common" file and "external" file and a file called "Mafic", "maficGuiSourceFiles" file and one called "distrib." I think we can just focus on 2. "mafic" and "external". Inside mafic I have one called mafic.cpp which has my main function and is the entry point. Inside external, there is another folder called "myCustomHeaders".. therein lies a file called "loadTexture.cpp" It contains the loadTexture class declaration and definition. Also inside "myCustomHeaders" there is an "include" file which contains "loadTexture.h"... I cannot seem to instanciate an instance of LoadTexture lt; and call the function of loadtexture(); I expect it to at line 187 in mafic.cpp
#cmakelists.text file from main project folder
# CMake entry point
cmake_minimum_required (VERSION 3.0)
project (maficengine )
find_package(OpenGL REQUIRED)
add_library(loaders
external/myCustomHeaders/loadTexture.cpp
external/myCustomHeaders/include/loadTexture.h
)
set(SOURCES external/myCustomHeaders/loadTexture.cpp )
# Compile external dependencies
add_subdirectory (external)
# On Visual 2005 and above, this module can set the debug working directory
cmake_policy(SET CMP0026 OLD)
cmake_policy(SET CMP0079 NEW)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/rpavlik-cmake-modules-fe2273")
include(CreateLaunchers)
include(MSVCMultipleProcessCompile) # /MP
if(INCLUDE_DISTRIB)
add_subdirectory(distrib)
endif(INCLUDE_DISTRIB)
include_directories(
external/AntTweakBar-1.16/include/
external/glfw-3.1.2/include/
external/glm-0.9.7.1/
external/glew-1.13.0/include/
external/assimp-3.0.1270/include/
external/bullet-2.81-rev2613/src/
external/myCustomHeaders/include
common/
)
set(ALL_LIBS
${OPENGL_LIBRARY}
glfw
GLEW_1130
loaders
)
add_definitions(
-DTW_STATIC
-DTW_NO_LIB_PRAGMA
-DTW_NO_DIRECT3D
-DGLEW_STATIC
-D_CRT_SECURE_NO_WARNINGS
)
# Tutorial 17
add_executable(mageengine
Mafic/mafic.cpp
common/shader.cpp
common/shader.hpp
common/controls.cpp
common/controls.hpp
common/texture.cpp
common/texture.hpp
common/objloader.cpp
common/objloader.hpp
common/vboindexer.cpp
common/vboindexer.hpp
common/quaternion_utils.cpp
common/quaternion_utils.hpp
#Mafic/loadTexture.h
#Mafic/loadTexture.cpp
Mafic/StandardShading.vertexshader
Mafic/StandardShading.fragmentshader
)
target_link_libraries(mageengine
${ALL_LIBS}
ANTTWEAKBAR_116_OGLCORE_GLFW
loaders
)
here's mafic.cpp
#include <loadTexture.h>
int main( void )
{
loadTexture lt;
lt.loadtexture();
}
here's my loadTexture.cpp
class loadTexture
{
public:
loadTexture();
~loadTexture();
void loadtexture(){
fprintf(stdout, "loadtexture does something, that's a positive result for this test");
}
};
and finally my loadTexture.h
[code]
#pragma once
#include <GL/glew.h>
//GLuint image;
void loadtexture();
[/code]
Hoping it would build with no errors but I get ...
aaron#Zog:~/Desktop/maficengine/build$ make
[ 2%] Built target ANTTWEAKBAR_116_OGLCORE_GLFW
[ 2%] Built target GLEW_1130
[ 2%] Built target loaders
[ 6%] Built target glfw
[ 7%] Building CXX object CMakeFiles/mageengine.dir/Mafic/mafic.cpp.o
/home/aaron/Desktop/maficengine/Mafic/mafic.cpp:1:9: warning: #pragma once in main file
#pragma once
^~~~
/home/aaron/Desktop/maficengine/Mafic/mafic.cpp: In function ‘int main()’:
/home/aaron/Desktop/maficengine/Mafic/mafic.cpp:187:1: error: ‘loadTexture’ was not declared in this scope
loadTexture lt;
^~~~~~~~~~~
/home/aaron/Desktop/maficengine/Mafic/mafic.cpp:187:1: note: suggested alternative: ‘loadtexture’
loadTexture lt;
^~~~~~~~~~~
loadtexture
/home/aaron/Desktop/maficengine/Mafic/mafic.cpp:189:2: error: ‘lt’ was not declared in this scope
lt.loadtexture();
^~
CMakeFiles/mageengine.dir/build.make:62: recipe for target 'CMakeFiles/mageengine.dir/Mafic/mafic.cpp.o' failed
make[2]: *** [CMakeFiles/mageengine.dir/Mafic/mafic.cpp.o] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/mageengine.dir/all' failed
make[1]: *** [CMakeFiles/mageengine.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
aaron#Zog:~/Desktop/maficengine/build$
The module can be find Here
I think maybe some dependencies errors occured,anyone who has an idea will be great~
What I find important is
lib/CMakeFiles/gnuradio-mediatools.dir/build.make:86: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o' failed
The whole list as follow:
imatrix#Zero:~/下载/GNU/ 模块/gr-mediatools-master/build$ make -j4
Scanning dependencies of target mediatools_swig_swig_doc
Scanning dependencies of target pygen_python_aead6
Scanning dependencies of target pygen_apps_9a6dd
Scanning dependencies of target gnuradio-mediatools
[ 0%] Built target mediatools_swig_swig_doc
[ 5%] Generating __init__.pyc
[ 5%] Built target pygen_apps_9a6dd
Scanning dependencies of target _mediatools_swig_swig_tag
[ 11%] Generating __init__.pyo
[ 17%] Building CXX object swig/CMakeFiles/_mediatools_swig_swig_tag.dir/_mediatools_swig_swig_tag.cpp.o
[ 23%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_s.cc.o
[ 29%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o
[ 35%] Linking CXX executable _mediatools_swig_swig_tag
[ 35%] Built target pygen_python_aead6
[ 35%] Built target _mediatools_swig_swig_tag
[ 41%] Generating mediatools_swig.tag
Scanning dependencies of target mediatools_swig_swig_2d0df
[ 47%] Building CXX object swig/CMakeFiles/mediatools_swig_swig_2d0df.dir/mediatools_swig_swig_2d0df.cpp.o
[ 52%] Linking CXX executable mediatools_swig_swig_2d0df
Swig source
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘bool mediatools_audiosource_impl::open(std::__cxx11::string)’:
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘void mediatools_audiosource_impl::readData(std::vector<short int>&)’:
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:91:39: error: ‘avcodec_alloc_frame’ was not declared in this scope
d_frame = avcodec_alloc_frame();
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:79: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
lib/CMakeFiles/gnuradio-mediatools.dir/build.make:86: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o] Error 1
make[2]: *** 正在等待未完成的任务....
[ 52%] Built target mediatools_swig_swig_2d0df
Scanning dependencies of target pygen_swig_d4ca7
[ 64%] Generating mediatools_swig.pyc
[ 64%] Generating mediatools_swig.pyo
[ 70%] Built target pygen_swig_d4ca7
CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Your error stems from here:
gr-mediatools-master/lib/mediatools_audiosource_impl.cc:91:39: error: ‘avcodec_alloc_frame’ was not declared in this scope
d_frame = avcodec_alloc_frame();
That's because avcodec_alloc_frame has been deprecated in recent versions of ffmpeg. The gr-mediatools repository is quite old now.
Replacing avcodec_alloc_frame with av_frame_alloc in lib/mediatools_audiosource_impl.cc on line 91 might just do the trick.