~alpine/users

8 4

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

Riccardo Mottola <riccardo.mottola@libero.it>
Details
Message ID
<69dc00e5-7e32-1a6a-0cf8-71bf675c15bd@libero.it>
Sender timestamp
1551380579
DKIM signature
missing
Download raw message
Hi Adam!

Adam Růžička wrote:
> Hi,
> bsd-compat-headers package seems to provide that header.


yes, you are right, I installed it and got further in compilation, now I 
get

  3:13.58 ../../dist/system_wrappers/sys/sysctl.h:4:15: fatal error: 
sys/sysctl.h: No such file or directory
  3:13.58  #include_next <sys/sysctl.h>
  3:13.59                ^~~~~~~~~~~~~~


is this a separate dev package too perhaps?

Riccardo


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Chloe Kudryavtsev <toast@toastin.space>
Details
Message ID
<c3c9691c-23b5-839e-3856-b7b16add8022@toastin.space>
In-Reply-To
<69dc00e5-7e32-1a6a-0cf8-71bf675c15bd@libero.it> (view parent)
Sender timestamp
1551414045
DKIM signature
missing
Download raw message
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.

[1]: 
https://wiki.musl-libc.org/faq.html#Q:-Why-is-%3Ccode%3Esys/queue.h%3C/code%3E-not-included?
[2]: man 2 sysctl
[3]: musl commit 2c5e7560251b25b36ae3785211962e9597dc7e7d


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FQuVyKB4ADc1-eF9-SLeo_tTYjZMcVqceLK8CFCQ=bQYw@mail.gmail.com>
In-Reply-To
<c3c9691c-23b5-839e-3856-b7b16add8022@toastin.space> (view parent)
Sender timestamp
1551442560
DKIM signature
missing
Download raw message
El vie., 1 de mar. de 2019 a la(s) 00:21, Chloe Kudryavtsev
(toast@toastin.space) escribió:

> > how did you get FireFox running?
> I'm not sure on that one, I can't find the mention of sysctl under
>

it's not that you think! currently firefox in alpine has many issues,
by example does not run in classmate intel minilatops if are 32bit flavor
(window opened and the content inside are empty or transparent)
and i only can run susessfully in 64bit but of course very slowly

The real problem: too much glibc not standard things included.

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

Chloe Kudryavtsev <toast@toastin.space>
Details
Message ID
<8bcf5e42-3654-0454-19e7-5d76bba0b925@toastin.space>
In-Reply-To
<c303c9a1-0aa6-46e7-571a-a97214b5f607@libero.it> (view parent)
Sender timestamp
1551839182
DKIM signature
missing
Download raw message
Hi again Riccardo,

On 3/5/2019 4:45 PM, Riccardo Mottola wrote:
> 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>

In this case, musl does not include fts.h (for similar reasons).
To look for what package might contain a given file (including headers), 
you can use the repository package browser (specifically the contents 
subsection) available here[1].
In this case, it looks like the package you're missing is `fts-dev`.

[1]: https://pkgs.alpinelinux.org/contents


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Riccardo Mottola <riccardo.mottola@libero.it>
Details
Message ID
<c303c9a1-0aa6-46e7-571a-a97214b5f607@libero.it>
In-Reply-To
<c3c9691c-23b5-839e-3856-b7b16add8022@toastin.space> (view parent)
Sender timestamp
1551822312
DKIM signature
missing
Download raw message
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@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Riccardo Mottola <riccardo.mottola@libero.it>
Details
Message ID
<a0b2090f-e279-4b45-607b-e8e3fa975a50@libero.it>
In-Reply-To
<8bcf5e42-3654-0454-19e7-5d76bba0b925@toastin.space> (view parent)
Sender timestamp
1551900495
DKIM signature
missing
Download raw message
Hi Chloe!

Chloe Kudryavtsev wrote:
> 
> In this case, musl does not include fts.h (for similar reasons).
> To look for what package might contain a given file (including headers), 
> you can use the repository package browser (specifically the contents 
> subsection) available here[1].
> In this case, it looks like the package you're missing is `fts-dev`.
> 
> [1]: https://pkgs.alpinelinux.org/contents

thank you, I was mitting that package (fts included) and together with 
my temporary sysctl patch, I can continue building, however things break 
this way:

  2:36.82 /home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp: In 
member function 'virtual nsresult 
nsLocalFile::GetDiskSpaceAvailable(int64_t*)':
  2:36.82 
/home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp:1414:10: 
error: 'BLOCK_SIZE' was not declared in this scope
  2:36.83      if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curspace)
  2:36.83           ^~~~~~~~~~
  2:36.86 
/home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp:1414:10: note: 
suggested alternative: 'BLKGETSIZE'
  2:36.86      if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curspace)
  2:36.87           ^~~~~~~~~~
  2:36.87           BLKGETSIZE
  2:37.25 In the directory 
