Skip to content

Compile error on BFS #15

Closed
Closed

Description

@bpopovych

latest zen-kernel sources 3.13.4

CC kernel/sched/bfs.o
kernel/sched/bfs.c: In function ‘enqueue_task’:
kernel/sched/bfs.c:638:2: warning: passing argument 1 of ‘sched_info_queued’ from incompatible pointer type [enabled by default]
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: expected ‘struct rq _’ but argument is of type ‘struct task_struct *’
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c:638:2: error: too few arguments to function ‘sched_info_queued’
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: declared here
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c: In function ‘enqueue_task_head’:
kernel/sched/bfs.c:646:2: warning: passing argument 1 of ‘sched_info_queued’ from incompatible pointer type [enabled by default]
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: expected ‘struct rq *’ but argument is of type ‘struct task_struct *’
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c:646:2: error: too few arguments to function ‘sched_info_queued’
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: declared here
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c: In function ‘requeue_task’:
kernel/sched/bfs.c:651:2: warning: passing argument 1 of ‘sched_info_queued’ from incompatible pointer type [enabled by default]
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: expected ‘struct rq *’ but argument is of type ‘struct task_struct *’
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c:651:2: error: too few arguments to function ‘sched_info_queued’
sched_info_queued(p);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:99:20: note: declared here
static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
^
kernel/sched/bfs.c: At top level:
kernel/sched/bfs.c:1665:6: error: conflicting types for ‘sched_fork’
void sched_fork(struct task_struct *p)
^
In file included from include/linux/nmi.h:7:0,
from kernel/sched/bfs.c:33:
include/linux/sched.h:2119:13: note: previous declaration of ‘sched_fork’ was here
extern void sched_fork(unsigned long clone_flags, struct task_struct *p);
^
kernel/sched/bfs.c: In function ‘sched_fork’:
kernel/sched/bfs.c:1717:21: error: ‘struct thread_info’ has no member named ‘preempt_count’
task_thread_info(p)->preempt_count = 1;
^
kernel/sched/bfs.c: In function ‘prepare_task_switch’:
kernel/sched/bfs.c:1871:2: warning: passing argument 1 of ‘sched_info_switch’ from incompatible pointer type [enabled by default]
sched_info_switch(prev, next);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:146:1: note: expected ‘struct rq *’ but argument is of type ‘struct task_struct *’
sched_info_switch(struct rq *rq,
^
kernel/sched/bfs.c:1871:2: error: too few arguments to function ‘sched_info_switch’
sched_info_switch(prev, next);
^
In file included from kernel/sched/bfs.c:353:0:
kernel/sched/stats.h:146:1: note: declared here
sched_info_switch(struct rq *rq,
^
kernel/sched/bfs.c: In function ‘add_preempt_count’:
kernel/sched/bfs.c:2950:18: error: lvalue required as left operand of assignment
preempt_count() += val;
^
kernel/sched/bfs.c: In function ‘sub_preempt_count’:
kernel/sched/bfs.c:2981:18: error: lvalue required as left operand of assignment
preempt_count() -= val;
^
kernel/sched/bfs.c: In function ‘preempt_schedule’:
kernel/sched/bfs.c:3479:3: error: implicit declaration of function ‘add_preempt_count_notrace’ [-Werror=implicit-function-declaration]
add_preempt_count_notrace(PREEMPT_ACTIVE);
^
kernel/sched/bfs.c:3481:3: error: implicit declaration of function ‘sub_preempt_count_notrace’ [-Werror=implicit-function-declaration]
sub_preempt_count_notrace(PREEMPT_ACTIVE);
^
In file included from include/linux/linkage.h:4:0,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from kernel/sched/bfs.c:31:
kernel/sched/bfs.c: In function ‘preempt_schedule_irq’:
kernel/sched/bfs.c:3504:11: error: ‘struct thread_info’ has no member named ‘preempt_count’
BUG_ON(ti->preempt_count || !irqs_disabled());
^
include/linux/compiler.h:153:42: note: in definition of macro ‘unlikely’

define unlikely(x) __builtin_expect(!!(x), 0)

                                      ^

kernel/sched/bfs.c:3504:2: note: in expansion of macro ‘BUG_ON’
BUG_ON(ti->preempt_count || !irqs_disabled());
^
kernel/sched/bfs.c: At top level:
kernel/sched/bfs.c:4811:20: error: redefinition of ‘should_resched’
static inline bool should_resched(void)
^
In file included from include/linux/preempt.h:18:0,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from kernel/sched/bfs.c:31:
/usr/src/zen-kernel-3.13.4/arch/x86/include/asm/preempt.h:96:29: note: previous definition of ‘should_resched’ was here
static __always_inline bool should_resched(void)
^
kernel/sched/bfs.c: In function ‘init_idle’:
kernel/sched/bfs.c:5195:24: error: ‘struct thread_info’ has no member named ‘preempt_count’
task_thread_info(idle)->preempt_count = 0;
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: спроба виконання рецепта для мети «kernel/sched/bfs.o» зазнала невдачі
make[2]: *_* [kernel/sched/bfs.o] Помилка 1
scripts/Makefile.build:455: спроба виконання рецепта для мети «kernel/sched» зазнала невдачі
make[1]: *** [kernel/sched] Помилка 2
Makefile:816: спроба виконання рецепта для мети «kernel» зазнала невдачі
make: *** [kernel] Помилка 2

my gcc is:
linux # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.2-r1/work/gcc-4.8.2/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --with-cloog --disable-isl-version-check
Thread model: posix
gcc version 4.8.2 (Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest)

Activity

  1. heftig commented on Feb 22, 2014

    @heftig

    Sad. This isn't trivially fixable. I'll unmerge BFS until CK fixes it.

  2. added a commit that references this issue on Jun 27, 2014
  3. added a commit that references this issue on Jun 28, 2014
  4. added a commit that references this issue on Dec 30, 2015
  5. added a commit that references this issue on Sep 25, 2016
  6. 113 remaining items

  7. added a commit that references this issue on Nov 24, 2025
  8. added a commit that references this issue on Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions