pdo_snowflake
pdo_snowflake copied to clipboard
error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
Following the steps in the readme i'm encountering the following error. This is a terrible bug report (Sorry) because I don't know what further details to provide.
I successfully built PHP and cloned pdo_snowflake
I did also try omitting -r
which (unsurpisingly, I guess) failed on clang: error: no such file or directory: 'libsnowflakeclient/cmake-build/libsnowflakeclient.a'
-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
libcurl is located at /usr/local/lib/libcurl.a
libssl is located at /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/deps-build/linux/openssl/lib/libssl.a
libcrypto is located at /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/deps-build/linux/openssl/lib/libcrypto.a
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build
/usr/local/Cellar/cmake/3.7.1/bin/cmake -H/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient -B/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_progress_start /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build/CMakeFiles /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build/CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/snowflakeclient.dir/build.make CMakeFiles/snowflakeclient.dir/depend
cd /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build && /usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/cmake-build/CMakeFiles/snowflakeclient.dir/DependInfo.cmake --color=
Scanning dependencies of target snowflakeclient
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/snowflakeclient.dir/build.make CMakeFiles/snowflakeclient.dir/build
[ 1%] Building C object CMakeFiles/snowflakeclient.dir/lib/client.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -DLOG_USE_COLOR -I/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/deps-build/linux/curl/include -I/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/deps-build/linux/openssl/include -I/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/include -g -pthread -fPIC -Werror -std=gnu90 -o CMakeFiles/snowflakeclient.dir/lib/client.c.o -c /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/lib/client.c
In file included from /Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/lib/client.c:17:
/Users/ntaylor/src/pdo_snowflake/libsnowflakeclient/lib/connection.h:338:46: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
ARRAY_LIST *json_get_object_keys(const cJSON const *item);
^~~~~~
1 error generated.
make[2]: *** [CMakeFiles/snowflakeclient.dir/lib/client.c.o] Error 1
make[1]: *** [CMakeFiles/snowflakeclient.dir/all] Error 2
make: *** [all] Error 2```
Thanks for reporting an issue. Actually PHP PDO is still under development, and I even tried to build it on Mac yet. Will cover soon. Stay tuned.
Cool. I'm looking forward to giving it a try! I tried on an Ubuntu VM and ran into issues there as well. For now I am using exec('snowsql blahblah')
which works.
Could you provide the details about Ubuntu issues? I’m about to try
On Sun, Jan 7, 2018 at 06:51 Nat Taylor [email protected] wrote:
Cool. I'm looking forward to giving it a try! I tried on an Ubuntu VM and ran into issues there as well. For now I am using exec('snowsql blahblah') which works.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/snowflakedb/pdo_snowflake/issues/124#issuecomment-355827849, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKWZcQp5B-1i8pLQcNmYlvxv1kv-Qezks5tINnsgaJpZM4RVdUy .
-- Shige Takeda [email protected]
I admit, I am not your best beta tester because I am inexperienced with make
etc. I just follow instructions :)
In Ubuntu I got past building and on to make
ing...
/bin/bash /home/vagrant/src/pdo_snowflake/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/vagrant/src/pdo_snowflake -DPHP_ATOM_INC -I/home/vagrant/src/pdo_snowflake/include -I/home/vagrant/src/pdo_snowflake/main -I/home/vagrant/src/pdo_snowflake -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/home/vagrant/src/pdo_snowflake/libsnowflakeclient/include -DHAVE_CONFIG_H -std=c99 -Werror -g -O2 -c /home/vagrant/src/pdo_snowflake/pdo_snowflake.c -o pdo_snowflake.lo
libtool: compile: cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/vagrant/src/pdo_snowflake -DPHP_ATOM_INC -I/home/vagrant/src/pdo_snowflake/include -I/home/vagrant/src/pdo_snowflake/main -I/home/vagrant/src/pdo_snowflake -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/home/vagrant/src/pdo_snowflake/libsnowflakeclient/include -DHAVE_CONFIG_H -std=c99 -Werror -g -O2 -c /home/vagrant/src/pdo_snowflake/pdo_snowflake.c -fPIC -DPIC -o .libs/pdo_snowflake.o
/home/vagrant/src/pdo_snowflake/pdo_snowflake.c: In function 'zm_startup_pdo_snowflake':
/home/vagrant/src/pdo_snowflake/pdo_snowflake.c:52:5: error: implicit declaration of function 'PDO_SNOWFLAKE_G' [-Werror=implicit-function-declaration]
/home/vagrant/src/pdo_snowflake/pdo_snowflake.c:52:17: error: initialization makes pointer from integer without a cast [-Werror]
/home/vagrant/src/pdo_snowflake/pdo_snowflake.c:53:20: error: initialization makes pointer from integer without a cast [-Werror]
cc1: all warnings being treated as errors
make: *** [pdo_snowflake.lo] Error 1```
thanks. will look into the error. My ubuntu was success after fixing curl build issue, which is not critical for PHP PDO.
hmm, the cause is potentially PHP version? Currently PHP PDO for Snowflake works only on PHP 7+. I tried Xenial and worked ok (not merged the patch yet)
Now we test PDO for Snowflake on docker:
https://github.com/snowflakedb/pdo_snowflake/tree/master/docker
- Ubuntu 14.04: PHP 7.0
- Ubuntu 14.04: PHP 7.1
- Ubuntu 16.04: PHP 7.1
- Ubuntu 18.04: PHP 7.2
To clean up and re-prioritize more pressing bugs and feature requests we are closing all issues older than 6 months as of April 1, 2023. If there are any issues or feature requests that you would like us to address, please create them according to the new templates we have created. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response.