mailing list of musl libc
 help / color / mirror / code / Atom feed
* Re: linux/vt.h
@ 2015-10-03 12:27 vlse
  2015-10-03 13:01 ` linux/vt.h Jorge Almeida
  0 siblings, 1 reply; 9+ messages in thread
From: vlse @ 2015-10-03 12:27 UTC (permalink / raw)
  To: musl

>In order to use these, you need to have kernel headers installed.
>There are several ways to get them, but the easiest is the way
>provided by the kernel:

>https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt

But the vanilla kernel headers/source are not properly adapted for musl; is'nt it. Or has it changed with musl and we can use the vanilla kernel sources from www.kernel.org.

But then why do sabotage uses modified/adapted kernel headers. Please give some details about proper/correct way
to do it.

vlse

http://www.veera.biz



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

* Re: Re: linux/vt.h
  2015-10-03 12:27 linux/vt.h vlse
@ 2015-10-03 13:01 ` Jorge Almeida
  2015-10-03 16:42   ` Laurent Bercot
  2015-10-03 18:00   ` Rich Felker
  0 siblings, 2 replies; 9+ messages in thread
From: Jorge Almeida @ 2015-10-03 13:01 UTC (permalink / raw)
  To: musl

On Sat, Oct 3, 2015 at 5:27 AM, vlse <vlse@veera.biz> wrote:
>>In order to use these, you need to have kernel headers installed.
>>There are several ways to get them, but the easiest is the way
>>provided by the kernel:
>
>>https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt
>
> But the vanilla kernel headers/source are not properly adapted for musl; is'nt it. Or has it changed with musl and we can use the vanilla kernel sources from www.kernel.org.
>
> But then why do sabotage uses modified/adapted kernel headers.

Good question. Conventional wisdom states that one must keep the
headers glibc was compiled against, not the headers of the current
kernel, but the why is never explained. Does it apply here (with
s/glibc/musl)?

Jorge


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

* Re: Re: linux/vt.h
  2015-10-03 13:01 ` linux/vt.h Jorge Almeida
@ 2015-10-03 16:42   ` Laurent Bercot
  2015-10-03 16:51     ` Jorge Almeida
  2015-10-03 18:00   ` Rich Felker
  1 sibling, 1 reply; 9+ messages in thread
From: Laurent Bercot @ 2015-10-03 16:42 UTC (permalink / raw)
  To: musl

On 03/10/2015 15:01, Jorge Almeida wrote:
> Good question. Conventional wisdom states that one must keep the
> headers glibc was compiled against, not the headers of the current
> kernel, but the why is never explained.

  AIUI, it's a question of ABI. Your applications are linked against
the libc, not against the kernel: it's important for applications
and the libc to have the same definitions, else there's no guarantee
they'll work together. Whereas the kernel/userspace ABI is supposed
to be stable, so it's not supposed to matter if the current kernel
has different headers than the ones the libc was compiled against.
  Other people will correct me if I'm wrong.

-- 
  Laurent



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

* Re: Re: linux/vt.h
  2015-10-03 16:42   ` Laurent Bercot
@ 2015-10-03 16:51     ` Jorge Almeida
  0 siblings, 0 replies; 9+ messages in thread
From: Jorge Almeida @ 2015-10-03 16:51 UTC (permalink / raw)
  To: musl

On Sat, Oct 3, 2015 at 9:42 AM, Laurent Bercot <ska-dietlibc@skarnet.org> wrote:
> On 03/10/2015 15:01, Jorge Almeida wrote:
>>
>> Good question. Conventional wisdom states that one must keep the
>> headers glibc was compiled against, not the headers of the current
>> kernel, but the why is never explained.
>
>
>  AIUI, it's a question of ABI. Your applications are linked against
> the libc, not against the kernel: it's important for applications
> and the libc to have the same definitions, else there's no guarantee
> they'll work together. Whereas the kernel/userspace ABI is supposed
> to be stable, so it's not supposed to matter if the current kernel
> has different headers than the ones the libc was compiled against.
>  Other people will correct me if I'm wrong.
>
Hi Laurent

I understand that part. Stability of the ABI is a big deal for Linus,
if I understand correctly. But one reads about "sanitized headers",
and it's the "sanitized" vs. headers pure and simple that I don't
understand.

Jorge


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

* Re: Re: linux/vt.h
  2015-10-03 13:01 ` linux/vt.h Jorge Almeida
  2015-10-03 16:42   ` Laurent Bercot
@ 2015-10-03 18:00   ` Rich Felker
  2015-10-03 18:37     ` Jorge Almeida
  1 sibling, 1 reply; 9+ messages in thread
From: Rich Felker @ 2015-10-03 18:00 UTC (permalink / raw)
  To: musl

On Sat, Oct 03, 2015 at 06:01:30AM -0700, Jorge Almeida wrote:
> On Sat, Oct 3, 2015 at 5:27 AM, vlse <vlse@veera.biz> wrote:
> >>In order to use these, you need to have kernel headers installed.
> >>There are several ways to get them, but the easiest is the way
> >>provided by the kernel:
> >
> >>https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt
> >
> > But the vanilla kernel headers/source are not properly adapted for
> > musl; is'nt it. Or has it changed with musl and we can use the
> > vanilla kernel sources from www.kernel.org.
> >
> > But then why do sabotage uses modified/adapted kernel headers.
> 
> Good question. Conventional wisdom states that one must keep the
> headers glibc was compiled against, not the headers of the current
> kernel, but the why is never explained. Does it apply here (with
> s/glibc/musl)?

