Fatal error: 'readline/readline.h' file not found
Fatal error: 'readline/readline.h' file not found
我正在尝试使用 Autotools 为 iPhoneOS 平台编译 FreeTDS。但是,我收到错误消息:
Making all in fisql
CC fisql.o
fisql.c:29:10: fatal error: 'readline/readline.h' file not found
#include <readline/readline.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [fisql.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
我正在使用 shell 脚本来 运行 命令:
#!/bin/sh
VERSION="1.3"
SDKVERSION="14.0"
TARGETSDKVERSION="11.0"
LIB="freetds"
DEVELOPER=`xcode-select -print-path`
ARCHS="arm64"
CURRENTPATH=`pwd`
BUILD="x86_64-apple-darwin19.6.0"
OLD_PATH=$PATH
TDS_VER=7.4
cd ${LIB}-${VERSION}
unset CC
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset LD
unset CPP
for ARCH in ${ARCHS}
do
case "${ARCH}" in
"x86_64")
PLATFORM="MacOSX"
HOST="${ARCH}-apple-darwin19.6.0"
;;
"arm64")
PLATFORM="iPhoneOS"
HOST="aarch64-apple-darwin19.6.0"
;;
*)
PLATFORM="iPhoneOS"
HOST="${ARCH}-apple-darwin19.6.0"
;;
esac
SDK="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
export CC="clang"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK} -miphoneos-version-min=11.0"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$CFLAGS"
export LD=$CC
# export CFLAGS="-arch ${ARCH} -miphoneos-version-min=${TARGETSDKVERSION} -isysroot ${SDK}"
PREFIX="${CURRENTPATH}/build/${LIB}/${ARCH}"
mkdir -p ${PREFIX}
echo "Please stand by..."
./configure --prefix=$PREFIX --host=${HOST} -build=${BUILD} -with-tdsver=${TDS_VER} CFLAGS="${CFLAGS}"
echo "======== NOW LETS MAKE ========"
make clean
make && make install
echo "======== CHECK ARCH ========"
xcrun -sdk iphoneos lipo -info ${PREFIX}/lib/libsybdb.a
echo "======== CHECK DONE ========"
done
echo "== We just need static library == "
echo "== Copy headers to fat folder from i386 folder AND clean files in lib =="
cp -r ${CURRENTPATH}/build/${LIB}/i386/ ${CURRENTPATH}/build/${LIB}/Fat
rm -rf ${CURRENTPATH}/build/${LIB}/Fat/lib/*
echo "Build library - libsybdb.a"
lipo -create ${CURRENTPATH}/build/${LIB}/i386/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/armv7/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/armv7s/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/arm64/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/x86_64/lib/libsybdb.a -output ${CURRENTPATH}/build/${LIB}/Fat/lib/libsybdb.a
echo "======== CHECK FAT ARCH ========"
xcrun -sdk iphoneos lipo -info ${CURRENTPATH}/build/${LIB}/Fat/lib/libsybdb.a
echo "======== CHECK DONE ========"
echo "== Done =="
我试图通过使用自制软件安装 readline 来修复它,但到目前为止运气不好。
我知道无法找到该文件(或者它不在它应该在的地方),但我该如何修复它?
我重新安装了 readline,这解决了这个问题。
我正在尝试使用 Autotools 为 iPhoneOS 平台编译 FreeTDS。但是,我收到错误消息:
Making all in fisql
CC fisql.o
fisql.c:29:10: fatal error: 'readline/readline.h' file not found
#include <readline/readline.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [fisql.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
我正在使用 shell 脚本来 运行 命令:
#!/bin/sh
VERSION="1.3"
SDKVERSION="14.0"
TARGETSDKVERSION="11.0"
LIB="freetds"
DEVELOPER=`xcode-select -print-path`
ARCHS="arm64"
CURRENTPATH=`pwd`
BUILD="x86_64-apple-darwin19.6.0"
OLD_PATH=$PATH
TDS_VER=7.4
cd ${LIB}-${VERSION}
unset CC
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset LD
unset CPP
for ARCH in ${ARCHS}
do
case "${ARCH}" in
"x86_64")
PLATFORM="MacOSX"
HOST="${ARCH}-apple-darwin19.6.0"
;;
"arm64")
PLATFORM="iPhoneOS"
HOST="aarch64-apple-darwin19.6.0"
;;
*)
PLATFORM="iPhoneOS"
HOST="${ARCH}-apple-darwin19.6.0"
;;
esac
SDK="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
export CC="clang"
export CFLAGS="-arch ${ARCH} -isysroot ${SDK} -miphoneos-version-min=11.0"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$CFLAGS"
export LD=$CC
# export CFLAGS="-arch ${ARCH} -miphoneos-version-min=${TARGETSDKVERSION} -isysroot ${SDK}"
PREFIX="${CURRENTPATH}/build/${LIB}/${ARCH}"
mkdir -p ${PREFIX}
echo "Please stand by..."
./configure --prefix=$PREFIX --host=${HOST} -build=${BUILD} -with-tdsver=${TDS_VER} CFLAGS="${CFLAGS}"
echo "======== NOW LETS MAKE ========"
make clean
make && make install
echo "======== CHECK ARCH ========"
xcrun -sdk iphoneos lipo -info ${PREFIX}/lib/libsybdb.a
echo "======== CHECK DONE ========"
done
echo "== We just need static library == "
echo "== Copy headers to fat folder from i386 folder AND clean files in lib =="
cp -r ${CURRENTPATH}/build/${LIB}/i386/ ${CURRENTPATH}/build/${LIB}/Fat
rm -rf ${CURRENTPATH}/build/${LIB}/Fat/lib/*
echo "Build library - libsybdb.a"
lipo -create ${CURRENTPATH}/build/${LIB}/i386/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/armv7/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/armv7s/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/arm64/lib/libsybdb.a ${CURRENTPATH}/build/${LIB}/x86_64/lib/libsybdb.a -output ${CURRENTPATH}/build/${LIB}/Fat/lib/libsybdb.a
echo "======== CHECK FAT ARCH ========"
xcrun -sdk iphoneos lipo -info ${CURRENTPATH}/build/${LIB}/Fat/lib/libsybdb.a
echo "======== CHECK DONE ========"
echo "== Done =="
我试图通过使用自制软件安装 readline 来修复它,但到目前为止运气不好。 我知道无法找到该文件(或者它不在它应该在的地方),但我该如何修复它?
我重新安装了 readline,这解决了这个问题。