The default bug view has changed. See this FAQ.

skia broken on bsd after update: unknown type name 'cpu_set_t'

RESOLVED FIXED in mozilla25

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: Jan Beich, Assigned: Jan Beich)

Tracking

Trunk
mozilla25
All
FreeBSD
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

4 years ago
Created attachment 771303 [details] [diff] [review]
freebsd hack

gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:17:40: error:
      unknown type name 'cpu_set_t'
static int nth_set_cpu(unsigned int n, cpu_set_t* cpuSet) {
                                       ^
gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:35:5: error:
      unknown type name 'cpu_set_t'
    cpu_set_t parentCpuset;
    ^
gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:36:60: error:
      use of undeclared identifier 'cpu_set_t'
    if (0 != pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &pare...
                                                           ^
gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:40:5: error:
      unknown type name 'cpu_set_t'
    cpu_set_t cpuset;
    ^
gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:44:47: error:
      use of undeclared identifier 'cpu_set_t'; did you mean 'cpuset'?
                                       sizeof(cpu_set_t),
                                              ^~~~~~~~~
                                              cpuset
gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:40:15: note:
      'cpuset' declared here
    cpu_set_t cpuset;
              ^
5 errors generated.
gmake[1]: *** [SkThreadUtils_pthread_linux.o] Error 1
Attachment #771303 - Flags: review?(gwright)
OpenBSD doesnt have a public equivalent for cpuset*, so i'd rather make it use SkThreadUtils_pthread_other.cpp instead of SkThreadUtils_pthread_linux.cpp
Or hack something in moz.build and have pthread_bsd.cpp, since it seems pthread_other.cpp is used by android... gwright, what do you think of it ?
(Assignee)

Comment 3

4 years ago
Created attachment 771471 [details] [diff] [review]
use stub on dragonfly, openbsd, solaris, etc

only gtk2, for qt bug 783463 has to be considered
Attachment #771303 - Attachment is obsolete: true
Attachment #771303 - Flags: review?(gwright)
Attachment #771471 - Flags: review?(gwright)
Attachment #771471 - Flags: feedback?(landry)
This looks reasonable to me, but I would like it to run through try with Skia enabled for canvas first just to make sure it doesn't break any supported configurations (it shouldn't, as far as I can tell?).
Attachment #771471 - Flags: review?(gwright) → review+
Comment on attachment 771471 [details] [diff] [review]
use stub on dragonfly, openbsd, solaris, etc

works for me
Attachment #771471 - Flags: feedback?(landry) → feedback+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7c118c5e82f
https://hg.mozilla.org/mozilla-central/rev/f7c118c5e82f
Assignee: nobody → jbeich
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Oops. Forgot to ask you to add the .patch file to the gfx/skia/patches directory.
Created attachment 771929 [details] [diff] [review]
add patch to skia/patches

Sure thing
Attachment #771929 - Flags: review?(gwright)
Attachment #771929 - Flags: review?(gwright) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b195fd9f61ca
https://hg.mozilla.org/mozilla-central/rev/b195fd9f61ca
Late to the party, but that commit breaks netbsd, since they dont have all the CPU_* macros.

 1:49.06 /home/landry/m-c/gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:27:25: error: 'CPU_SETSIZE' was not declared in this scope
 1:49.06 /home/landry/m-c/gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:28:29: error: 'CPU_ISSET' was not declared in this scope
 1:49.06 /home/landry/m-c/gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp: In function 'int nth_set_cpu(unsigned int, cpuset_t*)':
 1:49.06 /home/landry/m-c/gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp:39:41: error: 'CPU_ISSET' was not declared in this scope

etc etc.. i'll make it use _other.cpp like openbsd.

Comment 13

3 years ago
Created attachment 826393 [details] [diff] [review]
patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp

For NetBSD, attached patch works for me with firefox 25.0.
NetBSD's cpuset(3) functions have different argument type from FreeBSD.

Comment 14

3 years ago
Created attachment 827385 [details] [diff] [review]
correct NetBSD support

My previous patch is wrong.
Mindaugas Rasiukevicius (rmind@NetBSD) has written correct patch for firefox 25.0.
Attachment #826393 - Attachment is obsolete: true
Maybe it would be better in a separate bug depending on this one, and made as a patch against current mozilla-central tip...
(Assignee)

Updated

3 years ago
Blocks: 974272
You need to log in before you can comment on or make changes to this bug.