问:
Build POCO for Android arm64-v8a fails
I need to build POCO library for Android arm64-v8a but build process fails with this error: "unknown target ABI 'lp64'". I use POCO lib 1.8.1, system Ubuntu 16.04

Steps I have made:

Call .configure in poco folder with these parameters:

./configure --no-sharedmemory --no-wstring --prefix=/home/pro/Documents/lib/poco-arm64-v8a --config=Android-arm64-v8a-clang --no-samples --no-tests --omit=Data/ODBC,NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL,PageCompiler,PageCompiler/File2Page,ApacheConnector,CppParser,PDF,PocoDoc,ProGen

make it with command:

make -s -j4 > make-log-file.txt 2>&1

Config file "Android-arm64-v8a-clang" for configure command was created by me based on this poco github issue and looks like this:

```<code>#
# $Id: //poco/1.4/build/config/Android#3 $
#
# Android
#
# Make settings for Android NDK
#

#
# General Settings
#
LINKMODE           ?= STATIC
ANDROID_ABI        ?= arm64-v8a
POCO_TARGET_OSNAME  = Android
POCO_TARGET_OSARCH  = $(ANDROID_ABI)

ifeq ($(ANDROID_ABI),armeabi)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -mthumb
else
ifeq ($(ANDROID_ABI),armeabi-v7a)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
LINKFLAGS = -Wl,--fix-cortex-a8
else
ifeq ($(ANDROID_ABI),x86)
TOOL      = i686-linux-android
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),x86_64)
TOOL      = x86_64-linux-android
ARCHFLAGS = -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),arm64-v8a)
TOOL      = aarch64-linux-android
ARCHFLAGS = -mabi=lp64 -march=armv8-a
else
$(error Invalid ABI specified in ANDROID_ABI)
endif
endif
endif
endif
endif

#
# Define Tools
#
CC      = $(TOOL)-clang
CXX     = $(TOOL)-clang++
LINK    = $(CXX)
STRIP   = $(TOOL)-strip
LIB     = $(TOOL)-ar -cr
RANLIB  = $(TOOL)-ranlib
SHLIB   = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
DEP     = $(POCO_BASE)/build/script/makedepend.gcc
SHELL   = sh
RM      = rm -rf
CP      = cp
MKDIR   = mkdir -p

#
# Extension for Shared Libraries
#
SHAREDLIBEXT     = .so.$(target_version)
SHAREDLIBLINKEXT = .so

#
# Compiler and Linker Flags
#
CFLAGS          = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64
CFLAGS32        =
CFLAGS64        =
CXXFLAGS        = $(ARCHFLAGS) -std=c++11 -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions
CXXFLAGS32      =
CXXFLAGS64      =
LINKFLAGS      +=
LINKFLAGS32     =
LINKFLAGS64     =
STATICOPT_CC    =
STATICOPT_CXX   =
STATICOPT_LINK  = -static
SHAREDOPT_CC    =
SHAREDOPT_CXX   =
SHAREDOPT_LINK  = -Wl,-rpath,$(LIBPATH)
DEBUGOPT_CC     = -g -D_DEBUG
DEBUGOPT_CXX    = -g -D_DEBUG
DEBUGOPT_LINK   = -g
RELEASEOPT_CC   = -O3 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_CXX  = -O2 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_LINK = -O2

#
# System Specific Flags
#
SYSFLAGS = -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY#
# $Id: //poco/1.4/build/config/Android#3 $
#
# Android
#
# Make settings for Android NDK
#

#
# General Settings
#
LINKMODE           ?= STATIC
ANDROID_ABI        ?= arm64-v8a
POCO_TARGET_OSNAME  = Android
POCO_TARGET_OSARCH  = $(ANDROID_ABI)

ifeq ($(ANDROID_ABI),armeabi)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -mthumb
else
ifeq ($(ANDROID_ABI),armeabi-v7a)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
LINKFLAGS = -Wl,--fix-cortex-a8
else
ifeq ($(ANDROID_ABI),x86)
TOOL      = i686-linux-android
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),x86_64)
TOOL      = x86_64-linux-android
ARCHFLAGS = -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),arm64-v8a)
TOOL      = aarch64-linux-android
ARCHFLAGS = -mabi=lp64 -march=armv8-a
else
$(error Invalid ABI specified in ANDROID_ABI)
endif
endif
endif
endif
endif

#
# Define Tools
#
CC      = $(TOOL)-clang
CXX     = $(TOOL)-clang++
LINK    = $(CXX)
STRIP   = $(TOOL)-strip
LIB     = $(TOOL)-ar -cr
RANLIB  = $(TOOL)-ranlib
SHLIB   = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
DEP     = $(POCO_BASE)/build/script/makedepend.gcc
SHELL   = sh
RM      = rm -rf
CP      = cp
MKDIR   = mkdir -p

#
# Extension for Shared Libraries
#
SHAREDLIBEXT     = .so.$(target_version)
SHAREDLIBLINKEXT = .so

#
# Compiler and Linker Flags
#
CFLAGS          = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64
CFLAGS32        =
CFLAGS64        =
CXXFLAGS        = $(ARCHFLAGS) -std=c++11 -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions
CXXFLAGS32      =
CXXFLAGS64      =
LINKFLAGS      +=
LINKFLAGS32     =
LINKFLAGS64     =
STATICOPT_CC    =
STATICOPT_CXX   =
STATICOPT_LINK  = -static
SHAREDOPT_CC    =
SHAREDOPT_CXX   =
SHAREDOPT_LINK  = -Wl,-rpath,$(LIBPATH)
DEBUGOPT_CC     = -g -D_DEBUG
DEBUGOPT_CXX    = -g -D_DEBUG
DEBUGOPT_LINK   = -g
RELEASEOPT_CC   = -O3 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_CXX  = -O2 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_LINK = -O2

#
# System Specific Flags
#
SYSFLAGS = -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY

#
# System Specific Libraries
#
SYSLIBS  = -lstdc++ -lsupc++

#
# System Specific Libraries
#
SYSLIBS  = -lstdc++ -lsupc++
</code>```

Log from build looks like this:

```<code>** Creating dependency info for src/SyslogChannel.cpp
** Creating dependency info for src/pcre_tables.c
** Creating dependency info for src/pcre_ucd.c
** Creating dependency info for src/pcre_version.c
clang38clang38clang38: : : warningwarningwarning: : : optimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supported

clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_string_utils.c
** Creating dependency info for src/pcre_refcount.c
** Creating dependency info for src/pcre_xclass.c
** Creating dependency info for src/pcre_fullinfo.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_newline.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_ord2utf8.c
** Creating dependency info for src/pcre_exec.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_jit_compile.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_get.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_dfa_exec.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_valid_utf8.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_byte_order.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_study.c
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_maketables.c
** Creating dependency info for src/pcre_globals.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_compile.c
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_chartables.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_config.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/zutil.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/trees.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/inftrees.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/inflate.c
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/inffast.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/infback.c
** Creating dependency info for src/deflate.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/FileStreamFactory.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/URI.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timezone.cpp
** Creating dependency info for src/Token.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timestamp.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timespan.cpp
** Creating dependency info for src/Timer.cpp
** Creating dependency info for src/ActiveDispatcher.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/ThreadTarget.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/ThreadPool.cpp
** Creating dependency info for src/ThreadLocal.cpp
** Creating dependency info for src/Thread.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/TextBufferIterator.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/TextIterator.cpp
** Creating dependency info for src/TextEncoding.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/TextConverter.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/TemporaryFile.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/HashStatistic.cpp
** Creating dependency info for src/Hash.cpp
** Creating dependency info for src/TeeStream.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/TaskNotification.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/JSONString.cpp
** Creating dependency info for src/HexBinaryEncoder.cpp
** Creating dependency info for src/InflatingStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/LineEndingConverter.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/HexBinaryDecoder.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Glob.cpp
** Creating dependency info for src/FormattingChannel.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Formatter.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/FileChannel.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/File.cpp
** Creating dependency info for src/FPEnvironment.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/FIFOBufferStream.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Exception.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/ErrorHandler.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/EventArgs.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Error.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/EventChannel.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Event.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Environment.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/DirectoryWatcher.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DirectoryIterator.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DigestStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/DigestEngine.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/DeflatingStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Debugger.cpp
** Creating dependency info for src/DateTimeParser.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error** Creating dependency info for src/DateTimeFormatter.cpp
: unknown target ABI 'lp64'
** Creating dependency info for src/DateTimeFormat.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/LocalDateTime.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DateTime.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/CountingStream.cpp
** Creating dependency info for src/Condition.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/ConsoleChannel.cpp
** Creating dependency info for src/Configurable.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Clock.cpp
** Creating dependency info for src/Checksum.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Channel.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/ByteOrder.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Bugcheck.cpp
** Creating dependency info for src/BinaryWriter.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/BinaryReader.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Base64Encoder.cpp
** Creating dependency info for src/Base64Decoder.cpp
** Creating dependency info for src/Base32Encoder.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Base32Decoder.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/AsyncChannel.cpp
** Creating dependency info for src/ASCIIEncoding.cpp
** Creating dependency info for src/Ascii.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38** Creating dependency info for src/ArchiveStrategy.cpp
: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Compiling src/ArchiveStrategy.cpp (debug, static)
** Compiling src/Ascii.cpp (debug, static)
** Compiling src/ASCIIEncoding.cpp (debug, static)
** Compiling src/AsyncChannel.cpp (debug, static)
clang38++clang38++clang38++: : : warningwarningwarning: : : optimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supported

clang38++: warning: optimization flag '-finline-limit=64' is not supported
errorerrorerror: : : unknown target ABI 'lp64'unknown target ABI 'lp64'unknown target ABI 'lp64'

error: unknown target ABI 'lp64'
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/AsyncChannel.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/AsyncChannel.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/Ascii.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/Ascii.o] Error 1
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ArchiveStrategy.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ArchiveStrategy.o] Error 1
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ASCIIEncoding.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ASCIIEncoding.o] Error 1
Makefile:131: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2
</code>```

