-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-963813: AWS Arm processor support for PDO driver #351
Comments
I'm having the same issue with an M3 processor. Is the only workaround to use the OBDC driver? This is very frustrating. |
Update: I've managed to get this working in Docker via the Rosetta emulation (adding docker-compose: services:
php:
build:
context: docker/php
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ./:/var/www/symfony:cached
networks:
- my_app
platform: linux/x86_64 Dockerfile: FROM php:8.2-fpm-buster
ARG TIMEZONE
COPY php.ini /usr/local/etc/php/conf.d/docker-php-config.ini
ENV PHP_HOME="/usr/local/bin"
# I've no idea why this is needed
RUN pear config-set php_ini "/usr/local/etc/php/conf.d/docker-php-config.ini"
RUN apt-get update && apt-get install -y \
gnupg \
g++ \
procps \
openssl \
git \
unzip \
zlib1g-dev \
libzip-dev \
libfreetype6-dev \
libpng-dev \
libjpeg-dev \
libicu-dev \
libonig-dev \
libxslt1-dev \
acl \
cmake \
&& echo 'alias sf="php bin/console"' >> ~/.bashrc
#Postgres PDO driver install and init
RUN apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql
####### SNOWFLAKE CONFIG START #######
# Source: https://devilbox.discourse.group/t/how-to-setup-snowflake-pdo/710
RUN mkdir /tmp/snowflake \
&& git clone https://github.com/snowflakedb/pdo_snowflake.git /tmp/snowflake
RUN export PHP_HOME \
&& bash /tmp/snowflake/scripts/build_pdo_snowflake.sh \
&& cp /tmp/snowflake/libsnowflakeclient/cacert.pem /tmp/snowflake/modules/pdo_snowflake.so /usr/local/lib/php/extensions/no-debug-non-zts-*/ \
&& mkdir /etc/php-snowflake \
&& cp /tmp/snowflake/libsnowflakeclient/cacert.pem /etc/php-snowflake/cacert.pem \
&& rm -rf /tmp/snowflakeindex
# Snowflake is also included in php.ini (see line 5)
####### SNOWFLAKE CONFIG END #######
# Set timezone
RUN ln -snf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && echo ${TIMEZONE} > /etc/timezone \
&& printf '[PHP]\ndate.timezone = "%s"\n', ${TIMEZONE} > /usr/local/etc/php/conf.d/tzone.ini \
&& "date"
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Set work directory
WORKDIR /var/www/symfony |
Most build problems exists because this repository used prebuilt libraries dependencies instead of letting us build them on our own, which increases quite a bit repository size and prevents this extension to be distributed on distros. |
hi and thank you for submitting this issue ! since there's now an enhancement request open - and i'll keep this thread posted with the progress if any. Thank you for bearing with us ! |
@sfc-gh-dszmolka are there any tricks to getting the Mac ARM64 support going? I'm running into the same error as SNOW-979091 (build2.txt) running the install script in a Debian Docker container on a M1 Pro processor system. |
hi @nbennett25 so checking this on a M1 Mac, this seems to happen
if you run the Debian container without forcing the platform, by default it will run as arm64 as the host M1 Mac OS. But for Linux it's not supported yet in the PHP driver. I would recommend running it as amd64 with forcing the platform as seen in the above example. Hope it helps. |
What is the current behavior?
Currently on Ubuntu on AWS the Arm64 Processors are not supported by the ODBC client. See: #299 (comment)
What is the desired behavior?
The driver should compile correctly on AWS Arm64 Linux machines.
How would this improve
pdo_snowflake
?Arm processors are widely used in hosting and on Mac. I know the Mac's have been updated for PDO but ODBC drivers still fail on Apple silicon and AWS Arm processors. ODBC and PDO should both work on both systems. This way testing on local can be as in sync with prod as possible without having to resort to special Docker containers to solve the problem.
What is your Snowflake account identifier, if any?
Happy to provide this privately. I work for Adtran, Inc. Jeremy Lemmon @ Snowflake can confirm our account etc.
I was able to get the ODBC drivers installed on AWS but would much prefer to use the native PDO so that it's the same across all our systems.
Let me know if you need further details.
The text was updated successfully, but these errors were encountered: