latest 1.99.14 fails to build on 32bits arches
Data recovery and protection tool
Brought to you by:
garloff
Hi,
On Mageia Cauldron latest release 1.99.14 fails to build on 32bit (i686) with the following build issue:
pread64.h:58:23: error: static declaration of 'pwrite64' follows non-static declaration
58 | static inline ssize_t pwrite64(int fd, const void *buf, size_t sz, loff_t off)
Regards,
David
Attached full build log:
The trouble is this line in the second call to configure:
So, the check determines that your libc does NOT provide
pread64(), so the workaround applies and we provide our own. Unfortunately, it collides with the declaration fromunistd.h. Or more preciselypwrite64()collides. Which is curious. Look like your libc does providepwrite64()but notpread64(). I have never seen this before.If my theory is correct, testing for
pread64andpwrite64separately inconfigure.acand then treating those two individually inpread64.hwould do the trick.I pushed a change to the
DD_RESCUE_1_99_BRANCH.https://sourceforge.net/p/ddrescue/code/ci/1a942867c6766ccd87b696d4e37062f29bfca94e/
Please test whether this helps your compilation.
(If have only compile-tested it on a system that does have
pread64()...)Last edit: Kurt Garloff 2024-09-15
Testing your proposal fix and yes I confirm that it fixes 32bit build (armv7 and i686).
Thanks for confirming.
I have tagged and released dd_rescue-1.99.15 with this fix included.
Please reopen this issue if you find out the issue has not been addressed successfully.