binaries from edge repo segfaulting due to implicit basename declaration
Package Information
- Package name: testdisk
- Package version: testdisk-7.2-r0
- Alpine version: 3.20.0_alpha20240329
- Alpine architecture: x86_64
Summary
according to #15643 (closed), seems like it's due to musl removing the basename function declaration from string.h.
excerpt from testdisk build logs:
hdaccess.c: In function 'read_device_sysfs_file':
hdaccess.c:1016:7: warning: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
1016 | basename (disk_car->device), file);
| ^~~~~~~~
hdaccess.c:1016:7: warning: nested extern declaration of 'basename' [-Wnested-externs]
proot's CARE and testdisk have this issue, but there might be others.
the proper solution would be to fix this upstream, but these broken packages shouldn't be made available on the repos in the first place.
could we add more checks to the APKBUILD? or perhaps there's some gcc flag to throw an error on specific warnings?
Steps to reproduce
- install testdisk on edge
- run testdisk
- select any of create/append/no log