Audio Policies error during Pixel Experience compilation - android-source

During the compilation of Pixel Experience (I use brunch, but the same error is occurred if I use lunch) I get an unusual error, something that has to do with Audio Polices.
I have tried reinstalling Ubuntu (I'm using 18.04.3) and doing everything from scratch, but the error remains.
The device tree should be fine, since I have compiled the same ROM before with the same device tree, kernel and vendor.
kirk#kirk-dev:~/android/system$ brunch aosp_clover-userdebug
including vendor/aosp/vendorsetup.sh
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
CUSTOM_VERSION=PixelExperience_clover-9.0-20190812-0627-UNOFFICIAL
TARGET_PRODUCT=aosp_clover
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=kryo
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.0-23-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190705.003
OUT_DIR=/home/kirk/android/system/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
CUSTOM_VERSION=PixelExperience_clover-9.0-20190812-0627-UNOFFICIAL
TARGET_PRODUCT=aosp_clover
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=kryo
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.0-23-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190705.003
OUT_DIR=/home/kirk/android/system/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998 hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998
============================================
ninja: no work to do.
ninja: no work to do.
Environment variable PATH was modified (/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin => /home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/home/kirk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin), regenerating...
Environment variable PATH was modified (/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin => /home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/home/kirk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin), regenerating...
[539/961] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:88: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS.
[961/961] including vendor/xiaomi/sdm660-common/Android.mk ...
build/make/core/Makefile:28: warning: overriding commands for target `/home/kirk/android/system/out/target/product/clover/vendor/lib64/hw/fingerprint.default.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/kirk/android/system/out/target/product/clover/vendor/lib64/hw/fingerprint.default.so'
[ 0% 290/84433] target thumb C++: libaudiopolicymanager_32 <= vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp
FAILED: /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++ -I frameworks/av/services -I frameworks/av/services/audioflinger -I system/media/audio_effects/include -I system/media/audio_utils/include -I frameworks/av/services/audiopolicy/common/include -I frameworks/av/services/audiopolicy/engine/interface -I frameworks/av/services/audiopolicy -I frameworks/av/services/audiopolicy/common/managerdefinitions/include -I vendor/qcom/opensource/audio/policy_hal -I /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I /home/kirk/android/system/out/target/product/clover/gen/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I libnativehelper/include_jni \$(cat /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden -std=gnu++14 -mthumb -Os -fno-rtti -Wall -Werror -DPCM_OFFLOAD_ENABLED -DPCM_OFFLOAD_ENABLED_24 -DAUDIO_EXTN_FORMATS_ENABLED -DAAC_ADTS_OFFLOAD_ENABLED -DAUDIO_EXTN_HDMI_SPK_ENABLED -DAUDIO_EXTN_AFE_PROXY_ENABLED -DUSE_XML_AUDIO_POLICY_CONF -DCOMPRESS_VOIP_ENABLED -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.d -o /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp"
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:65: error: member reference type 'android::AudioMix *' is a pointer; did you mean to use '->'?
sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
~~~~~~~~~~~~~~~~~~~~~^
->
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:66: error: no member named 'promote' in 'android::AudioMix'
sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
~~~~~~~~~~~~~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2243:37: error: no member named 'mCbFlags' in 'android::AudioPolicyMix'
&& ((policyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0)) {
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2244:77: error: no member named 'mDeviceAddress' in 'android::AudioPolicyMix'
mpClientInterface->onDynamicPolicyMixStateUpdate(policyMix->mDeviceAddress,
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2265:39: error: no member named 'mMixType' in 'android::AudioPolicyMix'
} else if (policyMix->mMixType == MIX_TYPE_PLAYERS) {
~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2266:42: error: no member named 'mDeviceAddress' in 'android::AudioPolicyMix'
address = policyMix->mDeviceAddress;
~~~~~~~~~ ^
6 errors generated.
[ 0% 299/84433] target C++: netutils-wrapper-1.0 <= system/netd/netutils_wrappers/NetUtilsWrapper-1.0.cpp
ninja: build stopped: subcommand failed.
09:31:14 ninja failed with: exit status 1
#### failed to build some targets (03:41 (mm:ss)) ####

I had the same error yesterday.
And I reverted the codes from here.
By now I haven't faced any issue.
Simply change every "policyMix" to "inputDesc->mPolicyMix" in AudioPolicyManager.cpp file.
[UPDATE]
PE just updated their code, resync the repo might help.

Related

finished with non-zero exit value 4

An error occurred while building the apk, how can I fix it?
Error: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ #"C:\Users\Administrator\AppData\Local\Temp\tmpAABC.tmp" -o "E:\testArabic\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\linkresult_D469FBEED00B862A759E3E8D5369FD17\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction "E:\testArabic\unityLibrary\src\main\jniStaticLibs\armeabi-v7a\baselib.a" -llog -rdynamic -fuse-ld=gold.exe
clang++: error: invalid linker name in argument '-fuse-ld=gold.exe'
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet1 objectFiles, CppToolChainContext toolChainContext) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
Unity.IL2CPP.Building.BuilderFailedException: C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ #"C:\Users\Administrator\AppData\Local\Temp\tmpAABC.tmp" -o "E:\testArabic\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\linkresult_D469FBEED00B862A759E3E8D5369FD17\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction "E:\testArabic\unityLibrary\src\main\jniStaticLibs\armeabi-v7a\baselib.a" -llog -rdynamic -fuse-ld=gold.exe
Task :unityLibrary:BuildIl2CppTask FAILED

Tesseract problem on installation during make

I am trying to install tesseract-ocr on Debian 9 with gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516.
I run with the below order, according to this https://github.com/tesseract-ocr/tessdoc/blob/master/Compiling-%E2%80%93-GitInstallation.md
./autogen.sh
./configure
make
Now when I run make I get the following error:
root#genius1062:/usr/local/tesseract# make
Making all in .
make[1]: Entering directory '/usr/local/tesseract'
CXX src/api/libtesseract_la-baseapi.lo
In file included from ./src/ccutil/elst.h:24:0,
from ./src/ccstruct/points.h:22,
from ./src/ccstruct/rect.h:22,
from ./src/ccstruct/boxword.h:22,
from src/api/baseapi.cpp:26:
./src/ccutil/serialis.h: In member function ‘bool tesseract::TFile::DeSerialize(std::vector&)’:
./src/ccutil/serialis.h:107:17: error: expected primary-expression before ‘constexpr’
} else if ( constexpr (std::is_same_v<T, std::string>)) {
^~~~~~~~~
./src/ccutil/serialis.h:107:17: error: expected ‘)’ before ‘constexpr’
./src/ccutil/serialis.h:116:15: error: expected ‘(’ before ‘constexpr’
} else if constexpr (std::is_class_v) {
^~~~~~~~~
./src/ccutil/serialis.h:151:3: error: expected ‘}’ at end of input
}
^
./src/ccutil/serialis.h: In member function ‘bool tesseract::TFile::Serialize(const std::vector&)’:
./src/ccutil/serialis.h:166:15: error: expected ‘(’ before ‘constexpr’
} else if constexpr (std::is_same_v<T, std::string>) {
^~~~~~~~~
./src/ccutil/serialis.h:198:3: error: expected ‘}’ at end of input
}
^
In file included from ./src/ccutil/genericvector.h:22:0,
from ./src/ccstruct/fontinfo.h:25,
from ./src/ccstruct/ratngs.h:29,
from ./src/dict/dawg.h:33,
from ./src/dict/dawg_cache.h:23,
from src/api/baseapi.cpp:28:
./src/ccutil/helpers.h: In function ‘bool tesseract::Serialize(FILE*, const std::vector&)’:
./src/ccutil/helpers.h:252:13: error: expected ‘(’ before ‘constexpr’
} else if constexpr (std::is_class_v) {
^~~~~~~~~
src/api/baseapi.cpp:2380:1: error: expected ‘}’ at end of input
} // namespace tesseract
^
src/api/baseapi.cpp: At global scope:
src/api/baseapi.cpp:2380:1: error: expected ‘}’ at end of input
Makefile:4696: recipe for target 'src/api/libtesseract_la-baseapi.lo' failed
make[1]: *** [src/api/libtesseract_la-baseapi.lo] Error 1
make[1]: Leaving directory '/usr/local/tesseract'
Makefile:7801: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I have tried the popst instatllation iinstruction that id supposed to solve this issue but no luck
make all-recursive
Making all in ccstruct
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -
I.. -I../ccutil -I../cutil -I../image -I../viewer -I/opt/local/
include -I/usr/local/include/leptonica -g -O2 -MT blobbox.lo -MD -MP -
MF .deps/blobbox.Tpo -c -o blobbox.lo blobbox.cpp
mv -f .deps/blobbox.Tpo .deps/blobbox.Plo
mv: rename .deps/blobbox.Tpo to .deps/blobbox.Plo: No such file or
directory
make[3]: *** [blobbox.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2`enter code here`
Any help is appreciated.
Upgrade your compiler - current tesseract needs a modern compiler supporting c++17.

This happened while following the gstreamer plugin example

First I downloaded git via git clone https://gitlab.freedesktop.org/gstreamer/gst-template.git command
And shell $ cd gst-template/gst-plugin/src
Completed entering the shell $ ../tools/make_element MyFilter command
And I did meson build in /gst-template, then ninja -C build, so the log came out as below.
ninja: Entering directory `build/'
[1/4] Compiling C object gst-plugin/libgstplugin.so.p/src_gstplugin.c.o
FAILED: gst-plugin/libgstplugin.so.p/src_gstplugin.c.o
cc -Igst-plugin/libgstplugin.so.p -Igst-plugin -I../gst-plugin -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include - fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -pthread -DHAVE_CONFIG_H -MD -MQ gst- plugin/libgstplugin.so.p/src_gstplugin.c.o -MF gst-plugin/libgstplugin.so.p/src_gstplugin.c.o.d -o gst-plugin/libgstplugin.so.p/src_gstplugin.c.o -c ../gst- plugin/src/gstplugin.c
../gst-plugin/src/gstplugin.c:102:45: error: expected ‘)’ before string constant
GST_ELEMENT_REGISTER_DEFINE (myfirstplugin, "myfirstplugin", GST_RANK_NONE,
^~~~~~~~~~
../gst-plugin/src/gstplugin.c: In function ‘plugin_init’:
../gst-plugin/src/gstplugin.c:266:10: warning: implicit declaration of function ‘GST_ELEMENT_REGISTER’; did you mean ‘GST_ELEMENT_CAST’? [-Wimplicit- function-declaration]
return GST_ELEMENT_REGISTER (myfirstplugin, plugin);
^~~~~~~~~
GST_ELEMENT_CAST
../gst-plugin/src/gstplugin.c:266:32: error: ‘myfirstplugin’ undeclared (first use in this function); did you mean ‘GstPlugin’?
return GST_ELEMENT_REGISTER (myfirstplugin, plugin);
^~~~~~~~~~~~~
GstPlugin
../gst-plugin/src/gstplugin.c:266:32: note: each undeclared identifier is reported only once for each function it appears in
../gst-plugin/src/gstplugin.c:267:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
[2/4] Compiling C object gst-plugin/libgstaudiofilterexample.so.p/src_gstaudiofilter.c.o
FAILED: gst-plugin/libgstaudiofilterexample.so.p/src_gstaudiofilter.c.o
cc -Igst-plugin/libgstaudiofilterexample.so.p -Igst-plugin -I../gst-plugin -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib- 2.0/include -I/usr/include/orc-0.4 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -pthread -DHAVE_CONFIG_H -MD -MQ gst-plugin/libgstaudiofilterexample.so.p/src_gstaudiofilter.c.o -MF gst-plugin/libgstaudiofilterexample.so.p/src_gstaudiofilter.c.o.d -o gst- plugin/libgstaudiofilterexample.so.p/src_gstaudiofilter.c.o -c ../gst-plugin/src/gstaudiofilter.c
../gst-plugin/src/gstaudiofilter.c:99:51: error: expected ‘)’ before string constant
GST_ELEMENT_REGISTER_DEFINE (audiofiltertemplate, "audiofiltertemplate",
^~~~~~~~~~~~~~
../gst-plugin/src/gstaudiofilter.c: In function ‘plugin_init’:
../gst-plugin/src/gstaudiofilter.c:311:10: warning: implicit declaration of function ‘GST_ELEMENT_REGISTER’; did you mean ‘GST_ELEMENT_CAST’? [-Wimplicit- function-declaration]
return GST_ELEMENT_REGISTER (audiofiltertemplate, plugin);
^~~~~~~~~
GST_ELEMENT_CAST
../gst-plugin/src/gstaudiofilter.c:311:32: error: ‘audiofiltertemplate’ undeclared (first use in this function); did you mean ‘GstAudioFilterTemplate’?
return GST_ELEMENT_REGISTER (audiofiltertemplate, plugin);
^~~~~~~~~~~~
GstAudioFilterTemplate
../gst-plugin/src/gstaudiofilter.c:311:32: note: each undeclared identifier is reported only once for each function it appears in
../gst-plugin/src/gstaudiofilter.c:312:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
ninja: build stopped: subcommand failed.
The installed gstreamer version doesn't match to the cloned version from the git repository.
Use gst-launch-1.0 --version to determine which version you have installed.
You need at least 1.18 to use the gst-plugin example.

ntox86-ld: cannot find -lminiupnpc

I am trying to build a pjsip based project for blackberry 10,
but I get errors when compiling:
../src/navigator.cpp:63:6: warning: unused parameter 'type' [-Wunused-parameter]
/opt/bbndk/host_10_1_0_132/linux/x86/usr/bin/ntox86-ld: skipping incompatible /root/blackberry/fiume/lib/upnp/libminiupnpc.a when searching for -lminiupnpc
qcc -Vgcc_ntox86 -lang-c++ -Wl,-rpath-link,/opt/bbndk/target_10_1_0_1020/qnx6/x86/lib -Wl,-rpath-link,/opt/bbndk/target_10_1_0_1020/qnx6/x86/usr/lib -Wl,-rpath-link,/opt/bbndk/target_10_1_0_1020/qnx6/x86/usr/lib/qt4/lib -o o-g/fiume o-g/.obj/AddressBook.o o-g/.obj/AudioManager.o o-g/.obj/BpsPlatform.o o-g/.obj/ContactEditor.o o-g/.obj/ContactViewer.o o-g/.obj/Fiume.o o-g/.obj/PjCallback.o o-g/.obj/buddy.o o-g/.obj/callhistory.o o-g/.obj/callhistoryrecord.o o-g/.obj/debugger.o o-g/.obj/kuzaranda.o o-g/.obj/main.o o-g/.obj/navigator.o o-g/.obj/moc_AddressBook.o o-g/.obj/moc_AudioManager.o o-g/.obj/moc_BpsPlatform.o o-g/.obj/moc_ContactEditor.o o-g/.obj/moc_ContactViewer.o o-g/.obj/moc_Fiume.o o-g/.obj/moc_PjCallback.o o-g/.obj/moc_buddy.o o-g/.obj/moc_callhistory.o o-g/.obj/moc_callhistoryrecord.o o-g/.obj/moc_debugger.o o-g/.obj/moc_kuzaranda.o o-g/.obj/moc_navigator.o -L/opt/bbndk/target_10_1_0_1020/qnx6/x86/lib -L/opt/bbndk/target_10_1_0_1020/qnx6/x86/usr/lib -L/opt/bbndk/target_10_1_0_1020/qnx6/x86/usr/lib/qt4/lib -L/opt/bbndk/target_10_1_0_1020/qnx6//usr/lib/qt4/lib -L/root/blackberry/fiume/lib -L/root/blackberry/fiume/lib/upnp -lpjsua-i486-pc-nto-qnx8.0.0 -lpjsip-ua-i486-pc-nto-qnx8.0.0 -lpjsip-simple-i486-pc-nto-qnx8.0.0 -lpjsip-i486-pc-nto-qnx8.0.0 -lpjmedia-codec-i486-pc-nto-qnx8.0.0 -lpjmedia-videodev-i486-pc-nto-qnx8.0.0 -lpjmedia-i486-pc-nto-qnx8.0.0 -lpjmedia-audiodev-i486-pc-nto-qnx8.0.0 -lspeex-i486-pc-nto-qnx8.0.0 -lopencore-amrnb -lgsmcodec-i486-pc-nto-qnx8.0.0 -lilbccodec-i486-pc-nto-qnx8.0.0 -lg7221codec-i486-pc-nto-qnx8.0.0 -lpjnath-i486-pc-nto-qnx8.0.0 -lpjlib-util-i486-pc-nto-qnx8.0.0 -lresample-i486-pc-nto-qnx8.0.0 -lmilenage-i486-pc-nto-qnx8.0.0 -lsrtp-i486-pc-nto-qnx8.0.0 -lportaudio-i486-pc-nto-qnx8.0.0 -lpj-i486-pc-nto-qnx8.0.0 -lpjsdp-i486-pc-nto-qnx8.0.0 -lasound -lcrypto -lssl -lminiupnpc -lbbpim -laudio_manager -lbb -lbbsystem -lbbplatform -lscreen -L/opt/bbndk/target_10_1_0_1020/qnx6/usr/share/qt4/lib -lQtSensors -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
make[2]: Leaving directory `/root/blackberry/fiume/x86'
make[1]: Leaving directory `/root/blackberry/fiume/x86'
/opt/bbndk/host_10_1_0_132/linux/x86/usr/bin/ntox86-ld: cannot find -lminiupnpc
cc: /opt/bbndk/host_10_1_0_132/linux/x86/usr/bin/ntox86-ld error 1
make[2]: *** [o-g/fiume] Error 1
make[1]: *** [debug] Error 2
make: *** [Simulator-Debug] Error 2``
**** Build Finished ****`
Why is libminiupnpc.a considered "incompatible", and what can I do about it?
It's probably that libminiupnpc.a was compiled for the ARM architecture, rather than the one you want (x86). Try recompiling it using qcc -Vgcc_ntox86

Compiling OpenCV source code to Matlab

I am trying to compile a C++ code in Matlab. The source code uses the OpenCV library.
when I write:
mex myfile.cpp
I get the following Error:
fatal error C1083: Cannot open include file: 'opencv2/opencv.hpp' No such file or directory
I am using Matlab r2012b and have Visual c++ 2010 express on windows 7.
Is there please any solution for this?
Thank you.
Edit: I did the following but get another error:
mex -v -largeArrayDims Calib.cpp -I"C:\opencv\build\include" ...
-L"C:\opencv\build\x86\vc10\lib" -lopencv_calib3d240d -lopencv_core240d ...
-lopencv_highgui240d -lopencv_imgproc240d -llibCam
-> Default options filename found in C:\Users\Ali\AppData\Roaming\MathWorks\MATLAB\R2012b
----------------------------------------------------------------
-> Options file = C:\Users\Ali\AppData\Roaming\MathWorks\MATLAB\R2012b\mexopts.bat
MATLAB = C:\Programmes\MATLAB\R2012b
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD
OPTIMFLAGS = /O2 /Oy- /DNDEBUG
DEBUGFLAGS = /Z7
arguments = -IC:\opencv\build\include
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:mexFunction /LIBPATH:"C:\Programmes\MATLAB\R2012b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\templib.x" /MAP:"Calib.mexw32.map"
LINKDEBUGFLAGS = /debug /PDB:"Calib.mexw32.pdb"
LINKFLAGSPOST =
Name directive = /out:"Calib.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = #
-> Resource Compiler = rc /fo "mexversion.res"
-> Resource Linker =
----------------------------------------------------------------
--> cl -IC:\opencv\build\include /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\Calib.obj -IC:\Programmes\MATLAB\R2012b\extern\include -IC:\Programmes\MATLAB\R2012b\simulink\include /O2 /Oy- /DNDEBUG Calib.cpp
Calib.cpp
Contents of C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\mex_tmp.rsp:
C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\Calib.obj
--> link /out:"Calib.mexw32" /dll /export:mexFunction /LIBPATH:"C:\Programmes\MATLAB\R2012b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\templib.x" /MAP:"Calib.mexw32.map" #C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\mex_tmp.rsp C:\opencv\build\x86\vc10\lib\libCam.lib
C:\opencv\build\x86\vc10\lib\opencv_calib3d240d.lib C:\opencv\build\x86\vc10\lib\opencv_core240d.lib C:\opencv\build\x86\vc10\lib\opencv_highgui240d.lib C:\opencv\build\x86\vc10\lib\opencv_imgproc240d.lib
LINK : error LNK2001: symbole externe non résolu mexFunction
C:\Users\Ali\AppData\Local\Temp\mex_LVNr2V\templib.x : fatal error LNK1120: 1 externes non résolus
C:\PROGRA~3\MATLAB\R2012B\BIN\MEX.PL: Error: Link of 'Calib.mexw32' failed.
Error using mex (line 206)
Unable to complete successfully.
You should add include flags and linking libraries to the command line. That is,
mex myfile.cpp -I header_path -l opencv_libraries
Please try:
mex -largeArrayDims Calib.cpp -IC:\opencv\build\include -LC:\opencv\build\x86\vc10\lib...
-l opencv_calib3d240d -l opencv_core240d -l opencv_highgui240d -l opencv_imgproc240d
BTW, is there a special reason why you link with the opencv_< >d.lib rather than opencv_< >.lib files?