为Android arm64-v8a构建POCO失败

时间:2019-05-13 06:15:58

标签: android poco arm64 poco-libraries

我需要为Android arm64-v8a构建POCO库,但是构建过程因以下错误而失败:“未知目标ABI'lp64'”。我使用POCO lib 1.8.1,系统Ubuntu 16.04

我已完成的步骤:

  1. 使用以下参数在poco文件夹中调用.configure:

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

  2. 使用命令进行创建:

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

用于配置命令的配置文件“ Android-arm64-v8a-clang”是我根据此poco github issue创建的,看起来像这样:

#
# $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++

来自构建的日志如下:

** 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

谢谢

2 个答案:

答案 0 :(得分:0)

我通过更改在Android-arm64-v8a-clang配置中为arm64-v8a定义archflags的行来解决了该问题 来自

ARCHFLAGS = -mabi=lp64 -march=armv8-a

ARCHFLAGS = -march=armv8-a

答案 1 :(得分:0)

对于所有平台,都有一个定义文件CXXFLAGS,当根据平台进行每个更改时,例如对于Android,其build / config / Android 为了制作x86_64和arm64_v8a的版本,我用以下详细信息修改了文件。

  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

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.