This does not apply whatsoever to musl since musl does not use kernel
headers at all -- unless you want to count the few wrappers in sys/*.h
which this thread is about, but musl is not actually "using" the
kernel headers here, just helping applications that use the official
<sys/*.h> includes find the kernel headers for their own use.

Rich


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

* Re: Re: linux/vt.h
  2015-10-03 18:00   ` Rich Felker
@ 2015-10-03 18:37     ` Jorge Almeida
  0 siblings, 0 replies; 9+ messages in thread
From: Jorge Almeida @ 2015-10-03 18:37 UTC (permalink / raw)
  To: musl

On Sat, Oct 3, 2015 at 11:00 AM, Rich Felker <dalias@libc.org> wrote:
> On Sat, Oct 03, 2015 at 06:01:30AM -0700, Jorge Almeida wrote:
>> On Sat, Oct 3, 2015 at 5:27 AM, vlse <vlse@veera.biz> wrote:

>> > But then why do sabotage uses modified/adapted kernel headers.
>>
>> Good question. Conventional wisdom states that one must keep the
>> headers glibc was compiled against, not the headers of the current
>> kernel, but the why is never explained. Does it apply here (with
>> s/glibc/musl)?
>
> This does not apply whatsoever to musl since musl does not use kernel
> headers at all -- unless you want to count the few wrappers in sys/*.h
> which this thread is about, but musl is not actually "using" the
> kernel headers here, just helping applications that use the official
> <sys/*.h> includes find the kernel headers for their own use.
>
Thanks, clear enough.

Jorge


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

* Re: linux/vt.h
  2015-10-01 20:15 ` linux/vt.h Rich Felker
@ 2015-10-01 20:51   ` Jorge Almeida
  0 siblings, 0 replies; 9+ messages in thread
From: Jorge Almeida @ 2015-10-01 20:51 UTC (permalink / raw)
  To: musl

On Thu, Oct 1, 2015 at 1:15 PM, Rich Felker <dalias@libc.org> wrote:
> On Thu, Oct 01, 2015 at 01:02:51PM -0700, Jorge Almeida wrote:
>> Greetings
>>
>> <sys/vt.h> includes <linux/vt.h>, but there is no such thing
>

>
> In order to use these, you need to have kernel headers installed.
> There are several ways to get them, but the easiest is the way
> provided by the kernel:
>
> https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt
>
> You should point INSTALL_HDR_PATH to the location of the musl include
> dir if you use this method.
>
Done (with success)
>
> BTW once the wiki is back up we should put this on the FAQ if it's not
> already there..

Good idea (this message is a keeper)

Thanks

Jorge


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

* Re: linux/vt.h
  2015-10-01 20:02 linux/vt.h Jorge Almeida
@ 2015-10-01 20:15 ` Rich Felker
  2015-10-01 20:51   ` linux/vt.h Jorge Almeida
  0 siblings, 1 reply; 9+ messages in thread
From: Rich Felker @ 2015-10-01 20:15 UTC (permalink / raw)
  To: musl

On Thu, Oct 01, 2015 at 01:02:51PM -0700, Jorge Almeida wrote:
> Greetings
> 
> <sys/vt.h> includes <linux/vt.h>, but there is no such thing

There are a couple of headers like this that are questionable to have
in musl at all, but it seemed like the most sensible place to have
them. I think sys/soundcard.h and sys/kd.h are also like this. These
are headers that really have nothing to do with libc or userspace
stuff; they just define ioctl interfaces to the Linux kernel. But
for various historical reasons they were in sys/ rather than linux/
where the kernel headers would go.

In order to use these, you need to have kernel headers installed.
There are several ways to get them, but the easiest is the way
provided by the kernel:

https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt

You should point INSTALL_HDR_PATH to the location of the musl include
dir if you use this method.

Alternatively if you don't want to download and extract the whole
kernel source, Sabotage Linux has a working kernels headers package;
you can simply download from their mirrors listed in the package file:

https://github.com/sabotage-linux/sabotage/blob/master/pkg/kernel-headers

Hope this helps.

BTW once the wiki is back up we should put this on the FAQ if it's not
already there..

Rich


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

* linux/vt.h
@ 2015-10-01 20:02 Jorge Almeida
  2015-10-01 20:15 ` linux/vt.h Rich Felker
  0 siblings, 1 reply; 9+ messages in thread
From: Jorge Almeida @ 2015-10-01 20:02 UTC (permalink / raw)
  To: musl

Greetings

<sys/vt.h> includes <linux/vt.h>, but there is no such thing

TIA

Jorge Almeida


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

end of thread, other threads:[~2015-10-03 18:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 12:27 linux/vt.h vlse
2015-10-03 13:01 ` linux/vt.h Jorge Almeida
2015-10-03 16:42   ` Laurent Bercot
2015-10-03 16:51     ` Jorge Almeida
2015-10-03 18:00   ` Rich Felker
2015-10-03 18:37     ` Jorge Almeida
  -- strict thread matches above, loose matches on Subject: below --
2015-10-01 20:02 linux/vt.h Jorge Almeida
2015-10-01 20:15 ` linux/vt.h Rich Felker
2015-10-01 20:51   ` linux/vt.h Jorge Almeida

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