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

sparse checks fail on Debian unstable #93

Closed
anarcat opened this issue Jan 10, 2019 · 4 comments
Closed

sparse checks fail on Debian unstable #93

anarcat opened this issue Jan 10, 2019 · 4 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Jan 10, 2019

In Debian, we've historically had some trouble making horst build on uncommon architecture like ppc or sparc in the past, which made me disable the make check target on those architectures (Debian bug #873508). But recently this started failing on armhf as well (Debian bug #911102) and my latest attempts at building horst on amd64 completely failed as well.

So I have disabled make check in the Debian package build, which is too bad. Here's the build failure on amd64:

sparse -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -Wall -Wextra -g -I. -DVERSION=\"5.1\" -DDO_DE
BUG -I/usr/include/libnl3 *.[ch]
capture.c:40:5: warning: multiple definitions for function 'device_get_hwinfo'
capture-pcap.c:78:5:  the previous one is here
capture.c:79:5: warning: multiple definitions for function 'open_packet_socket'
capture-pcap.c:49:5:  the previous one is here
capture.c:110:12: warning: multiple definitions for function 'recv_packet'
capture-pcap.c:96:5:  the previous one is here
capture.c:115:6: warning: multiple definitions for function 'close_packet_socket'
capture-pcap.c:108:6:  the previous one is here
control.c:47:22: warning: Variable length array is used.
display-filter.c:130:19: warning: cast truncates bits from constant value (ffff0000 becomes 0)
display-filter.c:131:19: warning: cast truncates bits from constant value (ffff0000 becomes 0)
display-filter.c:132:19: warning: cast truncates bits from constant value (ffff0000 becomes 0)
display-main.c:378:17: warning: Using plain integer as NULL pointer
display-main.c:503:17: warning: Using plain integer as NULL pointer
display.c:352:17: warning: Using plain integer as NULL pointer
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: error: got __value
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:25:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:25:1: error: got __value
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:30:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:30:1: error: got __value
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:33:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:33:1: error: got __value
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:36:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:36:1: error: got __value
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:39:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:39:1: error: got __x
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:42:1: error: Expected ) in function declarator
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:42:1: error: got __value
/usr/include/stdlib.h:140:17: error: Expected ; at end of declaration
/usr/include/stdlib.h:140:17: error: got strtof32
/usr/include/stdlib.h:146:17: error: Expected ; at end of declaration
/usr/include/stdlib.h:146:17: error: got strtof64
/usr/include/stdlib.h:152:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:152:18: error: got strtof128
/usr/include/stdlib.h:158:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:158:18: error: got strtof32x
/usr/include/stdlib.h:164:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:164:18: error: got strtof64x
/usr/include/stdlib.h:233:33: error: Expected ) in function declarator
/usr/include/stdlib.h:233:33: error: got __f
/usr/include/stdlib.h:239:33: error: Expected ) in function declarator
/usr/include/stdlib.h:239:33: error: got __f
/usr/include/stdlib.h:245:35: error: Expected ) in function declarator
/usr/include/stdlib.h:245:35: error: got __f
/usr/include/stdlib.h:251:35: error: Expected ) in function declarator
/usr/include/stdlib.h:251:35: error: got __f
/usr/include/stdlib.h:257:35: error: Expected ) in function declarator
/usr/include/stdlib.h:257:35: error: got __f
/usr/include/stdlib.h:316:17: error: Expected ; at end of declaration
/usr/include/stdlib.h:316:17: error: got strtof32_l
/usr/include/stdlib.h:323:17: error: Expected ; at end of declaration
/usr/include/stdlib.h:323:17: error: got strtof64_l
/usr/include/stdlib.h:330:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:330:18: error: got strtof128_l
/usr/include/stdlib.h:337:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:337:18: error: got strtof32x_l
/usr/include/stdlib.h:344:18: error: Expected ; at end of declaration
/usr/include/stdlib.h:344:18: error: got strtof64x_l
mach_clock_gettime.c:39:11: error: unable to open 'mach/clock.h'
make[1]: *** [Makefile:119: check] Error 1

Debian unstable ships libc 2.28, sparse 0.5.2 and gcc 8.2.0.

As you can see in the first sparse bug report, some work has been tried to fix sparse in Debian, but this seems to go beyond that original bug report. So I'm wondering if you could shed some light on whether you have witnessed the same issues on how important that check is for horst.

Thanks!

@anarcat
Copy link
Contributor Author

anarcat commented Jan 10, 2019

For what it's worth, Debian folks have suggested to use cgcc --no-compile instead of sparse but I'm sorry to say it fails in a similar way.

@lucvoo
Copy link

lucvoo commented Jan 21, 2019

[copy of what I replied on sparse's mailing list]

The issue showed there, more precisely the one:
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: error: Expected ) in function declarator
is caused by sparse 0.5.2's lack of support for _Float128 and occurs with
recent version of glibc.

This has been fixed and upstreamed (see
https://git.kernel.org/pub/scm/devel/sparse/sparse.git/commit/?id=4e9c8ee467dd87d41d5aaa3c5a487e3f05ffb79c
for more details).

@lucvoo
Copy link

lucvoo commented Jan 21, 2019

About cgcc [--no-compile], yes it won't help as it's essentially a wrapper to replace a call to the compiler to a call to the compiler and sparse.

@br101
Copy link
Owner

br101 commented May 20, 2019

so this is fixed upstream in sparse, closing...

@br101 br101 closed this as completed May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants