cminyard/gensio

Does not build on Debian unstable

Zugschlus opened this issue · 9 comments

Hi,

gensio 2.3.4 does not build successfully on current Debian unstable:

[44/5028]mh@salida:~/packages/gensio/build-area/gensio-2.3.4/lib $ gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -I../include -I../include -DBUILDING_GENSIO_DLL -g -O2 -ffile-prefix-map=/home/mh/packages/gensio/build-area/gensio-2.3.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -pthread -c gensio_stdsock.c  -fPIC -DPIC -o .libs/gensio_stdsock.o
In file included from ../include/gensio/gensio.h:28,
                 from gensio_stdsock.c:49:
gensio_stdsock.c: In function ‘close_socket’:
../include/gensio/gensio_err.h:73:38: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
   73 |     gensio_i_os_err_to_err(o, oserr, __FUNCTION__, __FILE__, __LINE__)
      |                                      ^~~~~~~~~~~~
gensio_stdsock.c:179:16: note: in expansion of macro ‘gensio_os_err_to_err’
  179 |         return gensio_os_err_to_err(o, sock_errno);
      |                ^~~~~~~~~~~~~~~~~~~~
gensio_stdsock.c: In function ‘gensio_os_sctp_open_sockets’:
../include/gensio/gensio_err.h:73:38: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
   73 |     gensio_i_os_err_to_err(o, oserr, __FUNCTION__, __FILE__, __LINE__)
      |                                      ^~~~~~~~~~~~
gensio_stdsock.c:246:26: note: in expansion of macro ‘gensio_os_err_to_err’
  246 |                     rv = gensio_os_err_to_err(o, sock_errno);
      |                          ^~~~~~~~~~~~~~~~~~~~
gensio_stdsock.c: In function ‘gensio_stdsock_sctp_recvmsg’:
../include/gensio/gensio_err.h:73:38: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
   73 |     gensio_i_os_err_to_err(o, oserr, __FUNCTION__, __FILE__, __LINE__)
      |                                      ^~~~~~~~~~~~
gensio_stdsock.c:154:10: note: in expansion of macro ‘gensio_os_err_to_err’
  154 |     rv = gensio_os_err_to_err(o, err);                          \
      |          ^~~~~~~~~~~~~~~~~~~~
gensio_stdsock.c:325:5: note: in expansion of macro ‘ERRHANDLE’
  325 |     ERRHANDLE();
      |     ^~~~~~~~~
gensio_stdsock.c: In function ‘l_sctp_send’:
../include/gensio/gensio_err.h:73:38: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
   73 |     gensio_i_os_err_to_err(o, oserr, __FUNCTION__, __FILE__, __LINE__)
      |                                      ^~~~~~~~~~~~
gensio_stdsock.c:154:10: note: in expansion of macro ‘gensio_os_err_to_err’
  154 |     rv = gensio_os_err_to_err(o, err);                          \
      |          ^~~~~~~~~~~~~~~~~~~~
gensio_stdsock.c:338:5: note: in expansion of macro ‘ERRHANDLE’
  338 |     ERRHANDLE();
      |     ^~~~~~~~~
gensio_stdsock.c: At top level:
gensio_stdsock.c:376:1: error: redefinition of ‘gensio_stdsock_sctp_send’
  376 | gensio_stdsock_sctp_send(struct gensio_iod *iod,
      | ^~~~~~~~~~~~~~~~~~~~~~~~
gensio_stdsock.c:347:1: note: previous definition of ‘gensio_stdsock_sctp_send’ with type ‘int(struct gensio_iod *, const struct gensio_sg *, gensiods,  gensiods *, const struct sctp_sndrcvinfo *, uint32_t)’ {aka ‘int(struct gensio_iod *, const struct gensio_sg *, long unsigned int,  long unsigned int *, const struct sctp_sndrcvinfo *, unsigned int)’}
  347 | gensio_stdsock_sctp_send(struct gensio_iod *iod,
      | ^~~~~~~~~~~~~~~~~~~~~~~~

(snipped, it's long).

Debian unstable has recently switched to gcc-11, can this be a reason?

Greetings
Marc

A release would be really great, thanks!

The build seems to go ok now.

I learned that the .a file is mostly irrelevant for a Debian package (we hate static linking), and that ser2net built against the release version of gensio works fine.

If you want me to test whether your fix makes lintian stop with this warning, just let me know and I'll try.

I have rarely seen an upstream this easy to work with. Thank you! I really appreciate that.