majensen / libneo4j-omni

Up-to-date C library and CLI for Neo4j based on libneo4j-client
Apache License 2.0
4 stars 2 forks source link

gcc 14.2.1/make 4.4.1 unrecognized cmd line option and a compilation error #11

Open simonSlamka opened 3 weeks ago

simonSlamka commented 3 weeks ago

Hello,

when attempting to build the project, I encountered a warning about an unknown gcc command line option and a compilation error:

At top level:
cc1: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -Wpedantic -Wvla -g -O2 -std=gnu11 -fvisibility=hidden -pipe -DHAVE_BIO_METH_NEW -Wall -W -Wno-unused-parameter -Wno-missing-field-initializers -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wcast-align -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=stringop-truncation -Wno-unknown-warning-option -Werror -MT libneo4j_client_la-client_config.lo -MD -MP -MF .deps/libneo4j_client_la-client_config.Tpo -c client_config.c -o libneo4j_client_la-client_config.o >/dev/null 2>&1
mv -f .deps/libneo4j_client_la-client_config.Tpo .deps/libneo4j_client_la-client_config.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..      -Wpedantic -Wvla -g -O2 -std=gnu11 -fvisibility=hidden -pipe -DHAVE_BIO_METH_NEW     -Wall -W -Wno-unused-parameter     -Wno-missing-field-initializers -Wpointer-arith -Wstrict-prototypes     -Wcast-qual -Wcast-align -Wno-error=unused-function     -Wno-error=unused-variable -Wno-error=deprecated-declarations     -Wno-error=stringop-truncation -Wno-unknown-warning-option -Werror -MT libneo4j_client_la-connection.lo -MD -MP -MF .deps/libneo4j_client_la-connection.Tpo -c -o libneo4j_client_la-connection.lo `test -f 'connection.c' || echo './'`connection.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -Wpedantic -Wvla -g -O2 -std=gnu11 -fvisibility=hidden -pipe -DHAVE_BIO_METH_NEW -Wall -W -Wno-unused-parameter -Wno-missing-field-initializers -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wcast-align -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=stringop-truncation -Wno-unknown-warning-option -Werror -MT libneo4j_client_la-connection.lo -MD -MP -MF .deps/libneo4j_client_la-connection.Tpo -c connection.c  -fPIC -DPIC -o .libs/libneo4j_client_la-connection.o
connection.c: In function 'parse_version_string':
connection.c:1746:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1746 |     m1 = 0;
      |     ~~~^~~
connection.c:1747:3: note: here
 1747 |   case 4:
      |   ^~~~
connection.c: At top level:
connection.c:1286:5: warning: 'hello' defined but not used [-Wunused-function]
 1286 | int hello(neo4j_connection_t *connection)
      |     ^~~~~
cc1: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors

thanks

johannessen commented 3 weeks ago

https://github.com/majensen/libneo4j-client/issues/10#issuecomment-757377088 suggested ./configure --disable-werror to work around this issue.

simonSlamka commented 3 weeks ago

majensen/libneo4j-client#10 (comment) suggested ./configure --disable-werror to work around this issue.

huh, that did it. totally missed that. thanks

johannessen commented 3 weeks ago

Great!

I still think this should either be resolved so that those warnings never happen in the first place, or the configure option should be documented in “Building” in the readme. I’m reopening this, lest we forget about it.

– Actually, I see now it is in the readme. I missed it, too. Clearly, there’s some room for improvement here.