Closed kloczek closed 7 months ago
Thanks for reporting this. I've pushed a potential fix to the repository:
commit def3aa78fc9e05d7d98a114481250a4dcc3c259e (HEAD -> master) Author: Colin Ian King colin.i.king@gmail.com Date: Mon Apr 15 17:24:25 2024 +0100
core-builtin: fix brackets on shim'd helpers shim_ccosl and shim_csinl
do you mind checking to see if this fixes the issue for you?
Hi, do you mind testing this and letting me know the result so I can close this issue?
One sec will try to do that now 😋
Just tested 0.17.07 + def3aa78 and build still fails
[tkloczko@pers-jacek stress-ng-0.17.07]$ make -k VERBOSE=1
CC stress-cpu.c
cc -Wall -Wextra -DVERSION='"0.17.07"' -std=gnu99 -O2 -Wformat -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror=format-security -fipa-pta -c -o stress-cpu.o stress-cpu.c
In file included from stress-cpu.c:24:
stress-cpu.c: In function ‘zeta’:
core-builtin.h:94:37: error: ‘y’ undeclared (first use in this function)
94 | #define shim_cpow(x, z) (shim_cexp((y) * shim_clog((x))))
| ^
core-builtin.h:385:30: note: in definition of macro ‘shim_cexp’
385 | #define shim_cexp(x) cexp(x)
| ^
stress-cpu.c:1523:38: note: in expansion of macro ‘shim_cpow’
1523 | double complex pwr = shim_cpow(i++, (complex double)s);
| ^~~~~~~~~
core-builtin.h:94:37: note: each undeclared identifier is reported only once for each function it appears in
94 | #define shim_cpow(x, z) (shim_cexp((y) * shim_clog((x))))
| ^
core-builtin.h:385:30: note: in definition of macro ‘shim_cexp’
385 | #define shim_cexp(x) cexp(x)
| ^
stress-cpu.c:1523:38: note: in expansion of macro ‘shim_cpow’
1523 | double complex pwr = shim_cpow(i++, (complex double)s);
| ^~~~~~~~~
core-builtin.h:74:25: warning: absolute value function ‘cabs’ given an argument of type ‘long double’ but has parameter of type ‘double’ which may cause truncation of value [-Wabsolute-value]
74 | #define shim_cabsl(x) cabs(x)
| ^~~~
stress-cpu.c:1526:18: note: in expansion of macro ‘shim_cabsl’
1526 | } while (shim_cabsl(z - zold) > precision);
| ^~~~~~~~~~
stress-cpu.c:1516:35: warning: unused parameter ‘s’ [-Wunused-parameter]
1516 | const long double complex s,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^
make: *** [Makefile:666: stress-cpu.o] Error 1
CC stress-enosys.c
cc -Wall -Wextra -DVERSION='"0.17.07"' -std=gnu99 -O2 -Wformat -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror=format-security -fipa-pta -c -o stress-enosys.o stress-enosys.c
stress-enosys.c:938:9: error: ‘SYS_lsm_modules’ undeclared here (not in a function); did you mean ‘SYS_lsm_list_modules’?
938 | SYS_lsm_modules,
| ^~~~~~~~~~~~~~~
| SYS_lsm_list_modules
make: *** [Makefile:666: stress-enosys.o] Error 1
make: Target 'all' not remade because of errors.
I've pushed another fix:
commit f76dadad58bfdda75aa4cd21ee1c024dc382fc42 (HEAD -> master) Author: Colin Ian King colin.i.king@gmail.com Date: Thu Apr 18 15:26:00 2024 +0100
core-builtin: fix macros and shims
please pull these changes and re-test. Thank you :-)
Cannot apply that commit patch on top of last release. Do you have any plans to release updated version .. soon? 🤔
Will see can I apply full sequence of commits patches on top of last release .. on sec.
After add to my rpm build procedure full set of patches added after last release I still have one fail
[tkloczko@pers-jacek stress-ng-0.17.07]$ make -k
CC stress-enosys.c
stress-enosys.c:938:9: error: ‘SYS_lsm_modules’ undeclared here (not in a function); did you mean ‘SYS_lsm_list_modules’?
938 | SYS_lsm_modules,
| ^~~~~~~~~~~~~~~
| SYS_lsm_list_modules
make: *** [Makefile:668: stress-enosys.o] Error 1
make: Target 'all' not remade because of errors.
Oops, my bad. fix pushed:
commit 5664f92343aa327718ab19fd371f116155407344 (HEAD -> master) Author: Colin Ian King colin.i.king@gmail.com Date: Thu Apr 18 19:01:35 2024 +0100
stress-enosys: fix typo: SYS_lsm_modules -> SYS_lsm_list_modules
I plan to release in early month, the release cadence is monthly.
One sec .. must update my spec 😋
OK my package now builds correctly however build still is not 100% clean 😋
[tkloczko@pers-jacek SPECS]$ rpmbuild -ba --quiet 2>&1 | grep -- \\[-W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
1 -Wunused-variable
1 -Wunused-function
😋
I can't reproduce the -Wunused-* warnings on my builds. Any idea of what symbols these refer to?
If may I ask about one thing which is off-topic of this ticket .. 😋
During final review of the packaging procedure and build log I've noticed that you've hardcoded -fipa-pta
optimisation option.
Usually I'm trying to get rid of any hardcoded optimisation wand warnings options to have 100% control of those aspects from outside of raw build procedure. When I've added patch for that I found that it is kind of unknown optimisation option for me so I've started digging around and looks like potentially it could make some positive effect everywhere.
Do you have any stats about how effective it is and/or how big impact of that optimisation actually is? 🤔
PS. I'm thinking about add that option to default set of optimisations which I have defined in rpm macros.
The win is small, overall it makes a slight difference where there are a lot of inter-procedurial calls. Attached is a sample of my benchmarks I did late last year. stress-ng-fipa-pta.pdf
Build warnings fixed with commit:
commit efbe18878ed7612c0937e63c4d51d64beae35cb3 (HEAD -> master) Author: Colin Ian King colin.i.king@gmail.com Date: Fri Apr 19 10:59:06 2024 +0100
stress-prime: move variables and a function to clean up build warning
Looks like something is wrong: