Does not build on Debian unstable
Zugschlus opened this issue · 9 comments
Zugschlus commented
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
cminyard commented
On Wed, Nov 17, 2021 at 01:13:22PM -0800, Zugschlus wrote:
Hi,
gensio 2.3.4 does not build successfully on current Debian unstable:
Yeah, __FUNCTION__ is a gcc-ism that I didn't know about. I've pushed
up a fix. Do you need a release?
Thanks,
…-corey
```
***@***.***:~/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
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#33
Zugschlus commented
A release would be really great, thanks!
cminyard commented
On Wed, Nov 17, 2021 at 09:16:31PM -0800, Zugschlus wrote:
A release would be really great, thanks!
Ok, it's done. I went ahead and installed debian unstable in a VM and
tested it out. It turns out there were more issues that I had to deal
with. Thanks.
…-corey
Zugschlus commented
The build seems to go ok now.
cminyard commented
On Sun, Nov 21, 2021 at 12:06:26PM -0800, Zugschlus wrote:
The build seems to go ok now, but Debian's check tool lintian has information about the .la file:
```
E: libgensio-dev: no-code-sections usr/lib/x86_64-linux-gnu/libgensio.a (errtrig.o)
N:
N:
N: The named members of the static library have no usable code sections.
N:
N: It happens when shared objects are built with -flto=auto but without -ffat-lto-objects. dh_strip strips the LTO
N: sections but may leave the static library without any usable code.
N:
N: Please refer to Bug#977596 for details.
N:
N: Visibility: error
N: Show-Always: no
N: Check: libraries/static/no-code
```
Is it possible that -ffat-lto-objects does actually belong in the build but is missing?
I have no idea what any of this means. If error triggers are not
enabled, that file is an empty .o, maybe that's what it's complaining
about? Other than that, I don't know.
cminyard commented
On Sun, Nov 21, 2021 at 12:06:26PM -0800, Zugschlus wrote:
The build seems to go ok now, but Debian's check tool lintian has information about the .la file:
```
E: libgensio-dev: no-code-sections usr/lib/x86_64-linux-gnu/libgensio.a (errtrig.o)
N:
N:
N: The named members of the static library have no usable code sections.
Ok, I modified the build to not include errtrig.c if tracing is
disabled. Hopefully that fixes this issue.
Zugschlus commented
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.
cminyard commented
On Tue, Nov 23, 2021 at 08:50:23AM -0800, Zugschlus wrote:
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.
That's ok, it really needed to be done, anyway. If you need anything
else, please ask. Thanks for all your work on this.
…-corey
Zugschlus commented
I have rarely seen an upstream this easy to work with. Thank you! I really appreciate that.