travis错误编译无法识别的命令行选项" -Wno-extra-semi"

时间:2015-12-04 21:28:57

标签: php travis-ci

我正在尝试安装datastax cassandra驱动程序的php扩展。 我在5.5和5.6中运行了这个测试。对于PHP 7,我有以下错误导致构建:

  

cc1:警告:无法识别的命令行选项" -Wno-extra-semi"

.travis.yml文件中的构建本身:

  - sudo apt-add-repository ppa:linuxjedi/ppa -y
  - sudo apt-get update
  - sudo apt-get install -y libuv-dev libssl-dev
  - git clone https://github.com/datastax/php-driver.git
  - cd php-driver
  - git submodule update --init
  - cd ext
  - ./install.sh

更新 按照建议:

sed -i s/-Wno-extra-semi// ./install.sh

但是现在我在构建过程中遇到了这个错误:

PHP Warning:  PHP Startup: Unable to load dynamic library '/home/travis/.phpenv/versions/7.0snapshot/lib/php/extensions/no-debug-zts-20151012/cassandra.so' - /home/travis/.phpenv/versions/7.0snapshot/lib/php/extensions/no-debug-zts-20151012/cassandra.so: cannot open shared object file: No such file or directory in Unknown on line 0

另外,如果您想知道这是./install.sh文件:

basedir=$(cd $(dirname $0); pwd)

check_executable () {
  for executable; do
    command -v $executable >/dev/null 2>&1 || {
      echo >&2 "Unable to find '$executable', make sure it is installed and is in the PATH.  Aborting."
      exit 1
    }
  done
}

check_executable cmake grep sed

set -ex

rm -Rf /tmp/php-driver-installation
mkdir /tmp/php-driver-installation
pushd /tmp/php-driver-installation

mkdir build
builddir=$(cd build; pwd)

echo "Compiling cpp-driver..."
mkdir cpp-driver
pushd cpp-driver
cmake -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_INSTALL_PREFIX:PATH=$builddir -DCASS_BUILD_STATIC=ON \
  -DCASS_BUILD_SHARED=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCASS_USE_ZLIB=ON \
  -DCMAKE_INSTALL_LIBDIR:PATH=lib $basedir/../lib/cpp-driver/
make
make install
popd
rm -Rf cpp-driver
rm -f build/lib/libcassandra.{dylib,so}
mv build/lib/libcassandra_static.a build/lib/libcassandra.a

popd

echo "Compiling and installing the extension..."
phpize

echo ./configure --with-cassandra=$builddir --with-libdir=lib
LIBS="-lssl -lz -luv -lm -lstdc++" LDFLAGS="-L$builddir/lib" ./configure --with-cassandra=$builddir --with-libdir=lib
make
make install

rm -Rf /tmp/php-driver-installation

0 个答案:

没有答案