Thanks

答:
for all platforms there is a configuration file which defines CXXFLAGS, when according to the platform each changes are include e.g. for Android its build/config/Android
and for making the build for x86_64 and arm64_v8a I modified the file with below details.</p>

```<code>  ANDROID_ABI        ?= armeabi
  POCO_TARGET_OSNAME  = Android
  POCO_TARGET_OSARCH  = $(ANDROID_ABI)

  ifeq ($(ANDROID_ABI),armeabi)
  TOOL      = arm-linux-androideabi
  ARCHFLAGS = -mthumb
  else
  ifeq ($(ANDROID_ABI),armeabi-v7a)
  TOOL      = arm-linux-androideabi
  ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
  LINKFLAGS = -Wl,--fix-cortex-a8
  else
  ifeq ($(ANDROID_ABI),x86)
  TOOL      = i686-linux-android
  ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
  else
  ifeq ($(ANDROID_ABI),x86_64)
  TOOL      =  x86_64-linux-android
  ARCHFLAGS = -march=x86-64  -msse4.2 -mpopcnt -m64  -mstackrealign
  else
  ifeq ($(ANDROID_ABI),arm64-v8a)
  TOOL      = aarch64-linux-android
  ARCHFLAGS = -march=aarch64 -mfloat-abi=softfp
  LINKFLAGS = -Wl,--fix-cortex-a8
  else
  $(error Invalid ABI specified in ANDROID_ABI)
  endif
  endif
  endif
  endif
  endif
    ```

now if you run this configuration after your ndk toolkit setup

$NDK_DIR/build/tools/make-standalone-toolchain.sh --force --platform=android-21  --install-dir=/tmp/android-toolchain --toolchain=aarch64-linux-androideabi

export PATH=/tmp/android-toolchain/bin/:$PATH

and then
./configure --config=Android --no-samples --no-tests --prefix=$INSTALL_DIR
make clean  ANDROID_ABI=arm64-v8a
make  -j8 ANDROID_ABI=arm64-v8a

NB : please make sure that ABI string matches to what has been given in the config file of Android.

