Page MenuHomePhabricator

FreeBSD build failed
Closed, ResolvedPublic

Description

After a555fbf7693338d8b545d89f87a45852958a2166 commit by Raster, my Jenkins (on FreeBSD 12.1) cannot build EFL anymore:

[54/3833] Compiling C object 'src/lib/eina/803ee99@@eina@sha/eina_thread.c.o'
FAILED: src/lib/eina/803ee99@@eina@sha/eina_thread.c.o 
cc -Isrc/lib/eina/803ee99@@eina@sha -Isrc/lib/eina -I../src/lib/eina -I. -I.. -I/usr/local/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -Wall -Wpointer-arith -Wunused-parameter -Wsign-compare -Wno-missing-field-initializers -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -DEFL_BETA_API_SUPPORT=1 -DNEED_RUN_IN_TREE=1 -DEFL_BUILD=1 -DELM_INTERNAL_API_ARGESFSDFEFC=1 -fPIC -pthread -MD -MQ 'src/lib/eina/803ee99@@eina@sha/eina_thread.c.o' -MF 'src/lib/eina/803ee99@@eina@sha/eina_thread.c.o.d' -o 'src/lib/eina/803ee99@@eina@sha/eina_thread.c.o' -c ../src/lib/eina/eina_thread.c
../src/lib/eina/eina_thread.c:151:38: error: use of undeclared identifier 'SCHED_IDLE'
        min = sched_get_priority_min(SCHED_IDLE);
                                     ^
../src/lib/eina/eina_thread.c:153:37: error: use of undeclared identifier 'SCHED_IDLE'
        pthread_setschedparam(self, SCHED_IDLE, &params);
                                    ^
../src/lib/eina/eina_thread.c:160:38: error: use of undeclared identifier 'SCHED_BATCH'
        min = sched_get_priority_min(SCHED_BATCH);
                                     ^
../src/lib/eina/eina_thread.c:161:38: error: use of undeclared identifier 'SCHED_BATCH'
        max = sched_get_priority_max(SCHED_BATCH);
                                     ^
../src/lib/eina/eina_thread.c:163:37: error: use of undeclared identifier 'SCHED_BATCH'
        pthread_setschedparam(self, SCHED_BATCH, &params);
                                    ^
5 errors generated.
Peter2121 triaged this task as High priority.

I think, it is safe to

#ifdef __FreeBSD__
#define SCHED_IDLE SCHED_OTHER
#define SCHED_BATCH SCHED_OTHER
#endif
raster closed this task as Resolved.May 25 2020, 4:53 AM
raster claimed this task.

fixed it... use current sched when SCHED_BATCH and IDLE not available.