Make fails to build FreeImage - when building OpenCascade - cmake

I have succesfully used CMake. Then i use MSYS2, to traverse inside the BUILD directory and i type make.
The build goes well but when it scans dependencies for FreeImage - then it fails.
This is the compiler i have:
User1#User1-PC MSYS ~
$ gcc --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And now the warning - errors. I have a different code block for all the different objects that make has complains. The final one will also contain the error message.
OBJECT 1:
[ 1%] Building CXX object oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/__/libs/FreeImage/Source/FreeImage/MultiPage.cpp.obj
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp: In function 'FIMULTIBITMAP* FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT, const char*, BOOL, BOOL, BOOL, int)':
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:254:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<FreeImageIO> io (new FreeImageIO);
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:265:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<FIMULTIBITMAP> bitmap (new FIMULTIBITMAP);
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:266:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<MULTIBITMAPHEADER> header (new MULTIBITMAPHEADER);
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:299:11: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<CacheFile> cache_file (new CacheFile(cache_name, keep_cache_in_memory));
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp: In function 'FIMULTIBITMAP* FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT, FreeImageIO*, fi_handle, int)':
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:339:11: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<FIMULTIBITMAP> bitmap (new FIMULTIBITMAP);
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:340:11: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<MULTIBITMAPHEADER> header (new MULTIBITMAPHEADER);
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:341:11: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<FreeImageIO> tmp_io (new FreeImageIO (*io));
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:367:12: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<CacheFile> cache_file (new CacheFile("", TRUE));
^~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:80,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:53,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/CacheFile.h:28,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/MultiPage.cpp:33:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/unique_ptr.h:53:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
OBJECT2:
[ 1%] Building CXX object oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/__/libs/FreeImage/Source/FreeImage/Plugin.cpp.obj
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/Plugin.cpp: In function 'void FreeImage_Initialise(BOOL)':
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/Plugin.cpp:314:15: warning: 'char* strncat(char*, const char*, size_t)' specified bound 460 equals destination size [-Wstringop-overflow=]
strncat(buffer, find_data.name, MAX_PATH + 200);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OBJECT 3:
[ 1%] Building CXX object oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/__/libs/FreeImage/Source/FreeImage/PluginEXR.cpp.obj
In file included from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h:51,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h:46,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/PluginEXR.cpp:33:
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:228:34: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:232:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:440:34: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
const Vec3 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:444:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:622:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
const Vec4 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:626:44: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:714:30: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:723:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:738:28: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:747:35: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:762:30: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:771:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:786:28: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:795:35: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:809:30: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:818:37: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:833:28: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:842:35: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:1212:26: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<T>::normalizeExc () throw (IEX_NAMESPACE::MathExc)
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:1249:33: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec2<T>::normalizedExc () const throw (IEX_NAMESPACE::MathExc)
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:1704:26: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<T>::normalizeExc () throw (IEX_NAMESPACE::MathExc)
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:1743:33: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec3<T>::normalizedExc () const throw (IEX_NAMESPACE::MathExc)
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:2109:26: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<T>::normalizeExc () throw (IEX_NAMESPACE::MathExc)
^~~~~
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/OpenEXR/Imath/ImathVec.h:2150:33: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
Vec4<T>::normalizedExc () const throw (IEX_NAMESPACE::MathExc)
^~~~~
FINAL OBJECT AND ERROR FROM MAKE:
[ 1%] Building CXX object oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/__/libs/FreeImage/Source/FreeImage/PluginG3.cpp.obj
In file included from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/LibTIFF4/tiffio.h:258,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/LibTIFF4/tiffiop.h:60,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/PluginG3.cpp:23:
C:/mingw-w64-10.2/mingw64/x86_64-w64-mingw32/include/stdio.h:735:23: error: conflicting declaration of 'int _snprintf(char*, size_t, const char*, ...)' with 'C' linkage
_CRTIMP int __cdecl _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^~~~~~~~~
In file included from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/LibTIFF4/tiffiop.h:33,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/PluginG3.cpp:23:
C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/LibTIFF4/tif_config.h:84:18: note: previous declaration with 'C++' linkage
#define snprintf _snprintf
^~~~~~~~~
In file included from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/string_conversions.h:43,
from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/basic_string.h:6361,
from C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:52,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/Utilities.h:44,
from C:/Users/User1/Desktop/OPENCAS/oce/oce-win-bundle/libs/FreeImage/Source/FreeImage/PluginG3.cpp:26:
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cstdio:175:11: error: '::snprintf' has not been declared
using ::snprintf;
^~~~~~~~
C:/mingw-w64-10.2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cstdio:185:22: error: '__gnu_cxx::snprintf' has not been declared
using ::__gnu_cxx::snprintf;
^~~~~~~~
make[2]: *** [oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/build.make:1021: oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/__/libs/FreeImage/Source/FreeImage/PluginG3.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2621: oce-win-bundle/FreeImage.cmake/CMakeFiles/FreeImage.dir/all] Error 2
make: *** [Makefile:182: all] Error 2