</code>```

Title: Build POCO for Android arm64-v8a fails

Body:
I need to build POCO library for Android arm64-v8a but build process fails with this error: "unknown target ABI 'lp64'". I use POCO lib 1.8.1, system Ubuntu 16.04

Steps I have made:

Call .configure in poco folder with these parameters:

./configure --no-sharedmemory --no-wstring --prefix=/home/pro/Documents/lib/poco-arm64-v8a --config=Android-arm64-v8a-clang --no-samples --no-tests --omit=Data/ODBC,NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL,PageCompiler,PageCompiler/File2Page,ApacheConnector,CppParser,PDF,PocoDoc,ProGen

make it with command:

make -s -j4 > make-log-file.txt 2>&1

Config file "Android-arm64-v8a-clang" for configure command was created by me based on this poco github issue and looks like this:

#
# $Id: //poco/1.4/build/config/Android#3 $
#
# Android
#
# Make settings for Android NDK
#

#
# General Settings
#
LINKMODE           ?= STATIC
ANDROID_ABI        ?= arm64-v8a
POCO_TARGET_OSNAME  = Android
POCO_TARGET_OSARCH  = $(ANDROID_ABI)

ifeq ($(ANDROID_ABI),armeabi)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -mthumb
else
ifeq ($(ANDROID_ABI),armeabi-v7a)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
LINKFLAGS = -Wl,--fix-cortex-a8
else
ifeq ($(ANDROID_ABI),x86)
TOOL      = i686-linux-android
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),x86_64)
TOOL      = x86_64-linux-android
ARCHFLAGS = -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),arm64-v8a)
TOOL      = aarch64-linux-android
ARCHFLAGS = -mabi=lp64 -march=armv8-a
else
$(error Invalid ABI specified in ANDROID_ABI)
endif
endif
endif
endif
endif

#
# Define Tools
#
CC      = $(TOOL)-clang
CXX     = $(TOOL)-clang++
LINK    = $(CXX)
STRIP   = $(TOOL)-strip
LIB     = $(TOOL)-ar -cr
RANLIB  = $(TOOL)-ranlib
SHLIB   = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
DEP     = $(POCO_BASE)/build/script/makedepend.gcc
SHELL   = sh
RM      = rm -rf
CP      = cp
MKDIR   = mkdir -p

#
# Extension for Shared Libraries
#
SHAREDLIBEXT     = .so.$(target_version)
SHAREDLIBLINKEXT = .so

#
# Compiler and Linker Flags
#
CFLAGS          = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64
CFLAGS32        =
CFLAGS64        =
CXXFLAGS        = $(ARCHFLAGS) -std=c++11 -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions
CXXFLAGS32      =
CXXFLAGS64      =
LINKFLAGS      +=
LINKFLAGS32     =
LINKFLAGS64     =
STATICOPT_CC    =
STATICOPT_CXX   =
STATICOPT_LINK  = -static
SHAREDOPT_CC    =
SHAREDOPT_CXX   =
SHAREDOPT_LINK  = -Wl,-rpath,$(LIBPATH)
DEBUGOPT_CC     = -g -D_DEBUG
DEBUGOPT_CXX    = -g -D_DEBUG
DEBUGOPT_LINK   = -g
RELEASEOPT_CC   = -O3 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_CXX  = -O2 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_LINK = -O2

#
# System Specific Flags
#
SYSFLAGS = -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY#
# $Id: //poco/1.4/build/config/Android#3 $
#
# Android
#
# Make settings for Android NDK
#

#
# General Settings
#
LINKMODE           ?= STATIC
ANDROID_ABI        ?= arm64-v8a
POCO_TARGET_OSNAME  = Android
POCO_TARGET_OSARCH  = $(ANDROID_ABI)

ifeq ($(ANDROID_ABI),armeabi)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -mthumb
else
ifeq ($(ANDROID_ABI),armeabi-v7a)
TOOL      = arm-linux-androideabi
ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
LINKFLAGS = -Wl,--fix-cortex-a8
else
ifeq ($(ANDROID_ABI),x86)
TOOL      = i686-linux-android
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),x86_64)
TOOL      = x86_64-linux-android
ARCHFLAGS = -msse3 -mstackrealign -mfpmath=sse
else
ifeq ($(ANDROID_ABI),arm64-v8a)
TOOL      = aarch64-linux-android
ARCHFLAGS = -mabi=lp64 -march=armv8-a
else
$(error Invalid ABI specified in ANDROID_ABI)
endif
endif
endif
endif
endif

#
# Define Tools
#
CC      = $(TOOL)-clang
CXX     = $(TOOL)-clang++
LINK    = $(CXX)
STRIP   = $(TOOL)-strip
LIB     = $(TOOL)-ar -cr
RANLIB  = $(TOOL)-ranlib
SHLIB   = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
DEP     = $(POCO_BASE)/build/script/makedepend.gcc
SHELL   = sh
RM      = rm -rf
CP      = cp
MKDIR   = mkdir -p

#
# Extension for Shared Libraries
#
SHAREDLIBEXT     = .so.$(target_version)
SHAREDLIBLINKEXT = .so

#
# Compiler and Linker Flags
#
CFLAGS          = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64
CFLAGS32        =
CFLAGS64        =
CXXFLAGS        = $(ARCHFLAGS) -std=c++11 -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions
CXXFLAGS32      =
CXXFLAGS64      =
LINKFLAGS      +=
LINKFLAGS32     =
LINKFLAGS64     =
STATICOPT_CC    =
STATICOPT_CXX   =
STATICOPT_LINK  = -static
SHAREDOPT_CC    =
SHAREDOPT_CXX   =
SHAREDOPT_LINK  = -Wl,-rpath,$(LIBPATH)
DEBUGOPT_CC     = -g -D_DEBUG
DEBUGOPT_CXX    = -g -D_DEBUG
DEBUGOPT_LINK   = -g
RELEASEOPT_CC   = -O3 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_CXX  = -O2 -DNDEBUG -fomit-frame-pointer
RELEASEOPT_LINK = -O2

#
# System Specific Flags
#
SYSFLAGS = -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY

#
# System Specific Libraries
#
SYSLIBS  = -lstdc++ -lsupc++

#
# System Specific Libraries
#
SYSLIBS  = -lstdc++ -lsupc++

Log from build looks like this:

** Creating dependency info for src/SyslogChannel.cpp
** Creating dependency info for src/pcre_tables.c
** Creating dependency info for src/pcre_ucd.c
** Creating dependency info for src/pcre_version.c
clang38clang38clang38: : : warningwarningwarning: : : optimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supported

clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_string_utils.c
** Creating dependency info for src/pcre_refcount.c
** Creating dependency info for src/pcre_xclass.c
** Creating dependency info for src/pcre_fullinfo.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_newline.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_ord2utf8.c
** Creating dependency info for src/pcre_exec.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_jit_compile.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_get.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_dfa_exec.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_valid_utf8.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_byte_order.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_study.c
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_maketables.c
** Creating dependency info for src/pcre_globals.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_compile.c
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/pcre_chartables.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/pcre_config.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/zutil.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/trees.c
error: unknown target ABI 'lp64'
** Creating dependency info for src/inftrees.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/inflate.c
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/inffast.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/infback.c
** Creating dependency info for src/deflate.c
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/FileStreamFactory.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/URI.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timezone.cpp
** Creating dependency info for src/Token.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timestamp.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Timespan.cpp
** Creating dependency info for src/Timer.cpp
** Creating dependency info for src/ActiveDispatcher.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/ThreadTarget.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/ThreadPool.cpp
** Creating dependency info for src/ThreadLocal.cpp
** Creating dependency info for src/Thread.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/TextBufferIterator.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/TextIterator.cpp
** Creating dependency info for src/TextEncoding.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/TextConverter.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/TemporaryFile.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/HashStatistic.cpp
** Creating dependency info for src/Hash.cpp
** Creating dependency info for src/TeeStream.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/TaskNotification.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/JSONString.cpp
** Creating dependency info for src/HexBinaryEncoder.cpp
** Creating dependency info for src/InflatingStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/LineEndingConverter.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/HexBinaryDecoder.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Glob.cpp
** Creating dependency info for src/FormattingChannel.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Formatter.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/FileChannel.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/File.cpp
** Creating dependency info for src/FPEnvironment.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/FIFOBufferStream.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Exception.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/ErrorHandler.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/EventArgs.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Error.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/EventChannel.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Event.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/Environment.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/DirectoryWatcher.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DirectoryIterator.cpp
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DigestStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/DigestEngine.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/DeflatingStream.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Debugger.cpp
** Creating dependency info for src/DateTimeParser.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error** Creating dependency info for src/DateTimeFormatter.cpp
: unknown target ABI 'lp64'
** Creating dependency info for src/DateTimeFormat.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/LocalDateTime.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/DateTime.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/CountingStream.cpp
** Creating dependency info for src/Condition.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
** Creating dependency info for src/ConsoleChannel.cpp
** Creating dependency info for src/Configurable.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Clock.cpp
** Creating dependency info for src/Checksum.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/Channel.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/ByteOrder.cpp
error: unknown target ABI 'lp64'
** Creating dependency info for src/Bugcheck.cpp
** Creating dependency info for src/BinaryWriter.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Creating dependency info for src/BinaryReader.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Base64Encoder.cpp
** Creating dependency info for src/Base64Decoder.cpp
** Creating dependency info for src/Base32Encoder.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/Base32Decoder.cpp
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
** Creating dependency info for src/AsyncChannel.cpp
** Creating dependency info for src/ASCIIEncoding.cpp
** Creating dependency info for src/Ascii.cpp
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
error: unknown target ABI 'lp64'
clang38** Creating dependency info for src/ArchiveStrategy.cpp
: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
clang38: warning: optimization flag '-finline-limit=64' is not supported
error: unknown target ABI 'lp64'
** Compiling src/ArchiveStrategy.cpp (debug, static)
** Compiling src/Ascii.cpp (debug, static)
** Compiling src/ASCIIEncoding.cpp (debug, static)
** Compiling src/AsyncChannel.cpp (debug, static)
clang38++clang38++clang38++: : : warningwarningwarning: : : optimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supportedoptimization flag '-finline-limit=64' is not supported

clang38++: warning: optimization flag '-finline-limit=64' is not supported
errorerrorerror: : : unknown target ABI 'lp64'unknown target ABI 'lp64'unknown target ABI 'lp64'

error: unknown target ABI 'lp64'
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/AsyncChannel.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/AsyncChannel.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/Ascii.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/Ascii.o] Error 1
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ArchiveStrategy.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ArchiveStrategy.o] Error 1
/home/pro/Documents/poco/build/rules/compile:35: recipe for target '/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ASCIIEncoding.o' failed
make[1]: *** [/home/pro/Documents/poco/Foundation/obj/Android/arm64-v8a/debug_static/ASCIIEncoding.o] Error 1
Makefile:131: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2

Thanks

Body:
for all platforms there is a configuration file which defines CXXFLAGS, when according to the platform each changes are include e.g. for Android its build/config/Android
and for making the build for x86_64 and arm64_v8a I modified the file with below details.

  ANDROID_ABI        ?= armeabi
  POCO_TARGET_OSNAME  = Android
  POCO_TARGET_OSARCH  = $(ANDROID_ABI)

  ifeq ($(ANDROID_ABI),armeabi)
  TOOL      = arm-linux-androideabi
  ARCHFLAGS = -mthumb
  else
  ifeq ($(ANDROID_ABI),armeabi-v7a)
  TOOL      = arm-linux-androideabi
  ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
  LINKFLAGS = -Wl,--fix-cortex-a8
  else
  ifeq ($(ANDROID_ABI),x86)
  TOOL      = i686-linux-android
  ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
  else
  ifeq ($(ANDROID_ABI),x86_64)
  TOOL      =  x86_64-linux-android
  ARCHFLAGS = -march=x86-64  -msse4.2 -mpopcnt -m64  -mstackrealign
  else
  ifeq ($(ANDROID_ABI),arm64-v8a)
  TOOL      = aarch64-linux-android
  ARCHFLAGS = -march=aarch64 -mfloat-abi=softfp
  LINKFLAGS = -Wl,--fix-cortex-a8
  else
  $(error Invalid ABI specified in ANDROID_ABI)
  endif
  endif
  endif
  endif
  endif
    ```