/home/multix/code/Arctic-Fox/obj-i686-pc-linux-gnu/xpcom/io

is missing of BLOCK_SIZE another known alpine/musl issue?

Riccardo


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Chloe Kudryavtsev <toast@toastin.space>
Details
Message ID
<8add8700-d296-5806-5a41-c768af81d4b9@toastin.space>
In-Reply-To
<a0b2090f-e279-4b45-607b-e8e3fa975a50@libero.it> (view parent)
Sender timestamp
1552011659
DKIM signature
missing
Download raw message
Hey again Riccardo.

> is missing of BLOCK_SIZE another known alpine/musl issue?

BLOCK_SIZE is canonically defined in linux/fs.h as (1 << BLOCK_SIZE_BITS).

Glibc coincidentally redefines it to a hardcoded 1024 in sys/mount.h, 
but this is a glibc-specific extension.

Please make sure your project includes the correct header.

Also, do note that searching for "musl BLOCK_SIZE" (at least from where 
I'm at) gives relevant results in the top two slots (I haven't checked 
much lower).

It would be nice if for simpler issues (like finding a missing file 
using an automated tool, or where a symbol normally is), you could do 
the search yourself.

This means less effort for me, and significantly less waiting for you.
Instead of having to wait until I (or someone else) gets to helping you 
in their TODO list, you could have had your answer within a minute or 
two (rather than the > 1 day it took me to get back to you this time).


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20190308104729.2a3095ea@ncopa-desktop.copa.dup.pw>
In-Reply-To
<a0b2090f-e279-4b45-607b-e8e3fa975a50@libero.it> (view parent)
Sender timestamp
1552038449
DKIM signature
missing
Download raw message
On Wed, 6 Mar 2019 20:28:15 +0100
Riccardo Mottola <riccardo.mottola@libero.it> wrote:

> Hi Chloe!
> 
> Chloe Kudryavtsev wrote:
> > 
> > In this case, musl does not include fts.h (for similar reasons).
> > To look for what package might contain a given file (including headers), 
> > you can use the repository package browser (specifically the contents 
> > subsection) available here[1].
> > In this case, it looks like the package you're missing is `fts-dev`.
> > 
> > [1]: https://pkgs.alpinelinux.org/contents  
> 
> thank you, I was mitting that package (fts included) and together with 
> my temporary sysctl patch, I can continue building, however things break 
> this way:
> 
>   2:36.82 /home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp: In 
> member function 'virtual nsresult 
> nsLocalFile::GetDiskSpaceAvailable(int64_t*)':
>   2:36.82 
> /home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp:1414:10: 
> error: 'BLOCK_SIZE' was not declared in this scope
>   2:36.83      if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curspace)
>   2:36.83           ^~~~~~~~~~
>   2:36.86 
> /home/multix/code/Arctic-Fox/xpcom/io/nsLocalFileUnix.cpp:1414:10: note: 
> suggested alternative: 'BLKGETSIZE'
>   2:36.86      if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curspace)
>   2:36.87           ^~~~~~~~~~
>   2:36.87           BLKGETSIZE
>   2:37.25 In the directory 
> /home/multix/code/Arctic-Fox/obj-i686-pc-linux-gnu/xpcom/io
> 
> is missing of BLOCK_SIZE another known alpine/musl issue?

fwiw, none of those isses are issues in alpine/musl. It is bugs in the
software you are trying to build. You should report those upstream.


-nc


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

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

Riccardo Mottola <riccardo.mottola@libero.it>
Details
Message ID
<bf7d00b6-b50f-56c9-1f6e-087f1b5c79c4@libero.it>
In-Reply-To
<8add8700-d296-5806-5a41-c768af81d4b9@toastin.space> (view parent)
Sender timestamp
1552051646
DKIM signature
missing
Download raw message
Hi Natanael & Chloe,

Chloe Kudryavtsev wrote:
> BLOCK_SIZE is canonically defined in linux/fs.h as (1 << 
> BLOCK_SIZE_BITS).
>
> Glibc coincidentally redefines it to a hardcoded 1024 in sys/mount.h, 
> but this is a glibc-specific extension.
>
> Please make sure your project includes the correct header.
>
> Also, do note that searching for "musl BLOCK_SIZE" (at least from 
> where I'm at) gives relevant results in the top two slots (I haven't 
> checked much lower). 

thanks for the pointers, I found actually this discussion upstream

https://bugzilla.mozilla.org/show_bug.cgi?id=1152176

which shows some discussion if fs.h or mount.h is the better option.

At the end, FF opted for the solution to conditionally hard-code 1024. I 
will see if this fix solves the issue.

While ArcticFox is a fork and technically I can fix it differently, I 
prefer, when possible to have similar soruces, since it facilitates 
maintenance. I will test and let you know!


Happy hacking,
Riccardo



---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)