Menu

#8 latest 1.99.14 fails to build on 32bits arches

1.0
closed
nobody
None
2024-09-17
2024-09-15
No

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:

1 Attachments

Discussion

  • Kurt Garloff

    Kurt Garloff - 2024-09-15

    The trouble is this line in the second call to configure:

    checking if we can link pread64... no
    

    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 from unistd.h. Or more precisely pwrite64() collides. Which is curious. Look like your libc does provide pwrite64() but not pread64(). I have never seen this before.
    If my theory is correct, testing for pread64 and pwrite64 separately in configure.ac and then treating those two individually in pread64.h would do the trick.

     
  • Kurt Garloff

    Kurt Garloff - 2024-09-15

    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
  • Geiger David

    Geiger David - 2024-09-15

    Testing your proposal fix and yes I confirm that it fixes 32bit build (armv7 and i686).

     
  • Kurt Garloff

    Kurt Garloff - 2024-09-17

    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.

     
  • Kurt Garloff

    Kurt Garloff - 2024-09-17
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB