snowflakedb / pdo_snowflake

PHP PDO driver for snowflake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SNOW-361121: PHP 7.2 EOL - Install on newer versions is problematic

pedro-stanaka opened this issue · comments

I am trying to follow the instructions to install the PDO extension, but for PHP 7.4 and 8.0 (since PHP 7.2 is at End Of Life and we dont use it anymore at my company) [1]. For both versions I am getting no success with the installation (here are results from make test for PHP 7.4 - https://gist.github.com/pedro-stanaka/07a2af2dd7cb52078684d96472f75ec7).

I would like to know if @snowflakedb will continue to support this library or if we should consider migrating to other language/driver?

When finished to build, I am getting the following error:

/tmp/pdo_snowflake-1.0.1 # $PHP_HOME/bin/php -dextension=modules/pdo_snowflake.so -m | grep pdo_snowflake
PHP Warning:  PHP Startup: Unable to load dynamic library 'modules/pdo_snowflake.so' (tried: modules/pdo_snowflake.so (Error relocating modules/pdo_snowflake.so: setcontext: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/modules/pdo_snowflake.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/modules/pdo_snowflake.so.so: No such file or directory)) in Unknown on line 0

Here is minimal dockerfile to reproduce the problem:

FROM php:7.4-fpm-alpine

USER root

# Install snowflake-pdo
RUN curl -L https://github.com/snowflakedb/pdo_snowflake/archive/refs/tags/v1.0.1.tar.gz -o /tmp/snowflake-pdo.tar.gz \
    && apk add --no-cache --update bash \
    && cd /tmp \
    && mkdir /tmp/pdo-snowflake \
    && tar -xf snowflake-pdo.tar.gz \
    && cd pdo_snowflake-1.0.1 \
    && export PHP_HOME=$(dirname $(dirname "$(which phpize)")) \
    && chmod +x scripts/* \
    && apk add --update --no-cache ${PHPIZE_DEPS} cmake \
    && ./scripts/build_pdo_snowflake.sh \
    && make test

[1] https://www.php.net/supported-versions.php

@sfc-gh-abhatnagar Experiencing same issue. Are you guys planning on supporting php 7.4 ?

FWIW - Works fine inside our Docker Container build with php:7.4.7-apache under Ubuntu. However, the container fails to build on Mac M1 Silicon, locally. It's fone on Mac Intel, Windows, Linux otherwise.

Will php 7.4 be supported?

I'm running into the same issue on PHP 7.4.20 in docker container running php:7.4-cli-alpine3.13 image.

Currently PHP < 8 is not supported