now if you run this configuration after your ndk toolkit setup

$NDK_DIR/build/tools/make-standalone-toolchain.sh --force --platform=android-21  --install-dir=/tmp/android-toolchain --toolchain=aarch64-linux-androideabi

export PATH=/tmp/android-toolchain/bin/:$PATH

and then
./configure --config=Android --no-samples --no-tests --prefix=$INSTALL_DIR
make clean  ANDROID_ABI=arm64-v8a
make  -j8 ANDROID_ABI=arm64-v8a

NB : please make sure that ABI string matches to what has been given in the config file of Android.


来源: stackexchange

问:
java.lang.ClassNotFoundException: org.displaytag.tags.TableTagExtraInfo in struts 1.2
```<code><%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>
<display:table id="data" name="sessionData.actorList" requestURI="/baseLife_processInsuredPhone.do" decorator="com.mccamish.web.appentry.base_life.displayTable.ActorDecorator" pagesize="6" >
        <display:column property="tvShow" title="TV Show" />
        <display:column property="userName" title="User Name" />
        <display:column property="emailId" title="Email Id" />
    </display:table>
</code>```

I have used this code in JSP for display table but before showing this JSP page i am getting java.lang.ClassNotFoundException: org.displaytag.tags.TableTagExtraInfo Exception and this Error ERROR ServletException in '/pages/appEntry/baseLife/HUF.jsp': org.displaytag.tags.TableTagExtraInfo
org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.displaytag.tags.TableTagExtraInfo
I have imported displaytag-1.2.jar but still i am getting above error.

答: Make sure the same jar file is available to deployment assembly and will have run time availability.</p>

ContentLicense: CC BY-SA 3.0

Body:
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>
<display:table id="data" name="sessionData.actorList" requestURI="/baseLife_processInsuredPhone.do" decorator="com.mccamish.web.appentry.base_life.displayTable.ActorDecorator" pagesize="6" >
        <display:column property="tvShow" title="TV Show" />
        <display:column property="userName" title="User Name" />
        <display:column property="emailId" title="Email Id" />
    </display:table>

I have used this code in JSP for display table but before showing this JSP page i am getting java.lang.ClassNotFoundException: org.displaytag.tags.TableTagExtraInfo Exception and this Error ERROR ServletException in '/pages/appEntry/baseLife/HUF.jsp': org.displaytag.tags.TableTagExtraInfo
org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.displaytag.tags.TableTagExtraInfo
I have imported displaytag-1.2.jar but still i am getting above error.

ContentLicense: CC BY-SA 4.0


问:
Error when searching for string containing &
I am using a linq query to get a list of objects that contain a variable string:

```<code>   string str = FilterAllSource;
                if (!string.IsNullOrEmpty(str))
                {
                    ss = ss.Where(it => (it.SourceCode.ToUpper()
                                               .Contains(str.ToUpper())
                                         || it.SourceName.ToUpper()
                                               .Contains(str.ToUpper())));
                }

                if (top > 0)
                    ss = ss.Take(top);

                return ss.ToList();
</code>```

when FilterAllsource contains a & (e.g m & m) it throws an exception

Unterminated string literal at position 38 in '(ResourceId eq 3) and (substringof('M '.

my guess is that the & interferes with some internal concatenation process. Is there a way to avoid this without removing the & from the query string?

EDIT1: ss is a list of objects List where SourceCode and Sourcename are both strings

答:
I could not reproduce it, i guess it's happening before this code. Could you materialize ss before filtering, like this, to check if code sample is isolated?

```<code>var itemsToFilter = ss.ToList();
string str = FilterAllSource;
            if (!string.IsNullOrEmpty(str))
            {

                itemsToFilter = itemsToFilter.Where(it => (it.SourceCode.ToUpper()
                                           .Contains(str.ToUpper())
                                     || it.SourceName.ToUpper()
                                           .Contains(str.ToUpper())));
            }

            if (top > 0)
                itemsToFilter = itemsToFilter.Take(top);

            return itemsToFilter.ToList();
</code>```

I've tried this with linq to objects, worked fine:

```<code>class Program
{
    static void Main(string[] args)
    {
        var ss = new List<Dummy> { new Dummy
                     {
                         SourceCode = "m & m",
                         SourceName = "blabla"
                     }}.AsEnumerable();

        string str = "m & m";
        if (!string.IsNullOrEmpty(str))
        {
            ss = ss.Where(it => (it.SourceCode.ToUpper()
                                       .Contains(str.ToUpper())
                                 || it.SourceName.ToUpper()
                                       .Contains(str.ToUpper()))).ToArray();
        }

        var top = 2;

        if (top > 0)
            ss = ss.Take(top).ToArray();

        Console.WriteLine(ss.Count());
    }
}

public class Dummy
{
    public string SourceCode { get; set; }
    public string SourceName { get; set; }
}
</code>```

Also tried with linq to sql, not same code, but should raise same problem (if there was problem):

```<code>class Program
{
    static void Main(string[] args)
    {
        string str = "&";
        using (var context = new DataClasses1DataContext())
        {
            var clients = context.Clients.Where(x => x.Code.Contains(str.ToUpper()));
            clients = clients.Take(5);
            Console.WriteLine(clients.Count());
        }
    }
}
</code>```

Body:
I am using a linq query to get a list of objects that contain a variable string:

   string str = FilterAllSource;
                if (!string.IsNullOrEmpty(str))
                {
                    ss = ss.Where(it => (it.SourceCode.ToUpper()
                                               .Contains(str.ToUpper())
                                         || it.SourceName.ToUpper()
                                               .Contains(str.ToUpper())));
                }

                if (top > 0)
                    ss = ss.Take(top);

                return ss.ToList();

when FilterAllsource contains a & (e.g m & m) it throws an exception

Unterminated string literal at position 38 in '(ResourceId eq 3) and (substringof('M '.

my guess is that the & interferes with some internal concatenation process. Is there a way to avoid this without removing the & from the query string?

EDIT1: ss is a list of objects List where SourceCode and Sourcename are both strings

Body:
I could not reproduce it, i guess it's happening before this code. Could you materialize ss before filtering, like this, to check if code sample is isolated?

var itemsToFilter = ss.ToList();
string str = FilterAllSource;
            if (!string.IsNullOrEmpty(str))
            {

                itemsToFilter = itemsToFilter.Where(it => (it.SourceCode.ToUpper()
                                           .Contains(str.ToUpper())
                                     || it.SourceName.ToUpper()
                                           .Contains(str.ToUpper())));
            }

            if (top > 0)
                itemsToFilter = itemsToFilter.Take(top);

            return itemsToFilter.ToList();

I've tried this with linq to objects, worked fine:

class Program
{
    static void Main(string[] args)
    {
        var ss = new List<Dummy> { new Dummy
                     {
                         SourceCode = "m & m",
                         SourceName = "blabla"
                     }}.AsEnumerable();

        string str = "m & m";
        if (!string.IsNullOrEmpty(str))
        {
            ss = ss.Where(it => (it.SourceCode.ToUpper()
                                       .Contains(str.ToUpper())
                                 || it.SourceName.ToUpper()
                                       .Contains(str.ToUpper()))).ToArray();
        }

        var top = 2;

        if (top > 0)
            ss = ss.Take(top).ToArray();

        Console.WriteLine(ss.Count());
    }
}

public class Dummy
{
    public string SourceCode { get; set; }
    public string SourceName { get; set; }
}

Also tried with linq to sql, not same code, but should raise same problem (if there was problem):

class Program
{
    static void Main(string[] args)
    {
        string str = "&";
        using (var context = new DataClasses1DataContext())
        {
            var clients = context.Clients.Where(x => x.Code.Contains(str.ToUpper()));
            clients = clients.Take(5);
            Console.WriteLine(clients.Count());
        }
    }
}


问:
How to insert items into existing array
Assume I have two arrays as below

