GNU bug report logs - #21059
coreutils-8.24 - sync(1) fails to link on Solaris 10 - missing fdatasync() - solution provided (-lrt)

Previous Next

Package: coreutils;

Reported by: Peter Bray <pdb_ml <at> yahoo.com.au>

Date: Wed, 15 Jul 2015 06:12:02 UTC

Severity: normal

Merged with 21153

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21059 in the body.
You can then email your comments to 21059 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#21059; Package coreutils. (Wed, 15 Jul 2015 06:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Bray <pdb_ml <at> yahoo.com.au>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 15 Jul 2015 06:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Bray <pdb_ml <at> yahoo.com.au>
To: bug-coreutils <at> gnu.org
Subject: coreutils-8.24 - sync(1) fails to link on Solaris 10 - missing
 fdatasync() - solution provided (-lrt)
Date: Wed, 15 Jul 2015 13:10:16 +1000
Greetings,

In attempting to build coreutils-8.24 on Sun Solaris 10 Update 8 and
Oracle Solaris 10 Update 11 (both X86 VMs where the OS is unpatched),
I found that the GNU coreutils sync(1) command would not link, failing
to find the symbol 'fdatasync'.

Investigations show that "configure" correctly detects that
fdatasync() is found in -lrt, the $(LIB_FDATASYNC) make variable has
the correct value. It is just not used in the building of sync(1).

The solution seems simple enough, the addition of $(LIB_FDATASYNC) to
the "src_sync_LDADD" line of the Makefile. This change has been tested
on both releases of Solaris 10 mentioned above and Oracle Solaris 11.2
were the change is not needed (as LIB_FDATASYNC value is the empty
string). That is, fdatasync() is no longer in -lrt on Solaris 11.2

The proper solution would be to update "Makefile.in" (identical
change) or more likely "src/local.mk" (identical change), but as these
systems do not yet have autotools, I have not developed or tested a
final solution. Given the trivial nature of the change, I hope this
will not be an impediment to its acceptance.

Regards,

Peter Bray
Sydney, Australia


The unified GNU diff(1) output of the change as tested is:

--- ./Makefile.orig     2015-07-13 09:33:44.202439000 +0000
+++ ./Makefile  2015-07-13 09:33:50.601564126 +0000
@@ -4534,7 +4534,7 @@
 src_stdbuf_LDADD = $(LDADD) $(LIBICONV)
 src_stty_LDADD = $(LDADD)
 src_sum_LDADD = $(LDADD)
-src_sync_LDADD = $(LDADD)
+src_sync_LDADD = $(LDADD) $(LIB_FDATASYNC)
 src_tac_LDADD = $(LDADD)
 src_tail_LDADD = $(LDADD) $(LIB_NANOSLEEP)
 src_tee_LDADD = $(LDADD)

From the fdatasync(3RT) manual page, on Solaris 10:

NAME
       fdatasync - synchronize a file's data

SYNOPSIS
       cc [ flag... ] file... -lrt [ library... ]
       #include <unistd.h>

       int fdatasync(int fildes);





Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Wed, 15 Jul 2015 07:42:02 GMT) Full text and rfc822 format available.

Notification sent to Peter Bray <pdb_ml <at> yahoo.com.au>:
bug acknowledged by developer. (Wed, 15 Jul 2015 07:42:02 GMT) Full text and rfc822 format available.

Message #10 received at 21059-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Peter Bray <pdb_ml <at> yahoo.com.au>, 21059-done <at> debbugs.gnu.org
Subject: Re: bug#21059: coreutils-8.24 - sync(1) fails to link on Solaris
 10 - missing fdatasync() - solution provided (-lrt)
Date: Wed, 15 Jul 2015 08:41:44 +0100
On 15/07/15 04:10, Peter Bray wrote:
> Greetings,
> 
> In attempting to build coreutils-8.24 on Sun Solaris 10 Update 8 and
> Oracle Solaris 10 Update 11 (both X86 VMs where the OS is unpatched),
> I found that the GNU coreutils sync(1) command would not link, failing
> to find the symbol 'fdatasync'.
> 
> Investigations show that "configure" correctly detects that
> fdatasync() is found in -lrt, the $(LIB_FDATASYNC) make variable has
> the correct value. It is just not used in the building of sync(1).
> 
> The solution seems simple enough, the addition of $(LIB_FDATASYNC) to
> the "src_sync_LDADD" line of the Makefile. This change has been tested
> on both releases of Solaris 10 mentioned above and Oracle Solaris 11.2
> were the change is not needed (as LIB_FDATASYNC value is the empty
> string). That is, fdatasync() is no longer in -lrt on Solaris 11.2
> 
> The proper solution would be to update "Makefile.in" (identical
> change) or more likely "src/local.mk" (identical change), but as these
> systems do not yet have autotools, I have not developed or tested a
> final solution. Given the trivial nature of the change, I hope this
> will not be an impediment to its acceptance.

I've pushed this in your name:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=9d25971

Interestingly I didn't hit the issue on a Solaris 10 Update 10 system.

thanks!
Pádraig.





Forcibly Merged 21059 21153. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Wed, 29 Jul 2015 02:42:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Aug 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.