Skip to content
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-919763: Unable to build the driver for v1.2.7 on linux, unused-functions #339

Closed
vaikas opened this issue Sep 20, 2023 · 1 comment
Closed
Assignees
Labels
duplicate enhancement The issue is a request for improvement or a new feature

Comments

@vaikas
Copy link

vaikas commented Sep 20, 2023

I'm trying to build the driver of the latest release (v1.2.7) from this commit:
b68db72

But it's failing like this:

⚠️  aarch64   | /home/build/snowflake_driver.c: In function 'pdo_snowflake_get_attribute':
⚠️  aarch64   | /home/build/snowflake_driver.c:397:30: error: unused variable 'H' [-Werror=unused-variable]
⚠️  aarch64   |   397 |     pdo_snowflake_db_handle *H = (pdo_snowflake_db_handle *) dbh->driver_data;
⚠️  aarch64   |       |                              ^
⚠️  aarch64   | /home/build/snowflake_driver.c: In function 'pdo_snowflake_handle_factory':
⚠️  aarch64   | /home/build/snowflake_driver.c:539:15: error: unused variable 'int_attr_value' [-Werror=unused-variable]
⚠️  aarch64   |   539 |         int64 int_attr_value = 0;
⚠️  aarch64   |       |               ^~~~~~~~~~~~~~
⚠️  aarch64   | /home/build/snowflake_driver.c: At top level:
⚠️  aarch64   | /home/build/snowflake_driver.c:299:12: error: 'snowflake_handle_quoter' defined but not used [-Werror=unused-function]
⚠️  aarch64   |   299 | static int snowflake_handle_quoter(pdo_dbh_t *dbh, const char *unquoted,
⚠️  aarch64   |       |            ^~~~~~~~~~~~~~~~~~~~~~~
⚠️  aarch64   | /home/build/snowflake_driver.c:275:14: error: 'pdo_snowflake_last_insert_id' defined but not used [-Werror=unused-function]
⚠️  aarch64   |   275 | static char *pdo_snowflake_last_insert_id(pdo_dbh_t *dbh, const char *name,
⚠️  aarch64   |       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚠️  aarch64   | cc1: all warnings being treated as errors
⚠️  aarch64   | make: *** [Makefile:211: snowflake_driver.lo] Error 1

I can work around by modifying the CFLAGS to have -Wno-unused-function

But then I run into #338 but at least things compile :)

Guess maybe newer version of compiler? Just a heads up.

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of PDO/PHP driver are you using?
    N/A: Just trying to build

  2. What operating system and processor architecture are you using?
    Linux docker container on mac m2.

  3. What version of C/C++ compiler are you using?
    13.2

  4. What did you do?
    Followed the instructions here:
    https://github.com/snowflakedb/pdo_snowflake#building-the-driver-on-linux-and-macos

  5. What did you expect to see?

Build to succeed

@vaikas vaikas added the bug label Sep 20, 2023
@github-actions github-actions bot changed the title Unable to build the driver for v1.2.7 on linux, unused-functions SNOW-919763: Unable to build the driver for v1.2.7 on linux, unused-functions Sep 20, 2023
@sfc-gh-dszmolka
Copy link
Contributor

marking this as a duplicate for #351 as ARM is not supported yet

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Feb 23, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added duplicate enhancement The issue is a request for improvement or a new feature and removed bug labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate enhancement The issue is a request for improvement or a new feature
Projects
None yet
Development

No branches or pull requests

2 participants