Bug 105281 - Build fails on musl for some reverse-dependencies
Summary: Build fails on musl for some reverse-dependencies
Status: RESOLVED FIXED
Alias: None
Product: libbsd
Classification: Unclassified
Component: libbsd (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Guillem Jover
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 23:36 UTC by vaelatern
Modified: 2018-05-21 03:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description vaelatern 2018-02-27 23:36:10 UTC
This shows up only when there is no sys/cdefs.h on a system at all, such as when building on a musl-libc host.

sys/cdefs.h is not present at all on musl libc systems, so perhaps this should point at bsd/sys/cdefs.h instead.

Example failed build output:

```
clang -std=c11 -I../include/ -O -g -Wall -Wextra -Wpedantic -Wno-missing-field-initializers -Werror -O3 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -finstrument-functions   -c -o bworker.o bworker.c
In file included from bworker.c:10:
In file included from /usr/include/bsd/stdlib.h:39:
/usr/include/bsd/libutil.h:43:10: error: 'sys/cdefs.h' file not found with <angled> include; use "quotes" instead
#include <sys/cdefs.h>
         ^
In file included from bworker.c:10:
/usr/include/bsd/stdlib.h:45:10: error: 'sys/cdefs.h' file not found with <angled> include; use "quotes" instead
#include <sys/cdefs.h>
         ^
In file included from bworker.c:11:
/usr/include/bsd/sys/tree.h:33:10: fatal error: 'sys/cdefs.h' file not found
#include <sys/cdefs.h>
         ^~~~~~~~~~~~~
3 errors generated.
make: *** [Makefile:16: bworker.o] Error 1
```
Comment 1 vaelatern 2018-03-21 21:51:20 UTC
This appears to be a regression on commit db7470b048a14bdc69a34fbd192ec626e1786411
Comment 2 vaelatern 2018-03-21 22:26:26 UTC
And looks like this is fixed in commit 11ec8f1e5dfa1c10e0c9fb94879b6f5b96ba52dd which I am now testing.
Comment 3 Guillem Jover 2018-05-21 03:31:56 UTC
The fix has now been released as part of libbsd 0.9.0. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.