configure script in xcode fails with exit code 1

寵の児 提交于 2019-12-11 13:36:07

问题


I'm running this script as an Xcode run script to build graphviz:

if [ ! "${BUILT_PRODUCTS_DIR}/graphviz/Makefile" -nt "${SRCROOT}/graphviz/configure" ]
then
  GVROOT="${SRCROOT}/graphviz"

  # figure out optimization
  OPT="${GCC_OPTIMIZATION_LEVEL}"
  if [ -z "${OPT}" ]
    then
    OPT="s"
  fi

  FLAGS="-fexceptions -gdwarf-2 -isysroot ${SDKROOT} -miphoneos-version-min=${IPHONEOS_DEPLOYMENT_TARGET} -mthumb -O${OPT}"

  # figure out architecture
  for ARCH in ${ARCHS}
  do
    FLAGS="${FLAGS} -arch ${ARCH}"
  done

  # figure out preprocessor defines
  for DEFINITION in ${GCC_PREPROCESSOR_DEFINITIONS}
  do
    FLAGS="${FLAGS} -D${DEFINITION}"
  done

  mkdir -p ${BUILT_PRODUCTS_DIR}/graphviz
  cd ${BUILT_PRODUCTSx_DIR}/graphviz

  ${GVROOT}/configure \
    --build=${NATIVE_ARCH_ACTUAL}-apple-darwin11 \
    --host=${NATIVE_ARCH}-apple-darwin11 \
    --disable-dependency-tracking \
    --enable-shared=no \
    --enable-static=yes \
    --enable-ltdl=no \
    --enable-swig=no \
    --enable-tcl=no \
    --srcdir=${GVROOT} \
    --with-codegens=no \
    --with-graph=yes \
    --with-expat=no \
    --with-fontconfig=no \
    --with-freetype2=no \
    --with-ipsepcola=yes \
    --with-libgd=no \
    --with-quartz=yes \
    --with-visio=yes \
    --with-x=no \
    CC="${PLATFORM_DEVELOPER_BIN_DIR}/clang" \
    CPP="${PLATFORM_DEVELOPER_BIN_DIR}/clang -E" \
    CXX="${PLATFORM_DEVELOPER_BIN_DIR}/clang++" \
    OBJC="${PLATFORM_DEVELOPER_BIN_DIR}/clang" \
    LD="${PLATFORM_DEVELOPER_BIN_DIR}/ld" \
    CFLAGS="${FLAGS}" \
    CXXFLAGS="${FLAGS} -fvisibility-inlines-hidden" \
    OBJCFLAGS="${FLAGS}" 2>/dev/null
fi

I get the following compiler output:

checking build system type... x86_64-apple-darwin11
checking host system type... i386-apple-darwin11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin11-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /Users/michaelciccotti/Documents/Projects/Tests/LowGraphvix/graphviz/config/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
Command /bin/sh failed with exit code 1

How do I figure out what is going wrong?


回答1:


I figured out what was going wrong by running Xcode as root. This gave me more verbose failure messages (not sure why). My problem was that I needed to 'make distclean' because I had a previous build in the directory.



来源:https://stackoverflow.com/questions/10440273/configure-script-in-xcode-fails-with-exit-code-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!