Bug 259925 - graphics/cairo: compiler error: implicit declaration of function 'sched_getaffinity' is invalid in C99
Summary: graphics/cairo: compiler error: implicit declaration of function 'sched_getaf...
Status: Closed DUPLICATE of bug 259787
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-18 20:19 UTC by O. Hartmann
Modified: 2021-11-18 22:06 UTC (History)
2 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2021-11-18 20:19:05 UTC
On CURRENT, FreeBSD 14.0-CURRENT #6 main-n250822-4fdc5b8494b4: Thu Nov 18 06:00:15 CET 2021 amd64, port graphics/cairo fails to build to to the error shown below:

[...]
/bin/sh ../libtool  --tag=CC    --mode=link cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -fstack-protector-strong -o libcairoperf.la  cairo-perf.lo cairo-perf-report.lo cairo-stats.lo cairo-time.lo    -lrt  -lm
libtool: link: ar cru .libs/libcairoperf.a .libs/cairo-perf.o .libs/cairo-perf-report.o .libs/cairo-stats.o .libs/cairo-time.o 
libtool: link: ranlib .libs/libcairoperf.a
libtool: link: ( cd ".libs" && rm -f "libcairoperf.la" && ln -s "../libcairoperf.la" "libcairoperf.la" )
--- cairo-analyse-trace ---
--- cairo-perf-micro.o ---
cairo-perf-micro.c:418:5: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?
    cpu_set_t affinity;
    ^~~~~~~~~
    cpusetid_t
/usr/include/sys/types.h:86:22: note: 'cpusetid_t' declared here
typedef __cpusetid_t    cpusetid_t;
                        ^
cairo-perf-micro.c:421:9: error: implicit declaration of function 'sched_getaffinity' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (sched_getaffinity(0, sizeof(affinity), &affinity)) {
        ^
cairo-perf-micro.c:426:35: error: use of undeclared identifier 'CPU_SETSIZE'
    for(i = 0, cpu_count = 0; i < CPU_SETSIZE; ++i) {
                                  ^
cairo-perf-micro.c:427:6: error: implicit declaration of function 'CPU_ISSET' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (CPU_ISSET(i, &affinity))
            ^
--- cairo-analyse-trace ---
Comment 1 Charlie Li freebsd_committer freebsd_triage 2021-11-18 22:06:05 UTC
Part of a larger issue in base.

*** This bug has been marked as a duplicate of bug 259787 ***