Last Comment Bug 890240 - skia broken on bsd after update: unknown type name 'cpu_set_t'
: skia broken on bsd after update: unknown type name 'cpu_set_t'
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All FreeBSD
: -- normal (vote)
: mozilla25
Assigned To: Jan Beich
:
Mentors:
Depends on:
Blocks: 848491 974272
  Show dependency treegraph
 
Reported: 2013-07-04 05:11 PDT by Jan Beich
Modified: 2014-02-18 21:52 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
freebsd hack (1.12 KB, patch)
2013-07-04 05:11 PDT, Jan Beich
no flags Details | Diff | Review
use stub on dragonfly, openbsd, solaris, etc (2.25 KB, patch)
2013-07-04 13:22 PDT, Jan Beich
gwright: review+
landry: feedback+
Details | Diff | Review
add patch to skia/patches (1.83 KB, patch)
2013-07-07 22:31 PDT, Landry Breuil (:gaston)
gwright: review+
Details | Diff | Review
patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp (2.04 KB, patch)
2013-11-02 22:28 PDT, Ryo ONODERA
no flags Details | Diff | Review
correct NetBSD support (2.32 KB, patch)
2013-11-05 06:44 PST, Ryo ONODERA
no flags Details | Diff | Review

Description Jan Beich 2013-07-04 05:11:20 PDT
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
Comment 1 Landry Breuil (:gaston) 2013-07-04 06:16:08 PDT
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
Comment 2 Landry Breuil (:gaston) 2013-07-04 06:41:11 PDT
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 ?
Comment 3 Jan Beich 2013-07-04 13:22:58 PDT
Created attachment 771471 [details] [diff] [review]
use stub on dragonfly, openbsd, solaris, etc

only gtk2, for qt bug 783463 has to be considered
Comment 4 George Wright (:gw280) (:gwright) 2013-07-04 14:22:21 PDT
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?).
Comment 5 Landry Breuil (:gaston) 2013-07-05 07:49:16 PDT
Comment on attachment 771471 [details] [diff] [review]
use stub on dragonfly, openbsd, solaris, etc

works for me
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-07-07 18:32:59 PDT
https://hg.mozilla.org/mozilla-central/rev/f7c118c5e82f
Comment 8 George Wright (:gw280) (:gwright) 2013-07-07 22:14:50 PDT
Oops. Forgot to ask you to add the .patch file to the gfx/skia/patches directory.
Comment 9 Landry Breuil (:gaston) 2013-07-07 22:31:40 PDT
Created attachment 771929 [details] [diff] [review]
add patch to skia/patches

Sure thing
Comment 11 Ryan VanderMeulen [:RyanVM] 2013-07-18 18:03:56 PDT
https://hg.mozilla.org/mozilla-central/rev/b195fd9f61ca
Comment 12 Landry Breuil (:gaston) 2013-10-20 10:19:28 PDT
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 Ryo ONODERA 2013-11-02 22:28:23 PDT
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 Ryo ONODERA 2013-11-05 06:44:39 PST
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.
Comment 15 Landry Breuil (:gaston) 2013-11-05 07:08:43 PST
Maybe it would be better in a separate bug depending on this one, and made as a patch against current mozilla-central tip...

Note You need to log in before you can comment on or make changes to this bug.