```<code>array:2 [
  0 => {#1995
    +"id": 6
    +"sales_target_amount": "30000.00"
  }
  1 => {#1996
    +"id": 10
    +"sales_target_amount": "1000.00"
  }
]
</code>```

second array

```<code>array:2 [
  0 => {#1994
    +"sales_total": "4165.80"
    +"staff_id": 6
  }
  1 => {#1513
    +"sales_total": "1335.60"
    +"staff_id": 10
  }
]
</code>```

I'm trying to insert the first array sales_target_amount into the second array if the id is matched to the staff_id.

code

```<code>  $sum = array_merge($second_array[],$firs_array);
</code>```

The code above will merge the two array together but not insert the items based on the id.

Expected Result

```<code>array:2 [
      0 => {#1994
        +"sales_total": "4165.80"
        +"staff_id": 6
        +"sales_target_amount": "30000.00"
      }
      1 => {#1513
        +"sales_total": "1335.60"
        +"staff_id": 10
        +"sales_target_amount": "1000.00"
      }
    ]
</code>```

答:
Here is the snippet, please see inline doc for explanation

```<code>$arr = [
    0 => ["sales_total" => "4165.80", "staff_id" => 6],
    1 => ["sales_total" => "1335.60", "staff_id" => 10],
];
$arr1 = [
    0 => ["id" => 6, "sales_target_amount" => "30000.00"],
    1 => ["id" => 10, "sales_target_amount" => "1000.00"],
];
//NULL to return complete arrays or objects and staff id will be key
$arr = array_column($arr, null, 'staff_id');
// mapping id sales target amount combination
$temp = array_column($arr1, 'sales_target_amount', 'id');
foreach ($arr as $key => $value) {
    $arr[$key]['sales_target_amount'] = $temp[$key]; // putting sales_target_amount for id
}
</code>```

array_column — Return the values from a single column in the input array

Demo Link.

Title: How to insert items into existing array

Body:
Assume I have two arrays as below

array:2 [
  0 => {#1995
    +"id": 6
    +"sales_target_amount": "30000.00"
  }
  1 => {#1996
    +"id": 10
    +"sales_target_amount": "1000.00"
  }
]

second array

array:2 [
  0 => {#1994
    +"sales_total": "4165.80"
    +"staff_id": 6
  }
  1 => {#1513
    +"sales_total": "1335.60"
    +"staff_id": 10
  }
]

I'm trying to insert the first array sales_target_amount into the second array if the id is matched to the staff_id.

code

  $sum = array_merge($second_array[],$firs_array);

The code above will merge the two array together but not insert the items based on the id.

Expected Result

array:2 [
      0 => {#1994
        +"sales_total": "4165.80"
        +"staff_id": 6
        +"sales_target_amount": "30000.00"
      }
      1 => {#1513
        +"sales_total": "1335.60"
        +"staff_id": 10
        +"sales_target_amount": "1000.00"
      }
    ]

Body:
Here is the snippet, please see inline doc for explanation

$arr = [
    0 => ["sales_total" => "4165.80", "staff_id" => 6],
    1 => ["sales_total" => "1335.60", "staff_id" => 10],
];
$arr1 = [
    0 => ["id" => 6, "sales_target_amount" => "30000.00"],
    1 => ["id" => 10, "sales_target_amount" => "1000.00"],
];
//NULL to return complete arrays or objects and staff id will be key
$arr = array_column($arr, null, 'staff_id');
// mapping id sales target amount combination
$temp = array_column($arr1, 'sales_target_amount', 'id');
foreach ($arr as $key => $value) {
    $arr[$key]['sales_target_amount'] = $temp[$key]; // putting sales_target_amount for id
}

array_column — Return the values from a single column in the input array

Demo Link.


问:
jQuery.validation add Method error on birthday age validation
I'm using the jQuery.validation gem, and I'm having an unknown portion of code appear when the age is over 18 in the console. You can submit the form, but the error message doesn't disappear dynamically after you've inputed the correct value. I think it's a straight forward error with how my message is appearing but I can't figure it out.

The console highlights

From the jQuery Validation Plugin v1.13.1 "result =
  $.validator.methods[ method ].call( this, val, element,
  rule.parameters );"

profiles.js

```<code>  $(document).ready(function () {
  {{$('#new_profile').validate({
  rules: {
 'profile[first_name]': {
   required: true,
   minlength: 2
 },
 'profile[last_name]': {
   required: true,
   minlength: 2
 },
  'profile[location]': {
    required: true,
    minlength: 2
  },
'profile[birthday]': {
    check_date_of_birth: true,
    require: true
  },
  'profile[operating_system]': {
    minlength: 1
  },
  'profile[about_me]': {
    required: true,
    minlength: 5,
    maxlength: 500
  }
}
   })
});

$.validator.addMethod("check_date_of_birth", function(value, element) {

var birthday = $("#profile_birthday").val();
var birthdaydate = Date.parse(birthday);
var difference = Date.now() - birthdaydate;
var ageYear = new Date(difference);
var age = Math.abs(ageYear.getUTCFullYear() - 1970);
return age > 18;
}, "You must be at least 18 years of age.");
</code>```

profile_form

```<code><div class="form_input">
<%= f.label(:birthday, "Date of Birth:") %>
<%= f.date_field(:birthday) %>
<label id="errorBirthday"></label>
</code>```

答:
We need to extend the plugin to create a custom validation method for checking a minimum age using the data of birth:

```<code><input type="date" name="dob" placeholder="mm/dd/yyyy"/>
</code>```

$(document).ready(function() {

  $.validator.addMethod("minAge", function(value, element, min) {
    var today = new Date();
    var birthDate = new Date(value);
    var age = today.getFullYear() - birthDate.getFullYear();

    if (age > min + 1) {
      return true;
    }

    var m = today.getMonth() - birthDate.getMonth();

    if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
      age--;
    }

    return age >= min;
  }, "You are not old enough!");

  $("form").validate({
    rules: {
      dob: {
        required: true,
        minAge: 18
      }
    },
    messages: {
      dob: {
        required: "Please enter you date of birth.",
        minAge: "You must be at least 18 years old!"
      }
    }
  });

});```
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.min.js"></script>

<form>
  <input type="date" name="dob" placeholder="mm/dd/yyyy" />
  <br><br>
  <input type="submit" value="Submit">
</form></code>```

Body:
I'm using the jQuery.validation gem, and I'm having an unknown portion of code appear when the age is over 18 in the console. You can submit the form, but the error message doesn't disappear dynamically after you've inputed the correct value. I think it's a straight forward error with how my message is appearing but I can't figure it out.

The console highlights

From the jQuery Validation Plugin v1.13.1 "result =
  $.validator.methods[ method ].call( this, val, element,
  rule.parameters );"

