libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
532 stars 304 forks source link

Failed to build use arm-none-eabi-gcc #176

Closed Fidetro closed 3 years ago

Fidetro commented 3 years ago

I want to build arm static and use following command to build libplist for DTK,

./autogen.sh --host=arm-none-eabi-gcc

but error:

glibtoolize: putting auxiliary files in '.'.
glibtoolize: linking file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: linking file 'm4/libtool.m4'
glibtoolize: linking file 'm4/ltoptions.m4'
glibtoolize: linking file 'm4/ltsugar.m4'
glibtoolize: linking file 'm4/ltversion.m4'
glibtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:29: installing './compile'
configure.ac:6: installing './missing'
cython/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-gcc-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for arm-none-eabi-gcc-gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of clang... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking dependency style of clang++... gcc3
checking whether clang++ is available and compiles a program... yes
checking build system type... x86_64-apple-darwin20.1.0
checking host system type... Invalid configuration `arm-none-eabi-gcc': OS `gcc' not recognized
configure: error: /bin/sh ./config.sub arm-none-eabi-gcc failed

Can someone tell me what to do?

Thanks

nikias commented 3 years ago

Try setting CC=/path/to/your/cross/compiler/bin/gcc

Fidetro commented 3 years ago

@nikias Is not worked.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libplist configure 2.2.1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure CC=arm-none-eabi-gcc

## --------- ##
## Platform. ##
## --------- ##

hostname = karimzhangs-Mac.local
uname -m = x86_64
uname -r = 20.1.0
uname -s = Darwin
uname -v = Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:18 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8020

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:18 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8020
Kernel configured for up to 4 processors.
4 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 423 tasks, 1850 threads, 8 processors
Load average: 2.19, Mach factor: 5.80
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Library/Apple/usr/bin
PATH: /usr/local/arm-none-eabi/bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2562: checking for a BSD-compatible install
configure:2630: result: /usr/bin/install -c
configure:2641: checking whether build environment is sane
configure:2696: result: yes
configure:2847: checking for a thread-safe mkdir -p
configure:2886: result: ./install-sh -c -d
configure:2893: checking for gawk
configure:2923: result: no
configure:2893: checking for mawk
configure:2923: result: no
configure:2893: checking for nawk
configure:2923: result: no
configure:2893: checking for awk
configure:2909: found /usr/bin/awk
configure:2920: result: awk
configure:2931: checking whether make sets $(MAKE)
configure:2953: result: yes
configure:2982: checking whether make supports nested variables
configure:2999: result: yes
configure:3136: checking whether make supports nested variables
configure:3153: result: yes
configure:3233: checking for gcc
configure:3260: result: arm-none-eabi-gcc
configure:3489: checking for C compiler version
configure:3498: arm-none-eabi-gcc --version >&5
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3509: $? = 0
configure:3498: arm-none-eabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: /tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native --libexecdir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/lib --infodir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-9-pipeline-100_20191030_1572397548/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 9-2019-q4-major' --with-multilib-list=rmprofile
Thread model: single
gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 
configure:3509: $? = 0
configure:3498: arm-none-eabi-gcc -V >&5
arm-none-eabi-gcc: error: unrecognized command line option '-V'
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3509: $? = 1
configure:3498: arm-none-eabi-gcc -qversion >&5
arm-none-eabi-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3509: $? = 1
configure:3529: checking whether the C compiler works
configure:3551: arm-none-eabi-gcc    conftest.c  >&5
conftest.c:12:1: internal compiler error: in darwin_gt_pch_use_address, at config/host-darwin.c:51
   12 | int
      | ^~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
configure:3555: $? = 1
configure:3593: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libplist"
| #define PACKAGE_TARNAME "libplist"
| #define PACKAGE_VERSION "2.2.1"
| #define PACKAGE_STRING "libplist 2.2.1"
| #define PACKAGE_BUGREPORT "https://github.com/libimobiledevice/libplist/issues"
| #define PACKAGE_URL "https://libimobiledevice.org"
| #define PACKAGE "libplist"
| #define VERSION "2.2.1"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3598: error: in `/Users/karimzhang/Desktop/libplist':
configure:3600: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-none-eabi-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_PYTHON_VERSION_set=
ac_cv_env_PYTHON_VERSION_value=
ac_cv_env_PYTHON_set=
ac_cv_env_PYTHON_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=arm-none-eabi-gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /Users/karimzhang/Desktop/libplist/missing aclocal-1.16'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /Users/karimzhang/Desktop/libplist/missing autoconf'
AUTOHEADER='${SHELL} /Users/karimzhang/Desktop/libplist/missing autoheader'
AUTOMAKE='${SHELL} /Users/karimzhang/Desktop/libplist/missing automake-1.16'
AWK='awk'
BUILD_FUZZERS_FALSE=''
BUILD_FUZZERS_TRUE=''
CC='arm-none-eabi-gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
CYTHON=''
CYTHON_LIB=''
CYTHON_PLIST_INCLUDE_DIR=''
CYTHON_PYTHON_CPPFLAGS=''
CYTHON_PYTHON_OPT=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GLOBAL_CFLAGS=''
GLOBAL_LDFLAGS=''
GREP=''
HAVE_CYTHON_FALSE=''
HAVE_CYTHON_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBPLIST_SO_VERSION='6:0:3'
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAKEINFO='${SHELL} /Users/karimzhang/Desktop/libplist/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='libplist'
PACKAGE_BUGREPORT='https://github.com/libimobiledevice/libplist/issues'
PACKAGE_NAME='libplist'
PACKAGE_STRING='libplist 2.2.1'
PACKAGE_TARNAME='libplist'
PACKAGE_URL='https://libimobiledevice.org'
PACKAGE_VERSION='2.2.1'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
PTHREAD_CC=''
PTHREAD_CFLAGS=''
PTHREAD_LIBS=''
PYTHON=''
PYTHON_CPPFLAGS=''
PYTHON_EXEC_PREFIX=''
PYTHON_EXTRA_LDFLAGS=''
PYTHON_EXTRA_LIBS=''
PYTHON_LIBS=''
PYTHON_PLATFORM=''
PYTHON_PREFIX=''
PYTHON_SITE_PKG=''
PYTHON_VERSION=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='2.2.1'
WIN32_FALSE=''
WIN32_TRUE=''
ac_ct_AR=''
ac_ct_CC='arm-none-eabi-gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
ax_pthread_config=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/karimzhang/Desktop/libplist/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgpyexecdir=''
pkgpythondir=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
pyexecdir=''
pythondir=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "libplist"
#define PACKAGE_TARNAME "libplist"
#define PACKAGE_VERSION "2.2.1"
#define PACKAGE_STRING "libplist 2.2.1"
#define PACKAGE_BUGREPORT "https://github.com/libimobiledevice/libplist/issues"
#define PACKAGE_URL "https://libimobiledevice.org"
#define PACKAGE "libplist"
#define VERSION "2.2.1"

configure: exit 77