ibarwick / libfq

A wrapper library for Firebird's C API, loosely based on PostgreSQL's libpq.
https://libfq.sql-info.de/
8 stars 2 forks source link

Build error on Fedora 40 #7

Closed devrimgunduz closed 2 months ago

devrimgunduz commented 3 months ago

Hi @ibarwick ,

libfq 0.5.0 fails to build on Fedora 40 (GCC 14). Can you please take a look? Thanks!

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./include -I./include -I/usr/include/firebird -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MT src/fqexpbuffer.lo -MD -MP -MF src/.deps/fqexpbuffer.Tpo -c src/fqexpbuffer.c -o src/fqexpbuffer.o >/dev/null 2>&1
src/libfq.c: In function ‘_FQexecParams’:
src/libfq.c:1856:63: warning: pointer targets in assignment from ‘char *’ to ‘unsigned char *’ differ in signedness [-Wpointer-sign]
 1856 |                                                 srcptr_parsed = _FQparseDbKey((char *)srcptr);
      |                                                               ^
src/libfq.c:1904:71: error: initialization of ‘isc_blob_handle’ {aka ‘unsigned int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
 1904 |                                         isc_blob_handle blob_handle = NULL;
      |                                                                       ^~~~
src/libfq.c: In function ‘_FQformatDatum’:
src/libfq.c:3483:43: error: initialization of ‘isc_blob_handle’ {aka ‘unsigned int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
 3483 |             isc_blob_handle blob_handle = NULL;
      |                                           ^~~~
make[2]: *** [Makefile:540: src/libfq.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/lib/pgsql/rpmcommon/BUILD/libfq-0.5.0'
make[1]: *** [Makefile:585: all-recursive] Error 1
make[1]: Leaving directory '/var/lib/pgsql/rpmcommon/BUILD/libfq-0.5.0'
error: Bad exit status from /var/tmp/rpm-tmp.s0vM40 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.s0vM40 (%build)
make: *** [../../../../global/Makefile.global-common:20: commonbuild] Error 1
devrimgunduz commented 2 months ago

Any comments? Fedora 40 is out.

ibarwick commented 2 months ago

Oooh, sorry, missed this. The blob issue is fixed (7d8600992b641cc10e0dd9e5a1e05c48b3828a02), if you can wait a couple of days I will have some time to create a maintenance release (and hopefully bash the whole stack into shape before you bug me about Pg17 ;) ).

devrimgunduz commented 2 months ago

Hi Ian,

Thanks! I added this patch to the Fedora 40 RPMs. Will remove it when you release the new version (take your time)

Cheers, Devrim