profiles.js

  $(document).ready(function () {
  {{$('#new_profile').validate({
  rules: {
 'profile[first_name]': {
   required: true,
   minlength: 2
 },
 'profile[last_name]': {
   required: true,
   minlength: 2
 },
  'profile[location]': {
    required: true,
    minlength: 2
  },
'profile[birthday]': {
    check_date_of_birth: true,
    require: true
  },
  'profile[operating_system]': {
    minlength: 1
  },
  'profile[about_me]': {
    required: true,
    minlength: 5,
    maxlength: 500
  }
}
   })
});

$.validator.addMethod("check_date_of_birth", function(value, element) {

var birthday = $("#profile_birthday").val();
var birthdaydate = Date.parse(birthday);
var difference = Date.now() - birthdaydate;
var ageYear = new Date(difference);
var age = Math.abs(ageYear.getUTCFullYear() - 1970);
return age > 18;
}, "You must be at least 18 years of age.");

profile_form

<%= f.label(:birthday, "Date of Birth:") %>
<%= f.date_field(:birthday) %>

Body:
We need to extend the plugin to create a custom validation method for checking a minimum age using the data of birth:

<input type="date" name="dob" placeholder="mm/dd/yyyy"/>

$(document).ready(function() {

  $.validator.addMethod("minAge", function(value, element, min) {
    var today = new Date();
    var birthDate = new Date(value);
    var age = today.getFullYear() - birthDate.getFullYear();

    if (age > min + 1) {
      return true;
    }

    var m = today.getMonth() - birthDate.getMonth();

    if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
      age--;
    }

    return age >= min;
  }, "You are not old enough!");

  $("form").validate({
    rules: {
      dob: {
        required: true,
        minAge: 18
      }
    },
    messages: {
      dob: {
        required: "Please enter you date of birth.",
        minAge: "You must be at least 18 years old!"
      }
    }
  });

});

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.min.js"></script>

<form>
  <input type="date" name="dob" placeholder="mm/dd/yyyy" />
  <br><br>
  <input type="submit" value="Submit">
</form>


问:
Insert special characters with libmysql
in a C++ software using the libmysqlclient, I am trying to insert a row into a table containing html-encoded characters such as é. The request looks like this:

```<code>INSERT INTO mytable ( field )  VALUES( 'Justificatif d\'achat numéro 1523641305' )
</code>```

It fails with error:

```<code>Incorrect string value: '\xE9ro 15...' for column 'field' at row 1
</code>```

If I copy my request such as, copy it into workbench and execute it, it works. But it is impossible to have it work from my code.

My column is in charset utf8 with default collation.

I connect to my DB using mysql_real_connect, and call "SET NAMES 'utf8'" just after having performed the connection.

First edit:
I have read the questions and answers from Inserting UTF-8 encoded string into UTF-8 encoded mysql table fails with "Incorrect string value", and tried to apply the suggested solutions, but it did not work for me.
As far as I understand the problem, my issue is different since the character I try to insert is U+00E9 in Unicode, and therefore is only on 2 bytes. Also, I am able to insert it into my DB, just not from my C++ code.

答:
e-acute:

htmlentities:  é  -- Avoid this in databases.

latin1:  hex E9

utf8:  hex C3A9

Unicode "codepoint":  U+00E9   -- Avoid this in databases.

When establishing the connection from your C++ client to MySQL, state what character encoding is being used in the client.  Based on "Incorrect string value: '\xE9ro...", I assume it is latin1.

Separately, you can declare the column (field) in the table to be either CHARACTER SET latin1 or utf8 or utf8mb4.  In the first case, the E9 will pass through unchanged.  In the others, the E9 will be turned into C3E9.

Title: Insert special characters with libmysql

Body:
in a C++ software using the libmysqlclient, I am trying to insert a row into a table containing html-encoded characters such as é. The request looks like this:

INSERT INTO mytable ( field )  VALUES( 'Justificatif d\'achat numéro 1523641305' )

It fails with error:

Incorrect string value: '\xE9ro 15...' for column 'field' at row 1

If I copy my request such as, copy it into workbench and execute it, it works. But it is impossible to have it work from my code.

My column is in charset utf8 with default collation.

I connect to my DB using mysql_real_connect, and call "SET NAMES 'utf8'" just after having performed the connection.

First edit:
I have read the questions and answers from Inserting UTF-8 encoded string into UTF-8 encoded mysql table fails with "Incorrect string value", and tried to apply the suggested solutions, but it did not work for me.
As far as I understand the problem, my issue is different since the character I try to insert is U+00E9 in Unicode, and therefore is only on 2 bytes. Also, I am able to insert it into my DB, just not from my C++ code.

Body:
e-acute:

htmlentities:  &eacute;  -- Avoid this in databases.

latin1:  hex E9

utf8:  hex C3A9

Unicode "codepoint":  U+00E9   -- Avoid this in databases.

When establishing the connection from your C++ client to MySQL, state what character encoding is being used in the client.  Based on "Incorrect string value: '\xE9ro...", I assume it is latin1.

Separately, you can declare the column (field) in the table to be either CHARACTER SET latin1 or utf8 or utf8mb4.  In the first case, the E9 will pass through unchanged.  In the others, the E9 will be turned into C3E9.


问:
Detecting .NET version without UserAgent string
Most modern browsers (Chrome 10, Firefox 4, IE9) are all shortening their UserAgent identifiers. As a result, the supported .NET versions are no longer sent to the server.

In order to allow our customers to use our ClickOnce application, we need to know which frameworks are supported by the client.

Javascript detection of the Chrome and Firefox ClickOnce helpers are a start (these are now failing in Firefox 4), but we no longer have a way of detecting if the client has .NET 2.0, 3.5 or 4.0 installed.

Barring from detecting the Windows platform from the UserAgent string and inferring the most likely framework (XP = 1.1, Vista=2.0, Win7=3.5), how could we detect .NET framework support?

(We want to prevent the .application file downloading as most of our clients don't seem to notice the downloading "pop-unders")

答: I don't see a way to do this. If the browser doesn't tell your server which frameworks are installed then you don't have any other way to find out.</p>


问:
How to change the whole values of DataFrame?
At first attempt, I want to create a DataFrame but forgot to put some values:

```<code>a=[0,1/4,2/4,3/4,4]
b=[0,1/4,2/4,3/4,4]
z=DataFrame(index=a,columns=b)
</code>```

Then I got this.

```<code>>      0.00 0.25 0.50 0.75 4.00
> 0.00  NaN  NaN  NaN  NaN  NaN
> 0.25  NaN  NaN  NaN  NaN  NaN
> 0.50  NaN  NaN  NaN  NaN  NaN
> 0.75  NaN  NaN  NaN  NaN  NaN
> 4.00  NaN  NaN  NaN  NaN  NaN
</code>```

I want to replace all of values by np.arange(25).reshape(5,5)

Then I tried this:

```<code>z.values=np.arange(25).reshape(5,5)
</code>```

Result:

object.setattr(self, name, value)

AttributeError: can't set attribute

I mean I could re-create the DataFrame with values in it but it seems to be very .... ( dont know how to say).

Question:

1/ Why I can not do it ?

2/ How to solve it ?

3/ On the condition that I want every single values of z.values would be the result of multiplication of columns and rows(rows * columns). How can I do it ?

Expected result of 3/

```<code>     0.00    0.25   0.50    0.75 4.00
0.00    0       0      0       0    0
0.25    0  0.0625  0.125  0.1875    1
0.50    0   0.125   0.25   0.375    2
0.75    0  0.1875  0.375  0.5625    3
4.00    0       1      2       3   16
</code>```

Body:
At first attempt, I want to create a DataFrame but forgot to put some values:

a=[0,1/4,2/4,3/4,4]
b=[0,1/4,2/4,3/4,4]
z=DataFrame(index=a,columns=b)

Then I got this.

>      0.00 0.25 0.50 0.75 4.00
> 0.00  NaN  NaN  NaN  NaN  NaN
> 0.25  NaN  NaN  NaN  NaN  NaN
> 0.50  NaN  NaN  NaN  NaN  NaN
> 0.75  NaN  NaN  NaN  NaN  NaN
> 4.00  NaN  NaN  NaN  NaN  NaN

I want to replace all of values by np.arange(25).reshape(5,5)

Then I tried this:

z.values=np.arange(25).reshape(5,5)

Result:

object.setattr(self, name, value)

AttributeError: can't set attribute

I mean I could re-create the DataFrame with values in it but it seems to be very .... ( dont know how to say).

Question:

1/ Why I can not do it ?

2/ How to solve it ?

3/ On the condition that I want every single values of z.values would be the result of multiplication of columns and rows(rows * columns). How can I do it ?

Expected result of 3/

     0.00    0.25   0.50    0.75 4.00
0.00    0       0      0       0    0
0.25    0  0.0625  0.125  0.1875    1
0.50    0   0.125   0.25   0.375    2
0.75    0  0.1875  0.375  0.5625    3
4.00    0       1      2       3   16

Body:
Try this:

>>> import pandas as pd
>>> df = pd.DataFrame(np.arange(25).reshape(5,5))
>>> df
    0   1   2   3   4
0   0   1   2   3   4
1   5   6   7   8   9
2  10  11  12  13  14
3  15  16  17  18  19
4  20  21  22  23  24
>>> a=[0,1/4,2/4,3/4,4]
>>> b=[0,1/4,2/4,3/4,4]
>>> df.columns = a
>>> df.index = b
>>> df
      0.00  0.25  0.50  0.75  4.00
0.00     0     1     2     3     4
0.25     5     6     7     8     9
0.50    10    11    12    13    14
0.75    15    16    17    18    19
4.00    20    21    22    23    24

UPDATED

A little easy one:

>>> df = pd.DataFrame(np.arange(25).reshape(5,5),index=a,columns=b)
>>> df
      0.00  0.25  0.50  0.75  4.00
0.00     0     1     2     3     4
0.25     5     6     7     8     9
0.50    10    11    12    13    14
0.75    15    16    17    18    19
4.00    20    21    22    23    24


问:
Opencart code editing using IDE is not working
I am trying to configure OpenCart 3 and want to customise it's UI. But any change that I make in the code using netbeans IDE is not getting reflected. I tried adding an image in header.twig but the image did not appear. However when I do the same from it's admin panels the change takes place immediately.
Am I doing something wrong?
Thanks!</p>

答:
The problem here was that opencart 3 uses template caching and thus any change I made was not reflecting. So to solve the problem:

Go to the admin account then a gear icon and turn off caching for template and scss.

Go to system/storage/cache delete everything and you are good to go.


问:
Wildcard subdomains, block all other
I'm having a few issues with my new VPS just bought. I'm trying to configure Apache to accept wildcare subdomains on my main website, but allowing this also means that I can't block all others except the one created.

To be more explicit, I'm having this:

subdomain1.domain.com -> redirects correctly (CNAME added, folder ok, everything ok)
subdomain2.domain.com -> same as subdomain1

subdomainN.domain.com -> the subdomainN doesn't exist. Thus, if I write "stackoverflowreallyrocks.domain.com" I'm being redirect to my stackoverflowreallyrocks.domain.com, with the content of domain.com - which isn't good.

Is there a way to redirect all subdomains that doesn't exists to domain.com?

The httpd.conf for the main domain is:

```<code><VirtualHost *:80>
    DocumentRoot "/home/domain"
    ServerName www.domain.com
    ServerAlias domain.com
</Virtualhost>
<VirtualHost *:80>
    ServerName subdomain1.domain.com
    DocumentRoot "/home/domain/_subdomain1"
</VirtualHost>
<VirtualHost *:80>
    ServerName subdomain2.domain.com
    DocumentRoot "/home/domain/_domain2"
</VirtualHost>
</code>```

答:
Try adding another VirtualHost to the bottom of the config:

```<code><VirtualHost *:80>
    ServerName *
    ServerAlias *
</Virtualhost>
</code>```

The other VirtualHost entries should still match as they are better matches, and are prior to the wildcard host, allowing non-matching requests to fall into this last VirtualHost

Title: Wildcard subdomains, block all other

Body:
I'm having a few issues with my new VPS just bought. I'm trying to configure Apache to accept wildcare subdomains on my main website, but allowing this also means that I can't block all others except the one created.

To be more explicit, I'm having this:

subdomain1.domain.com -> redirects correctly (CNAME added, folder ok, everything ok)
subdomain2.domain.com -> same as subdomain1

subdomainN.domain.com -> the subdomainN doesn't exist. Thus, if I write "stackoverflowreallyrocks.domain.com" I'm being redirect to my stackoverflowreallyrocks.domain.com, with the content of domain.com - which isn't good.

Is there a way to redirect all subdomains that doesn't exists to domain.com?

The httpd.conf for the main domain is:

<VirtualHost *:80>
    DocumentRoot "/home/domain"
    ServerName www.domain.com
    ServerAlias domain.com
</Virtualhost>
<VirtualHost *:80>
    ServerName subdomain1.domain.com
    DocumentRoot "/home/domain/_subdomain1"
</VirtualHost>
<VirtualHost *:80>
    ServerName subdomain2.domain.com
    DocumentRoot "/home/domain/_domain2"
</VirtualHost>

Body:
Try adding another VirtualHost to the bottom of the config:

<VirtualHost *:80>
    ServerName *
    ServerAlias *
</Virtualhost>

The other VirtualHost entries should still match as they are better matches, and are prior to the wildcard host, allowing non-matching requests to fall into this last VirtualHost


问:
Python - Selenium WebDriverWait does not work without breakpoint
I'm trying to collect some data from

```<code>https://www.91mobiles.com/phonefinder.php
</code>```

I have to wait for an ajax call in order to get the 'next' button, but WebDriverWait seems ignored (does not get hit) without a breakpoint.
It used to work 2 weeks back then, but now it doesn't.

I thought it is the web driver -> change to chrome instead of firefox but result is the same

Update every packages to latest -> same

Tried to use C# with same implementation -> works, I don't know why
=> wrap it up, maybe the problem is not at their website

C# syntax:

```<code>Driver.ExecuteScript("window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: 'smooth' });");

Wait.Until(s => s.FindElement(By.CssSelector('div#finder_pagination>div.listing-btns>div.listing-btns4>span')));

Driver.ExecuteScript("window.scrollTo({ top: 0, behavior: 'smooth' });");
// Work as expected
...
</code>```

Python syntax:

```<code># Scroll to bottom for AJAX loading
self.browser.execute_script('window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: "smooth" });')

# timeout is 30 seconds, execution will be delayed until the 'NEXT' button found
self.wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, 'div#finder_pagination>div.listing-btns>div.listing-btns4>span')))

# after that, scroll back to top
self.browser.execute_script('window.scrollTo({ top: 0, behavior: "smooth" });')
# The web does not wait, it scroll right away and execute the next code
...
</code>```

Thanks in advance

答:
Your code works fine on my end, but here where I believe might cause the issue.
In your wait.until() you are using presence_of_element_located.

As you stated it was working before and does not work anymore. My guess is that the element is found but was not fully loaded then you called to scroll on top which did not make the element appear.

Another method of EC is visibility_of_element_located. This one will use same logic as the presence.. but will only return the element once it is allow visible using

```<code>is_disaplayed()
</code>```

Change your code to use this method instead:

```<code>driver.get('https://www.91mobiles.com/phonefinder.php')
driver.execute_script('window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: "smooth" });')
wait = WebDriverWait(driver, 30)
# timeout is 30 seconds, execution will be delayed until the 'NEXT' button found
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '#finder_pagination .listing-btns4')))

# after that, scroll back to top
driver.execute_script('window.scrollTo({ top: 0, behavior: "smooth" });')
</code>```

Your css_selector was working but as you can see I have changed it for a simpler and more readable one.

Body:
I'm trying to collect some data from

https://www.91mobiles.com/phonefinder.php

I have to wait for an ajax call in order to get the 'next' button, but WebDriverWait seems ignored (does not get hit) without a breakpoint.
It used to work 2 weeks back then, but now it doesn't.

I thought it is the web driver -> change to chrome instead of firefox but result is the same

Update every packages to latest -> same

Tried to use C# with same implementation -> works, I don't know why
=> wrap it up, maybe the problem is not at their website

C# syntax:

Driver.ExecuteScript("window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: 'smooth' });");

Wait.Until(s => s.FindElement(By.CssSelector('div#finder_pagination>div.listing-btns>div.listing-btns4>span')));

Driver.ExecuteScript("window.scrollTo({ top: 0, behavior: 'smooth' });");
// Work as expected
...

Python syntax:

# Scroll to bottom for AJAX loading
self.browser.execute_script('window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: "smooth" });')

# timeout is 30 seconds, execution will be delayed until the 'NEXT' button found
self.wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, 'div#finder_pagination>div.listing-btns>div.listing-btns4>span')))

