Mail archive
alpine-user

Re: [alpine-user] missing header sys/queue.h

From: Riccardo Mottola <riccardo.mottola_at_libero.it>
Date: Tue, 5 Mar 2019 22:45:12 +0100

Hi Chloe,

Chloe Kudryavtsev wrote:
> On 2/28/2019 2:02 PM, Riccardo Mottola wrote:
> Hi Riccardo,
>
>> how to detect AlpineLinux sources compared to standard Linux
>
> I'm afraid that's not quite the issue you're running into.
> Alpine includes all of the standard *linux* headers under the
> linux-headers package.
> The problem you are running into is that glibc is not linux, and not
> necessarily standard.
>
>> fatal error: sys/queue.h: No such file or directory
>
> Alpine uses the musl libc.
> musl does not include sys/queue.h[1].
> As mentioned, you can find it in bsd-compat-headers (as per the
> recommendation of the musl author).
>
>> sys/sysctl.h: No such file or directory
>
> sysctl(2) is deprecated in linux[2], and should not be used.
> As such, musl removed it (5 years ago)[3].
>
> Any application using it should be modified to not use it.
>
>> how did you get FireFox running?
>
> I'm not sure on that one, I can't find the mention of sysctl under
> testing/firefox, so I assume upsteam has added the ability to detect
> this header's presence.

I checked the code and found out that the include is conditional:

#ifdef _EVENT_HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif

so if everything is working as expected it should be included only when
appropriate.

I see:

ipc/chromium/src/third_party/libevent/linux/event2/event-config.h:#define
_EVENT_HAVE_SYS_SYSCTL_H 1

I do not fully understand if the configure is actually called or not my
the mozilla build system!

As a test, I tried just to remove that headers, we can understand what
to patch later. However, compilation just delays failure:

  2:17.29 In file included from
/home/multix/code/Arctic-Fox/ipc/chromium/src/base/file_util.h:19,
  2:17.30 from
/home/multix/code/Arctic-Fox/ipc/chromium/src/base/file_util_posix.cc:5:
  2:17.30 ../../dist/system_wrappers/fts.h:4:15: fatal error: fts.h: No
such file or directory
  2:17.31 #include_next <fts.h>

Riccardo


---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Tue Mar 05 2019 - 22:45:12 UTC