mailing list of musl libc
 help / color / mirror / code / Atom feed
* Missing definitions for UTMP(x)
@ 2017-08-28 21:57 Matias Fonzo
  2017-08-29  2:09 ` A. Wilcox
  2017-08-29 11:05 ` u-uy74
  0 siblings, 2 replies; 5+ messages in thread
From: Matias Fonzo @ 2017-08-28 21:57 UTC (permalink / raw)
  To: musl

Hi there,

We were building mesa (17.2.0-rc4) for Dragora, and we get this errors:

In file included from sessreg.c:73:0:
sessreg.c: In function 'main':
sessreg.h:107:21: error: '_PATH_WTMPX' undeclared (first use in this
function) # define WTMPX_FILE _PATH_WTMPX
                     ^
sessreg.c:302:16: note: in expansion of macro 'WTMPX_FILE'
   wtmpx_file = WTMPX_FILE;
                ^~~~~~~~~~
sessreg.h:107:21: note: each undeclared identifier is reported only
once for each function it appears in # define WTMPX_FILE _PATH_WTMPX
                     ^
sessreg.c:302:16: note: in expansion of macro 'WTMPX_FILE'
   wtmpx_file = WTMPX_FILE;
                ^~~~~~~~~~
sessreg.h:110:21: error: '_PATH_UTMPX' undeclared (first use in this
function) # define UTMPX_FILE _PATH_UTMPX
                     ^
sessreg.c:308:16: note: in expansion of macro 'UTMPX_FILE'
   utmpx_file = UTMPX_FILE;
                ^~~~~~~~~~
make[2]: *** [Makefile:489: sessreg.o] Error 1
make[1]: *** [Makefile:509: all-recursive] Error 1
make: *** [Makefile:381: all] Error 2

Glibc defines in utmpx.h:

#ifdef __USE_GNU
/* Compatibility names for the strings of the canonical file names.  */
# define UTMPX_FILE     _PATH_UTMPX
# define UTMPX_FILENAME _PATH_UTMPX
# define WTMPX_FILE     _PATH_WTMPX
# define WTMPX_FILENAME _PATH_WTMPX
#endif

Please, include it.



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

* Re: Missing definitions for UTMP(x)
  2017-08-28 21:57 Missing definitions for UTMP(x) Matias Fonzo
@ 2017-08-29  2:09 ` A. Wilcox
  2017-08-29 18:53   ` Matias Fonzo
  2017-08-29 11:05 ` u-uy74
  1 sibling, 1 reply; 5+ messages in thread
From: A. Wilcox @ 2017-08-29  2:09 UTC (permalink / raw)
  To: musl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 28/08/17 16:57, Matias Fonzo wrote:
> sessreg.h:110:21: error: '_PATH_UTMPX' undeclared (first use in
> this function) # define UTMPX_FILE _PATH_UTMPX ^ sessreg.c:308:16:
> note: in expansion of macro 'UTMPX_FILE' utmpx_file = UTMPX_FILE; 
> ^~~~~~~~~~


> # define UTMPX_FILE     _PATH_UTMPX


> Please, include it.


If you'll notice, this would cause preprocessor recursion.

The musl libc does not actually support utmpx or wtmpx.  For better
support you need to add another library such as libutx:

https://code.foxkit.us/adelie/libutx

This library is not yet fully functional, as it does not yet provide
wtmp(x).  It does however fully implement utmp(x).  It may give clues
as to what you'll need to do to make this functional on musl libc.

What we do in Adélie is actually put these two files in the musl
codebase itself as a patch, so that all programs can have it
available.  An eventual goal is to make it a separate library, and
have programs that can use utmpx features attempt to dlopen the
library.  If the library exists on the system, they use it; if the
library does not exist on the system, the user has chosen to disable
it and that part of the software is disabled.

Unfortunately that is going to require a massive effort and the
cooperation of many disparate upstreams.  I don't hold my breath for
such a time.  Until then, having it always available with a simple
solution for those who do not want it (symlink /var/run/utmp ->
/dev/null) is what we are using.


Best,
- --arw


- -- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZpMy5AAoJEMspy1GSK50U3AYQAJWNqpkl2eWCLnxpU+p2cAmv
9yzWQe2sPjCo+1hISq4u8Xt1c0KMbBGaKLhgA9yh1wtQT21QdWm+Xk3wIaETZd3v
EnMH3ZzxbbYXYImYmyytUUicDbCJVHWvBe4kG9wQtgoTqijw7WIkDR6MuyKwTC7Q
Ax2U+QXQ25bnjGekW6OWVoCDDDrfYM1NZvz8DUh74ovxL3ceqKnUOmoNxJRWZS0w
a3z80c5LiB9/ilOuzQc/ijeDFjm/ST2A99vKutzTdEM05kcsrzsNEVLC47SFZfOg
+s0SCXVpEsXvXSkS1ECXANSt6b1HACO1VPZ+aBsyKApi8D/UnO2uzIwV1fQox6XE
4Gt9XPV7mP8WL9ycsNW7WXRhledHvtncGHaIqCiG6md/kSdPQEgP/KzeXJeAv+FH
bmRJTSbhDB0o2SeUxrCVLHLaPGWTYtshNg6/C/l2dyZqwctgmTmmUeVkXFnADiGW
ytwhzLfaUjE3eh8nqHd8BHXZtRweiaxtTZaOo7HmJF8TH1s1a3s9o4sfTHF8js+U
GKaXaIrBNDBD2/XMvt5w0/WDZjw/INyNPcXwV2aXCBuofPtQpFi1cvDjPHfZVWZx
irLrGTBVffgBuTNb19ZLWN+RC5JmAFuSGaTvpNWnMF0kaZD/pQ3ubYFHKJOMyBHY
sZd8C2Hq1ePbcs/qd9KH
=T+QY
-----END PGP SIGNATURE-----


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

* Re: Missing definitions for UTMP(x)
  2017-08-28 21:57 Missing definitions for UTMP(x) Matias Fonzo
  2017-08-29  2:09 ` A. Wilcox