# after that, scroll back to top
self.browser.execute_script('window.scrollTo({ top: 0, behavior: "smooth" });')
# The web does not wait, it scroll right away and execute the next code
...

Thanks in advance

Body:
Your code works fine on my end, but here where I believe might cause the issue.
In your wait.until() you are using presence_of_element_located.

As you stated it was working before and does not work anymore. My guess is that the element is found but was not fully loaded then you called to scroll on top which did not make the element appear.

Another method of EC is visibility_of_element_located. This one will use same logic as the presence.. but will only return the element once it is allow visible using

is_disaplayed()

Change your code to use this method instead:

driver.get('https://www.91mobiles.com/phonefinder.php')
driver.execute_script('window.scrollTo({ top: document.body.scrollHeight || document.documentElement.scrollHeight, behavior: "smooth" });')
wait = WebDriverWait(driver, 30)
# timeout is 30 seconds, execution will be delayed until the 'NEXT' button found
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '#finder_pagination .listing-btns4')))

# after that, scroll back to top
driver.execute_script('window.scrollTo({ top: 0, behavior: "smooth" });')

Your css_selector was working but as you can see I have changed it for a simpler and more readable one.


问:
How is possible build apk in terminal with different SIGN credentials
I have build.gradle that can have signingConfigs, but I want TO ignore this setting and use other credentials. I don't want to edit or replace values in build.gradle.