Related

react native ios 0.69.1 React-Codegen Build failed

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.

Error while installing react-native-queue library

I'm installing the react native queue library like so:
npm install --save react-native-queue. But I'm getting the following error:
TOUCH Release/obj.target/OpenSSL.stamp
ACTION binding_gyp_vendored_realm_target_download_realm /Users/prikshetsharma/Desktop/Humboi/node_modules/realm/vendor/realm-mac-x64
Resolved requirements: {
SYNC_SERVER_FOLDER: 'sync',
SYNC_ARCHIVE: 'realm-sync-node-cocoa-4.7.3.tar.gz',
SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-4.7.3'
}
No lockfile found at the target, proceeding.
Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz
Downloading realm-sync-node-cocoa-4.7.3.tar.gz [====================] (1886k)
Extracting realm-sync-node-cocoa-4.7.3.tar.gz => /Users/prikshetsharma/Desktop/Humboi/node_modules/realm/vendor/realm-mac-x64
Success
TOUCH Release/obj.target/vendored-realm.stamp
TOUCH Release/obj.target/realm-core.stamp
TOUCH Release/obj.target/realm-sync.stamp
CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o
CXX(target) Release/obj.target/object-store/src/object-store/src/collection_notifications.o
CXX(target) Release/obj.target/object-store/src/object-store/src/index_set.o
CXX(target) Release/obj.target/object-store/src/object-store/src/list.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object_schema.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object_store.o
CXX(target) Release/obj.target/object-store/src/object-store/src/placeholder.o
CXX(target) Release/obj.target/object-store/src/object-store/src/results.o
CXX(target) Release/obj.target/object-store/src/object-store/src/schema.o
CXX(target) Release/obj.target/object-store/src/object-store/src/shared_realm.o
CXX(target) Release/obj.target/object-store/src/object-store/src/thread_safe_reference.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_change_builder.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/list_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/object_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/primitive_list_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/realm_coordinator.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/results_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/transact_log_handler.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/weak_realm_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/util/uuid.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/external_commit_helper.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/keychain_helper.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/network_reachability_observer.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/system_configuration.o
CXX(target) Release/obj.target/object-store/src/object-store/src/util/fifo.o
CXX(target) Release/obj.target/object-store/src/object-store/src/server/adapter.o
CXX(target) Release/obj.target/object-store/src/object-store/src/server/admin_realm.o
CXX(target) Release/obj.target/object-store/src/object-store/src/server/global_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_file.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_metadata.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/work_queue.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/partial_sync.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/async_open_task.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_config.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_manager.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_session.o
../src/object-store/src/sync/sync_session.cpp:567:17: warning: enumeration value
'http_tunnel_failed' not handled in switch [-Wswitch]
switch (static_cast<ClientError>(error_code.value())) {
^
../src/object-store/src/sync/sync_session.cpp:567:17: note: add missing switch
cases
switch (static_cast<ClientError>(error_code.value())) {
^
1 warning generated.
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_user.o
LIBTOOL-STATIC Release/object-store.a
CXX(target) Release/obj.target/realm/src/js_realm.o
CXX(target) Release/obj.target/realm/src/node/node_init.o
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:21:
In file included from ../src/node/node_string.hpp:21:
../src/node/node_types.hpp:52:42: error: no type named
'NamedPropertyGetterCallback' in namespace 'v8'; did you mean
'IndexPropertyGetterCallback'?
using StringPropertyGetterCallback = v8::NamedPropertyGetterCallback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexPropertyGetterCallback
../src/node/node_types.hpp:50:11: note: 'IndexPropertyGetterCallback' declared
here
using IndexPropertyGetterCallback = Nan::IndexGetterCallback;
^
../src/node/node_types.hpp:53:42: error: no type named
'NamedPropertySetterCallback' in namespace 'v8'; did you mean
'IndexPropertySetterCallback'?
using StringPropertySetterCallback = v8::NamedPropertySetterCallback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexPropertySetterCallback
../src/node/node_types.hpp:51:11: note: 'IndexPropertySetterCallback' declared
here
using IndexPropertySetterCallback = Nan::IndexSetterCallback;
^
../src/node/node_types.hpp:54:50: error: no type named
'NamedPropertyEnumeratorCallback' in namespace 'v8'; did you mean
'IndexedPropertyEnumeratorCallback'?
using StringPropertyEnumeratorCallback = v8::NamedPropertyEnumeratorCallback;
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexedPropertyEnumeratorCallback
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:6317:16: note:
'IndexedPropertyEnumeratorCallback' declared here
typedef void (*IndexedPropertyEnumeratorCallback)(
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:21:
../src/node/node_string.hpp:51:32: error: too few arguments to function call,
single argument 'isolate' was not specified
m_str.resize(s->Utf8Length());
~~~~~~~~~~~~~ ^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:2977:3: note:
'Utf8Length' declared here
int Utf8Length(Isolate* isolate) const;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:21:
../src/node/node_string.hpp:53:18: error: cannot initialize a parameter of type
'v8::Isolate *' with an rvalue of type 'std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *'
(aka 'char *')
s->WriteUtf8(&m_str[0], m_str.size(), 0, flags);
^~~~~~~~~
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:3037:26: note:
passing argument to parameter 'isolate' here
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:33:57: error: no type named
'ExternalOneByteStringResourceImpl' in namespace 'v8'; did you mean
'Nan::ExternalOneByteStringResource'?
...new v8::ExternalOneByteStringResourceImpl(key.data(), key.size()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nan::ExternalOneByteStringResource
../../nan/nan.h:193:5: note: 'Nan::ExternalOneByteStringResource' declared here
ExternalOneByteStringResource;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:33:61: error: allocating an object of abstract class
type 'Nan::ExternalOneByteStringResource' (aka
'v8::String::ExternalOneByteStringResource')
node_key = v8::String::NewExternal(isolate, new v8::ExternalOneByt...
^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:3153:25: note:
unimplemented pure virtual method 'data' in 'ExternalOneByteStringResource'
virtual const char* data() const = 0;
^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:3155:20: note:
unimplemented pure virtual method 'length' in
'ExternalOneByteStringResource'
virtual size_t length() const = 0;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:33:32: error: no member named 'NewExternal' in
'v8::String'
node_key = v8::String::NewExternal(isolate, new v8::ExternalOneByt...
~~~~~~~~~~~~^
../src/node/node_object.hpp:36:77: error: no member named 'kNormalString' in
'v8::String'
node_key = v8::String::NewFromUtf8(isolate, key.data(), v8::String::kNorma...
~~~~~~~~~~~~^
../src/node/node_object.hpp:108:32: error: no matching member function for call to
'Get'
names.push_back(array->Get(i)->ToString());
~~~~~~~^~~
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:3717:43: note:
candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:3720:43: note:
candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:25:
../src/node/node_function.hpp:41:19: error: no member named 'GetCallingContext' in
'v8::Isolate'; did you mean 'GetCurrentContext'?
if (!isolate->GetCallingContext().IsEmpty()) {
^~~~~~~~~~~~~~~~~
GetCurrentContext
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:8825:18: note:
'GetCurrentContext' declared here
Local<Context> GetCurrentContext();
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:26:
../src/node/node_value.hpp:152:28: error: too few arguments to function call,
single argument 'context' was not specified
return value->ToString();
~~~~~~~~~~~~~~~ ^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:2810:3: note:
'ToString' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8config.h:431:31: note:
expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:191:23: error: no member named
'SetNamedPropertyHandler' in 'v8::ObjectTemplate'; did you mean
'SetIndexedPropertyHandler'?
instance_tpl->SetNamedPropertyHandler(string_accessor.getter ? str...
^~~~~~~~~~~~~~~~~~~~~~~
SetIndexedPropertyHandler
/Users/prikshetsharma/Library/Caches/node-gyp/14.15.5/include/node/v8.h:6840:8: note:
'SetIndexedPropertyHandler' declared here
void SetIndexedPropertyHandler(
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
In file included from ../src/node/node_class.hpp:23:
../src/js_class.hpp:92:17: error: no type named 'StringPropertyGetterCallback' in
'realm::node::Types'
typename T::StringPropertyGetterCallback getter;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/node/node_class.hpp:368:16: note: in instantiation of template class
'realm::js::StringPropertyType<realm::node::Types>' requested here
template<node::StringPropertyType::GetterType F>
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
In file included from ../src/node/node_class.hpp:23:
../src/js_class.hpp:93:17: error: no type named 'StringPropertySetterCallback' in
'realm::node::Types'
typename T::StringPropertySetterCallback setter;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:373:10: error: called object type 'int' is not a
function or function pointer
F(isolate, info.This(), property, return_value);
~^
16 errors generated.
make: *** [Release/obj.target/realm/src/node/node_init.o] Error 1
For some reason during the installation I'm getting these 16 errors.
For some reason during the installation I'm getting these 16 errors.
For some reason during the installation I'm getting these 16 errors.
For some reason during the installation I'm getting these 16 errors.
How to fix this?

Linking C++ on Rust: undefined reference to `operator delete(void*)' and `__gxx_personality_v0', libstdc++ missing?

I'm trying to build a cpp cmake project and link to my Rust project.
cmake_minimum_required(VERSION 3.0)
set (CMAKE_CXX_STANDARD 17)
project(ZLMediaKit_LIB CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(ENABLE_TESTS OFF FORCE)
option(ENABLE_TESTS OFF)
set(ENABLE_OPENSSL FALSE FORCE)
option(ENABLE_OPENSSL OFF)
add_subdirectory(ZLMediaKit)
add_library(libzlmediakit_cpp_interface STATIC interface.cpp)
target_include_directories(libzlmediakit_cpp_interface PUBLIC
.
${CMAKE_CURRENT_SOURCE_DIR}/ZLMediaKit/src
${CMAKE_CURRENT_SOURCE_DIR}/ZLMediaKit/3rdpart/ZLToolKit/src)
target_link_libraries(libzlmediakit_cpp_interface zlmediakit zltoolkit mpeg mov flv libstdc++)
install(TARGETS libzlmediakit_cpp_interface DESTINATION .)
Here's my build.rs:
extern crate cmake;
use cmake::Config;
fn main()
{
let dst = Config::new("zlmediakit_lib").build();
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=static=libzlmediakit_cpp_interface");
}
But I'm getting undefined reference errors:
ong)':
/usr/include/c++/9/ext/new_allocator.h:128: undefined reference to `operator delete(void*)'
/usr/bin/ld: /home/dev/orwell/liborwell_rust/zlmediakit_rust/target/debug/build/zlmediakit_rust-499cc82f14515635/out/liblibzlmediakit_cpp_interface.a(interface.cpp.o): in function `ZLRTSPClient::~ZLRTSPClient()':
/home/dev/orwell/liborwell_rust/zlmediakit_rust/zlmediakit_lib/ZLRTSPClient.h:14: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/usr/bin/ld: /home/dev/orwell/liborwell_rust/zlmediakit_rust/target/debug/build/zlmediakit_rust-499cc82f14515635/out/liblibzlmediakit_cpp_interface.a(interface.cpp.o): in function `std::default_delete<ZLRTSPClient>::operator()(ZLRTSPClient*) const':
/usr/include/c++/9/bits/unique_ptr.h:81: undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /home/dev/orwell/liborwell_rust/zlmediakit_rust/target/debug/build/zlmediakit_rust-499cc82f14515635/out/liblibzlmediakit_cpp_interface.a(interface.cpp.o): in function `__static_initialization_and_destruction_0(int, int)':
/usr/include/c++/9/iostream:74: undefined reference to `std::ios_base::Init::Init()'
/usr/bin/ld: /usr/include/c++/9/iostream:74: undefined reference to `std::ios_base::Init::~Init()'
/usr/bin/ld: /home/dev/orwell/liborwell_rust/zlmediakit_rust/target/debug/build/zlmediakit_rust-499cc82f14515635/out/liblibzlmediakit_cpp_interface.a(interface.cpp.o):(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
I've researched and found some answers (Link error "undefined reference to `__gxx_personality_v0'" and g++) that old me to link against libstdc++. As you see, I'm already doing that.
If I try to compile the CMake project alone, it links sucessfully. However then I compile everything from the Rust side, it gives this error.
Complete output of rust compilation

Can't able to run react-native-maps in my Project

I am trying to install react-native-maps in my project and followed the instructions given in the https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md. But still I am getting error after running my project in Android and it displays error of UIBlock which is present in the AirMapModule.java of react-native-maps in Android Studio. Can anyone help me regarding this?
Here are the versions of my project:
"react": "16.6.1",
"react-native": "^0.59.2",
"react-native-maps": "^0.23.0"
Here is the error which I am getting :
^
symbol: class UIBlock
location: package com.facebook.react.uimanager
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:129: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package
if (!contextHasBug(appContext.getCurrentActivity())) {
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:130: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package
superContext = appContext.getCurrentActivity();
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:133: error: cannot find symbol
if (!contextHasBug(reactContext.getCurrentActivity())) {
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:134: error: cannot find symbol
superContext = reactContext.getCurrentActivity();
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\ViewAttacherGroup.java:23: error: cannot find symbol
this.setOverflow("hidden"); // Change to ViewProps.HIDDEN until RN 0.57 is base
^
symbol: method setOverflow(String)
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapMarkerManager.java:127: error: method does not override or implement a method from a supertype
#Override
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapMarkerManager.java:130: error: cannot find symbol
super.setZIndex(view, zIndex);
^
symbol: method setZIndex(AirMapMarker,float)
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:90: error: cannot find symbol
uiManager.addUIBlock(new UIBlock() {
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:149: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:192: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:229: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:262: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\RegionChangeEvent.java:15: error: no suitable constructor found for Event(int)
super(id);
^
constructor Event.Event() is not applicable
(actual and formal argument lists differ in length)
constructor Event.Event(int,long) is not applicable
(actual and formal argument lists differ in length)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
14 errors```
Try to split your Maven dependancies as explained here:
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url "https://maven.google.com"
}
}
}
https://github.com/react-native-community/react-native-maps/issues/2090

Cmake building error,trying to install gnuradio-mediatools.amodule in GNURadio

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.