util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [sthibault@debian.org: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave unconditionally]
@ 2018-05-28 21:16 Andreas Henriksson
  2018-05-29  8:13 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Henriksson @ 2018-05-28 21:16 UTC (permalink / raw)
  To: util-linux; +Cc: Samuel Thibault

Hi,

Please consider Samuels patch as forwarded below to fix 
(debian package) build on Hurd.

Sorry for messy formatting and lack of s-o-b.
If it helps, raw patch can be downloaded from:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=891812;filename=patch;msg=34

( Original discussion at http://bugs.debian.org/891812 )

Regards,
Andreas Henriksson

----- Forwarded message from Samuel Thibault <sthibault@debian.org> -----

Date: Sun, 27 May 2018 18:00:02 +0200
From: Samuel Thibault <sthibault@debian.org>
To: Andreas Henriksson <andreas@fatal.se>
Cc: "Aaron M. Ucko" <ucko@debian.org>, 891812@bugs.debian.org
Subject: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave
	unconditionally
User-Agent: NeoMutt/20170113 (1.7.2)

Hello,

Andreas Henriksson, le lun. 21 mai 2018 22:45:54 +0200, a ecrit:
> On Thu, Mar 01, 2018 at 01:55:22AM +0100, Samuel Thibault wrote:
> > Aaron M. Ucko, on mer. 28 févr. 2018 19:47:40 -0500, wrote:
> > >   login-utils/su-common.c:1427:3: warning: implicit declaration of function 'pty_init_slave'; did you mean 'initstate'? [-Wimplicit-function-declaration]
> > >   [...]
> > >   ./login-utils/su-common.c:1427: undefined reference to `pty_init_slave'
> > 
> > IIRC I got a fix commited upstream
> 
> Your fix should now be part of the latest upload (2.32-0.1),
> unfortunately there's another problem now.
> 
> Any chance you can test if by any chance the following upstream commit
> fixes the (libmount-related) build issue on hurd (or if additional
> upstream fixing is needed for hurd)?
> 
> https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=061d1a51097c3c025ff46173f10aa135f9a610d4

As Svante mentioned it will not work because GNU/Hurd does not provide
the linuxish mount() interface (which is about to change, btw ;)
The attached patch fixes the build.

Samuel

diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
index 11fd759fa..39568a37c 100644
--- a/libmount/src/libmount.h.in
+++ b/libmount/src/libmount.h.in
@@ -34,7 +34,9 @@ extern "C" {
  * don't want to include sys/mount.h at all to avoid collisions.
  */
 #ifndef MS_RDONLY
-# include <sys/mount.h>
+# ifdef HAVE_SYS_MOUNT_H
+#  include <sys/mount.h>
+# endif
 #endif
 
 #define LIBMOUNT_VERSION   "@LIBMOUNT_VERSION@"


----- End forwarded message -----

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [sthibault@debian.org: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave unconditionally]
  2018-05-28 21:16 [sthibault@debian.org: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave unconditionally] Andreas Henriksson
@ 2018-05-29  8:13 ` Karel Zak
  2018-05-29 11:28   ` Andreas Henriksson
  0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2018-05-29  8:13 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: util-linux, Samuel Thibault

On Mon, May 28, 2018 at 11:16:17PM +0200, Andreas Henriksson wrote:
> As Svante mentioned it will not work because GNU/Hurd does not provide
> the linuxish mount() interface (which is about to change, btw ;)
> The attached patch fixes the build.
> 
> Samuel
> 
> diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
> index 11fd759fa..39568a37c 100644
> --- a/libmount/src/libmount.h.in
> +++ b/libmount/src/libmount.h.in
> @@ -34,7 +34,9 @@ extern "C" {
>   * don't want to include sys/mount.h at all to avoid collisions.
>   */
>  #ifndef MS_RDONLY
> -# include <sys/mount.h>
> +# ifdef HAVE_SYS_MOUNT_H
> +#  include <sys/mount.h>
> +# endif
>  #endif

I have doubts we can use HAVE_* here, because the file is public
library interface and HAVE_* are available in util-linux build tree
only. I have applied another bugfix:

diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
index 11fd759fa..c61514b59 100644
--- a/libmount/src/libmount.h.in
+++ b/libmount/src/libmount.h.in
@@ -33,7 +33,7 @@ extern "C" {
  * may be already defined by linux/fs.h or another file -- in this case we
  * don't want to include sys/mount.h at all to avoid collisions.
  */
-#ifndef MS_RDONLY
+#if defined(__linux__) && !defined(MS_RDONLY)
 # include <sys/mount.h>
 #endif


Hope this bugfix (from "Typical Redhat people") will work for Svante
too :)


    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [sthibault@debian.org: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave unconditionally]
  2018-05-29  8:13 ` Karel Zak
@ 2018-05-29 11:28   ` Andreas Henriksson
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Henriksson @ 2018-05-29 11:28 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Samuel Thibault

Hi Karel,

On Tue, May 29, 2018 at 10:13:58AM +0200, Karel Zak wrote:
> I have doubts we can use HAVE_* here, because the file is public
> library interface and HAVE_* are available in util-linux build tree
> only.

Oh, ok.

> I have applied another bugfix:
> 
> diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
> index 11fd759fa..c61514b59 100644
> --- a/libmount/src/libmount.h.in
> +++ b/libmount/src/libmount.h.in
> @@ -33,7 +33,7 @@ extern "C" {
>   * may be already defined by linux/fs.h or another file -- in this case we
>   * don't want to include sys/mount.h at all to avoid collisions.
>   */
> -#ifndef MS_RDONLY
> +#if defined(__linux__) && !defined(MS_RDONLY)
>  # include <sys/mount.h>
>  #endif

Thanks!

> 
> 
> Hope this bugfix (from "Typical Redhat people") will work for Svante
> too :)

Once Hurd implements the sys/mount.h interface (which Samuel hinted is
not far away) the ifdefs can be tweaked to also include hurd I guess....
so your "typical redhat" fix should work fine for now. ;)
(On a more serious note, I think everyone involved with Debian is sorry
for such energy draining comments ending up in our bug tracking system.)

Fwiw, Even though we build libmount on non-linux in Debian, it's not
really functional there yet and still needs porting work (but the
utility bits of libmount is still needed by other tools which are needed
on non-linux thus we need it to build).

Thanks again for the fix.

Regards,
Andreas Henriksson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-29 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 21:16 [sthibault@debian.org: Re: Bug#891812: util-linux: FTBFS on hurd-i386: calls pty_init_slave unconditionally] Andreas Henriksson
2018-05-29  8:13 ` Karel Zak
2018-05-29 11:28   ` Andreas Henriksson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).