Does gradle have same command like gradle assemble -storeFile='PATH' -storePassword='password' -keyAlias='alias' -keyPassword='password'?

If it's no way create signed apk with other signingConfigs, is it possible to create unsigned apk?

答:
There is no gradle build command which takes sign configs.
You have two options based on the requirement you mentioned in your question.

1.Edit the build.gradle to create multiple build flavors and provide different signing details for each build flavor.

```<code>    android {
    signingConfigs {
        abc {
            keyAlias 'abc'
            keyPassword 'yyy'
            storeFile file('keystore/astro.keystore')
            storePassword 'zzz'
        }
        xyz {
            keyAlias 'xxx'
            keyPassword 'xxx'
            storeFile file('keystore/sample.keystore')
            storePassword 'xxx'
        }
        //add another block for new customer
    }}
</code>```

Create multiple copies of keystore properties file with different signing config and when you want to use one particular copy of keystore.properties file, rename it to "keystore.properties".

def keystorePropertiesFile = rootProject.file("keystore.properties")

https://developer.android.com/studio/publish/app-signing#secure-shared-keystore

Body:
There is no gradle build command which takes sign configs.
You have two options based on the requirement you mentioned in your question.

1.Edit the build.gradle to create multiple build flavors and provide different signing details for each build flavor.

    android {
    signingConfigs {
        abc {
            keyAlias 'abc'
            keyPassword 'yyy'
            storeFile file('keystore/astro.keystore')
            storePassword 'zzz'
        }
        xyz {
            keyAlias 'xxx'
            keyPassword 'xxx'
            storeFile file('keystore/sample.keystore')
            storePassword 'xxx'
        }
        //add another block for new customer
    }}

Create multiple copies of keystore properties file with different signing config and when you want to use one particular copy of keystore.properties file, rename it to "keystore.properties".

def keystorePropertiesFile = rootProject.file("keystore.properties")

https://developer.android.com/studio/publish/app-signing#secure-shared-keystore


问:
Prevent springboot failsafe plugin default execution
I have a sample springboot java application.
This is my pom file

```<code>    <groupId>com.sample.this</groupId>
    <artifactId>example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.2.RELEASE</version>
    </parent>

<profiles>
    <profile>
        <id>profile1</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>id1</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>
</code>```

When I run mvn verify -Pprofile1, the failsafe plugin runs twice.

Here are the logs -

```<code>[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ junit.example ---
.
.
.
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---
</code>```

When I remove springboot starter parent pom, then the failsafe plugin runs once as expected. Here is that log -

```<code>[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---
</code>```

So, springboot runs its default failsafe plugin in integration-test phase if it doesnt find one in my pom.

I cant add a default execution step in my failsafe plugin declaration.
How do I stop springboot to stop running its failsafe plugin ?

I can add this in my pom to make it work -

```<code>                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                        <configuration>
                            <skipITs>true</skipITs>
                        </configuration>
                    </execution>
</code>```

But this doesnt look intuitive .

Is there any other way around ?

I dont want to add springboot plugin in my pom file

答:
Following could be the solution where groupId and execution id tags are removed:

```<code>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.2.RELEASE</version>
    </parent>

    <profiles>
        <profile>
            <id>profile1</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</code>```

When mvn verify -Pprofile1 is executed with above changes then following is the result:

```<code>
[INFO] ------------------------------------------------------------------------
[INFO] Building test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ test ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.1:verify (default) @ test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

</code>```

Body:
I have a sample springboot java application.
This is my pom file

    <groupId>com.sample.this</groupId>
    <artifactId>example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.2.RELEASE</version>
    </parent>

<profiles>
    <profile>
        <id>profile1</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>id1</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

When I run mvn verify -Pprofile1, the failsafe plugin runs twice.

Here are the logs -

[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ junit.example ---
.
.
.
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---

When I remove springboot starter parent pom, then the failsafe plugin runs once as expected. Here is that log -

[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---

So, springboot runs its default failsafe plugin in integration-test phase if it doesnt find one in my pom.

I cant add a default execution step in my failsafe plugin declaration.
How do I stop springboot to stop running its failsafe plugin ?

I can add this in my pom to make it work -

                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                        <configuration>
                            <skipITs>true</skipITs>
                        </configuration>
                    </execution>

But this doesnt look intuitive .

Is there any other way around ?

I dont want to add springboot plugin in my pom file

Body:
Following could be the solution where groupId and execution id tags are removed:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.2.RELEASE</version>
    </parent>

    <profiles>
        <profile>
            <id>profile1</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

When mvn verify -Pprofile1 is executed with above changes then following is the result:

[INFO] ------------------------------------------------------------------------
[INFO] Building test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ test ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.1:verify (default) @ test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------


问:
How I Can insert images on Captured video in Python
I captured video using cv2.VideoCapured and display. Captured Video display on same time not saved. How I can insert image on this captured video for display on same time.</p>

答:
Assuming you want to add image directly to video frames at a certain x,y location without doing any color blending or image transparency. you can use the following python code:

```<code>#!/usr/bin/python3

import cv2

# load the overlay image. size should be smaller than video frame size
img = cv2.imread('logo.png')

# Get Image dimensions
img_height, img_width, _ = img.shape

# Start Capture
cap = cv2.VideoCapture(0)

# Get frame dimensions
frame_width  = cap.get(cv2.CAP_PROP_FRAME_WIDTH )
frame_height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT )

# Print dimensions
print('image dimensions (HxW):',img_height,"x",img_width)
print('frame dimensions (HxW):',int(frame_height),"x",int(frame_width))

# Decide X,Y location of overlay image inside video frame.
# following should be valid:
#   * image dimensions must be smaller than frame dimensions
#   * x+img_width <= frame_width
#   * y+img_height <= frame_height
# otherwise you can resize image as part of your code if required

x = 50
y = 50

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()

    # add image to frame
    frame[ y:y+img_height , x:x+img_width ] = img

    # Display the resulting frame
    cv2.imshow('frame',frame)

    # Exit if ESC key is pressed
    if cv2.waitKey(20) & 0xFF == 27:
        break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
</code>```

Please give more details if my assumption was wrong.

Body:
Assuming you want to add image directly to video frames at a certain x,y location without doing any color blending or image transparency. you can use the following python code:

#!/usr/bin/python3

import cv2

# load the overlay image. size should be smaller than video frame size
img = cv2.imread('logo.png')

# Get Image dimensions
img_height, img_width, _ = img.shape

# Start Capture
cap = cv2.VideoCapture(0)

# Get frame dimensions
frame_width  = cap.get(cv2.CAP_PROP_FRAME_WIDTH )
frame_height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT )

# Print dimensions
print('image dimensions (HxW):',img_height,"x",img_width)
print('frame dimensions (HxW):',int(frame_height),"x",int(frame_width))

# Decide X,Y location of overlay image inside video frame.
# following should be valid:
#   * image dimensions must be smaller than frame dimensions
#   * x+img_width <= frame_width
#   * y+img_height <= frame_height
# otherwise you can resize image as part of your code if required

x = 50
y = 50

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()

    # add image to frame
    frame[ y:y+img_height , x:x+img_width ] = img

    # Display the resulting frame
    cv2.imshow('frame',frame)

    # Exit if ESC key is pressed
    if cv2.waitKey(20) & 0xFF == 27:
        break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()

Please give more details if my assumption was wrong.