@ 2017-08-29 11:05 ` u-uy74
  2017-08-29 18:51   ` Matias Fonzo
  1 sibling, 1 reply; 5+ messages in thread
From: u-uy74 @ 2017-08-29 11:05 UTC (permalink / raw)
  To: musl

On Mon, Aug 28, 2017 at 06:57:27PM -0300, Matias Fonzo wrote:
> We were building mesa (17.2.0-rc4) for Dragora, and we get this errors:
> 
> In file included from sessreg.c:73:0:
> sessreg.c: In function 'main':
> sessreg.h:107:21: error: '_PATH_WTMPX' undeclared (first use in this

$ tar tvzf mesa-17.2.0-rc4.tar.gz | grep sessreg || echo MISSING
MISSING
$

The problem is somewhere else than in mesa :)

A sufficient fix (while building sessreg as a part of xorg-apps)
was for me

 sed -i '/^#define HAVE_UPDWTMPX 1/d' config.h

Depending on the sessreg version and the building options
something else might be needed or not, but not much.

Regards,
Rune



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

* Re: Missing definitions for UTMP(x)
  2017-08-29 11:05 ` u-uy74
@ 2017-08-29 18:51   ` Matias Fonzo
  0 siblings, 0 replies; 5+ messages in thread
From: Matias Fonzo @ 2017-08-29 18:51 UTC (permalink / raw)
  To: musl

On Tue, 29 Aug 2017 13:05:56 +0200
u-uy74@aetey.se wrote:

> On Mon, Aug 28, 2017 at 06:57:27PM -0300, Matias Fonzo wrote:
> > We were building mesa (17.2.0-rc4) for Dragora, and we get this
> > errors:
> > 
> > In file included from sessreg.c:73:0:
> > sessreg.c: In function 'main':
> > sessreg.h:107:21: error: '_PATH_WTMPX' undeclared (first use in
> > this  
> 
> $ tar tvzf mesa-17.2.0-rc4.tar.gz | grep sessreg || echo MISSING
> MISSING
> $
> 
> The problem is somewhere else than in mesa :)

Sorry, it was about the definition but not in mesa -> sessreg.
 
> A sufficient fix (while building sessreg as a part of xorg-apps)
> was for me
> 
>  sed -i '/^#define HAVE_UPDWTMPX 1/d' config.h

I will tell to the packager to try this.
 
> Depending on the sessreg version and the building options
> something else might be needed or not, but not much.
> 

Thanks.



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

* Re: Missing definitions for UTMP(x)
  2017-08-29  2:09 ` A. Wilcox
@ 2017-08-29 18:53   ` Matias Fonzo
  0 siblings, 0 replies; 5+ messages in thread
From: Matias Fonzo @ 2017-08-29 18:53 UTC (permalink / raw)
  To: musl

Hi A. Wilcox,

On Mon, 28 Aug 2017 21:09:00 -0500
"A. Wilcox" <awilfox@adelielinux.org> wrote:
> 
> If you'll notice, this would cause preprocessor recursion.
> 
> The musl libc does not actually support utmpx or wtmpx.  For better
> support you need to add another library such as libutx:
> 
> https://code.foxkit.us/adelie/libutx
> 

Thanks for the information.  :-)

> [..]

Regards,
Matías



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

end of thread, other threads:[~2017-08-29 18:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 21:57 Missing definitions for UTMP(x) Matias Fonzo
2017-08-29  2:09 ` A. Wilcox
2017-08-29 18:53   ` Matias Fonzo
2017-08-29 11:05 ` u-uy74
2017-08-29 18:51   ` Matias Fonzo

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).