Closed Bug 890240 Opened 11 years ago Closed 11 years ago

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

Categories

(Core :: Graphics, defect)

All
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(3 files, 2 obsolete files)

Attached patch freebsd hack (obsolete) — Splinter Review
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 ?
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/mozilla-central/rev/f7c118c5e82f
Assignee: nobody → jbeich
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Oops. Forgot to ask you to add the .patch file to the gfx/skia/patches directory.
Sure thing
Attachment #771929 - Flags: review?(gwright)
Attachment #771929 - Flags: review?(gwright) → review+
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.
For NetBSD, attached patch works for me with firefox 25.0.
NetBSD's cpuset(3) functions have different argument type from FreeBSD.
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...
Blocks: 974272
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: